An app to help you and your Steam friends determine what game to play.
Step #1:
git clone https://github.com/d3r3kk/gamatrix
cd gamatrix
# get key here: https://steamcommunity.com/dev/
echo "my_personal_steam_web_api_key" > .user_steam_api_dev_keyapikey
Step #2:
poetry install
Step #3:
pytest # This is optional, if you are going to do some development...
python -m gamatrix
- Python 3.8 or higher installed (see Python.org for downloads).
- Poetry
- The Git client installed on your system and accessible via PATH.
- 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).
Once you are all setup and have the prerequisites installed, 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). - Run the application with the
--help
flag to see what options/commands are available.poetry run python -m gamatrix --help
- Run the application.
- Show off all your connected friends:
poetry run python -m gamatrix friends
TBD
Note: At the time of writing we aren't yet publishing packages to PyPI.
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
-
Setup your local environment with Poetry
poetry install
-
Important: Ensure tests all run and pass before you start!
poetry run pytest
-
Create your own feature branch off of master.
git checkout -b my_feature master
-
Do your work.
-
Ensure tests pass.
poetry run pytest
-
Push your feature branch.
git push --set-upstream origin my_feature
-
Create a PR against
main
via Github.
NOTE: If you need to update dependencies...
Please don't update the pyproject.toml
file directly. Add your package requirement using
poetry's poetry add <pkg_name>
functionality instead. Use
poetry add <pkg_name> --dev
for dev-only requirements. Use poetry update
to update the
versions of packages being used.
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