An app to help you and your Steam friends determine what game to play.
Step #1: All platforms
git clone https://github.com/d3r3kk/gamatrix
cd gamatrix
echo "my_personal_steam_web_api_key" > .user_steam_api_dev_key # get key here: https://steamcommunity.com/dev/apikey
Step #2 Option A: Windows Powershell
py -3.8 -m venv .venv
.venv/Scripts/Activate.ps1
Step #2 Option B: MacOS/Linux Bash
python3 -m venv .venv
. .venv/bin/activate
Step #3: All platforms
python -m pip install -U pip
python -m pip install -r requirements.txt
pytest # This is optional, if you are going to do some development...
python -m gamatrix
- Python 3.7 or higher installed (see Python.org for downloads).
- [Windows][MacOS] Go to Python.org website and download the latest version of Python and run the installer.
- [MacOS] Optional Use
brew install python3
once you've installed and configuredbrew
.
- [MacOS] Optional Use
- [Linux] Use your distros built-in package manager to install the latest version of Python.
sudo apt-get install python3 python3-pip python3-venv
- [Windows][MacOS] Go to Python.org website and download the latest version of Python and run the installer.
- The Git client installed on your system and accessible via PATH.
- [Windows][MacOS] Get the latest installer from the Git site.
- _[MacOS] Optional Use
brew install git
- _[MacOS] Optional Use
- [Linux] use your distros built-in package manager to install the latest version available.
sudo apt-get install git
- [Windows][MacOS] Get the latest installer from the Git site.
- A Steam account, and at least one friend! (go to Steam online to sign up).
- A Steam Web API Key (see Steam community Web API Page for details).
gamatrix
is a Python app, so instead of building you set up an environment. Our suggestion is that you create a
virtual environment using the built-in Python library venv
to do so. Instructions to get a venv
up and running:
- Open a Powershell window.
- Start->Powershell
- Navigate to a folder where you will run
gamatrix
from.cd ~/Documents
- Clone the repo.
git clone https://github.com/d3r3kk/gamatrix
- Create a virtual environment in the repo and activate it.
cd gamatrix
py -3.8 -m venv .venv --prompt "gamatrix"
- (alternatively, use
py -3.7 ...
for Python version 3.7)
- (alternatively, use
.venv/Scripts/Activate.ps1
- If you get errors stating that the
...Execution policy is Restricted...
, see Troubleshooting.
- If you get errors stating that the
- Open a terminal.
- Meta->Terminal
- Navigate to a folder where you will run
gamatrix
from.cd ~/
- Clone the repo.
git clone https://github.com/d3r3kk/gamatrix
- Create a virtual environment in the repo and activate it.
cd gamatrix
python3 -m venv .venv --prompt "gamatrix"
. .venv/bin/activate
- Install the dependencies for the application into the venv.
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- Make your API key available to the application.
mkdir -p ~/.gamatrix
- `cat 'your_api_key_here' > ~/.gamatrix/.user_steam_api_dev_key
- Note that you can set this as an environment variable called
USER_STEAM_API_DEV_KEY
or supply it on the command line.
Once you are all setup and have the prerequisites and preparation complete, you can now run the application.
- Open your shell of choice.
- Navigate to the
gamatrix
folder. (Note this is the root-folder you cloned to in Git, not thegamatrix/gamatrix
folder within the repo). - Activate the Python venv.
- Run the application with the
--help
flag to see what options/commands are available.python -m gamatrix --help
- Run the application.
- Show off all your connected friends:
python -m gamatrix friends
The application tries to minimize the amount of times it will reach out to the game client service. To achieve this,
the results from the basic queries about friends and games are cached between runs. The caches are stored under the
users home directory, under a folder called .gamatrix/cache
. The files located there can be removed at any time,
and can be ignored during runtime by using the --force
command line option.
Users can look through these cache files using Python, as they are simply pickled objects with a fairly basic schema.
Show friends:
python -m gamatrix --user=<username> --passwd='<password>' friends
Compare games with friend 1
and friend_2
:
python -m gamatrix --user=<username> --passwd='<password>' compare --friend="<friend 1>" --friend=<friend_2>
Quick setup steps...
-
Clone the repo.
git clone https://github.com/d3r3kk/gamatrix
-
Create your local Python virtual environment and install requirements.txt.
python -m venv .venv
. .venv/bin/activate
python -m pip install -U pip
python -m pip install -r requirements.txt
-
Important: Ensure tests all run and pass before you start!
pytest
-
Create your own feature branch off of master.
git checkout -b my_feature master
-
Do your work.
-
Ensure tests pass.
pytest
-
Push your feature branch.
git push --set-upstream origin my_feature
-
Create a PR against
master
via Github.
NOTE: If you need to update
requirements.txt
Please don't update that file directly. Add your package requirement to requirements.in
and use pip-tools
to update the files and pin all dependencies.
python -m pip install pip-tools
pip-compile
python -m pip install -r requirements.txt
Basic Premise: Be excellent to each other.
In general, this means that everyone is expected to be open, considerate, and respectful, of others no matter what their perspective is within this project.
Issue: The C++ Build Tools aren't available.
Error message occurs during python -m pip install -r requirements.txt
stage.
Error message ends with:
"distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/"
Solution: Install the Microsoft build tools by installing the Visual Studio Community Edition from the link provided. Be certain to install the MSVC v[VER] - VS 20xx C++ x64/x86 build tools (vMAJ.MIN)
are selected in "Individual Components" within the Visual Studio installer. You can install the "Desctop development with C++" workload to ensure you get everything. Alternatively, install only the "C++ Build Tools" workload for the latest Visual Studio (currently you can find them for Visual Studio 2019 here).
Issue: The Powershell Activate.ps1
script raises permissions errors.
Error message occurs during activation of the Python environment .venv\Scripts\Activate.ps1
.
Error message is:
.\.venv\Scripts\Activate.ps1 : File C:\path\to\gamatrix\.venv\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\.venv\Scripts\Activate.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Solution: The Powershell access is set to something less than RemoteSigned
. Change the execution
policy to RemoteSigned
.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned