You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 years ago | |
|---|---|---|
| .github | 2 years ago | |
| app | 2 years ago | |
| .gitignore | 2 years ago | |
| LICENSE | 2 years ago | |
| README.md | 2 years ago | |
| poetry.lock | 2 years ago | |
| pyproject.toml | 2 years ago | |
README.md
Hangman Game
Python console app hangman game based on the code by Mark Patterson
Install dependencies and run
pip install poetrypoetry installpoetry run python app/hangman.py
Lab "Static analysis and Metrics" Assignment
Important instructions
- do not move/delete the source files from the folders
- you may refactor functions, but you must keep the signatures of the all original functions (e.g. hangman(), splash_screen(), get_random_word())
- the orginal functionality must remain
- Submission: commit and push your changes to the current project to GitHub
- do not edit autograding or classroom files
⚠️ Note: the autograding is simplified on purpose, it will be overwritten after the submission deadline with additional tests
⚠️ Note: if you add tests, all tests should pass for final submission
Style check
- Install flake8
- Analyse the
app/hangman.py - Correct all errors
- All default flake8 checks must pass
- Add flake8 check to the GitHub CI as an action to
.github/workflows/main.yaml
⚠️ Note: all the source code files in the project must pass the the default flake8 check.
Complexity analysis
Cyclomatic complexity is a part of maintainability index. The recommended complexity for functions is 10.
- Analyse complexity of
app/hangman.py, - Refactor as needed.
- Add complexity threashold check (i.e. 10 for max complexity) to GitHub CI as an action to
.github/workflows/main.yaml
⚠️ Note: autograding will check the complexity of all the source code files after the submission deadline in postprocessing.
Hints
- Check the code quality tutorial
- Flake rules https://www.flake8rules.com/