mirror of
https://github.com/QualityInUse/lab-metrics-maksktl.git
synced 2026-08-05 10:35:28 +03:00
feedback
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/
Description
Languages
Python
100%