- a Poker hand evaluator.
- currently only supports High Games:
- features:
- calculate highest hand rank possible for a 5 card hand.
- calculate all possible hand ranks for a 5 card hand: response is stubbed
- features:
- currently only supports High Games:
-
docs: project documentation lives in here.
-
src: production code lives in folder and is divided in the modules below:
- app_poker: project package
- api:
- the API to the application lives in this module.
- the current implementation is a REST API, but a gRPC, CLI API, etc would be implemented in here.
- config:
- configurable values live in here.
- these are values such as Hand Ranks, Card Ranks.
- as the system scales, you could migrate these into a database to allow independently changing config without restarting the application.
- core:
- the domain logic of the application lives in this module.
- gateway:
- all external interaction objects(e.g. files, external APIs etc) live in this module.
- model:
- the domain models for Poker live in this in this module.
- app_poker.py: entry point to startup the application
- api:
- app_poker: project package
-
tests: test code lives in folder. the tests are intentionally separated from production code.
- benefits:
- tests can run against an installed version after executing
pip install .
. - tests can run against the local copy with an editable install after executing
pip install --edit
. - when using Docker, the entire app_poker folder can be copied without needing to exclude tests, which we don't release to PROD.
- tests can run against an installed version after executing
- more in depth discussion here: https://docs.pytest.org/en/latest/explanation/goodpractices.html#choosing-a-test-layout-import-rules
- benefits:
-
utilities: any useful scripts, such as curl & postman requests, JSON payloads, software installations, etc.
-
install
python 3.11
or higher. -
clone repo:
git clone git@github.com:praisetompane/app_poker.git
- install pipenv: https://pypi.org/project/pipenv/
- install packages into local environment using pipenv[only required for first run]:
pipenv install
- to start system run:
./start_system.sh
- to run tests:
- activate environment
pipenv shell
- run tests
pytest
-
The curl request used can be found in
utilities/curl/
.- example:
./utilities/curl/highest_rank/royal_flush.sh
-
If Postman requests can be found in
/utilities/postman/app_poker.postman_collection.json
.- Guide for how to import into Postman: https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-data/
- to run system in debug mode:
./start_system_development.sh
- running in VSCode:
- NB: the master is locked and all changes must come through a Pull Request.
- commit messages:
- provide concise commit messages that describe what you have done.
# example: git commit -m "feat(core): algorithm" -m"implement my new shiny faster algorithm"
- screen shot of Githb view
- references:
- provide concise commit messages that describe what you have done.
Disclaimer: This is still work in progress.