Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Abstract
Move to Python 3.10, now uses Poetry, added formatter, linter and sorter, other changes added.
This is a WIP PR and will need some input from others. Feedback encouraged.
Action Taken
Moved the project to Poetry for a better experience in local dev and packaging the final product. Will aid us later when dockerising. Once poetry is installed on the dev's system the project can now be set up by simply cloning the project, running
poetry install
in the root of the project and thenpoetry shell
to switch to the virtual environment. CLI can now be run withpoetry run cli
. More actions can be defined later.Moved to use pytest (pretty sure we weren't using this before). Tests can now be run by ensuring you're in the virtual env (
poetry shell
) and then runpytest
or for verbose outputpytest -v
or for specific filespytest path/to/some/test_file.py
Moved to use isort - a tool that nicely sorts out and separates imports for modules neatly and without you having to think much.
Moved to use black - no more quibbling for code style. Just run
black
when you're finished coding or set it up to be used as the default VSCode formatter for the project (in your.vscode/
folder in the project) and it will format the code according to the defaultblack
specification.Moved to use flake8 - default linter for the project from now on. Use it as -
flake8 PyPoE/
from the project root to lint the main project. This is supposed to be eventually used to increase the repo code quality. It will report on common errors like:Moved to use Python 3.10 and all the improvements that come with it (poetry will use this if its installed in your system) and it should now be the de-facto required version for this repo.
Ran the aforementioned tools on the repo to do initial tidy up (Flake8 was skipped, because it requires manual intervention).
Caveats
Merge this carefully and with a lot of review. I ran some cli stuff on my Mac but I would like someone with a unix or windows machine to test it fully using a known spec and a good ggpk.
FAO
@angelic-knight @AlphSpirit @Journeytojah