- 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.
- The repository is configured to use devcontainers for development.
-
To start system run
./start_system.sh
-
Debugging
- To run system in debug mode
./start_system_development.sh
- Running in VSCode
- To run system in debug mode
- Run unit and integration tests
pytest
- Run End to End tests
-
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/
-
- NB: the main 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.




