play paper netrunner via webcam
see the demo live here
dependencies:
- install Python 3.10 and Poetry
- install and start MongoDB
- get an API key from Metered
- get an API key from Google Vision
fetch dependencies: poetry install
run: export METERED_API_KEY=<metered>; export VISION_API_KEY=<google>; poetry run gunicorn -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 pantograph.flask:app
there are two small tests suites: python tests using pytest and end-to-end tests using cypress. The end-to-end tests require the server running as above, including Google API key
To run python tests: poetry run pytest
To run end-to-end tests:
- install cypress via
npm install
- then run the tests via
npx cypress run
or through the cypress UI (npx cypress open
)
enable debug mode by appending ?debug-mode=true
to any room (including demo).
this will display debugging information, mostly related to the card search, below the main div (scroll down)
set up pre-commit to automatically format with black
steps to manually update to support new releases from NSG:
- download images:
mkdir /tmp/images; poetry run python pantograph/nrdb.py --download-set <set> --download-path /tmp/images
- upload to Google:
gcloud storage cp --recursive /tmp/images gs://netrunner-cards
update card pool for Startup in./pantograph/nrdb.py
(Standard relies on NRDB rotation)