Restructure project by flattening directories and add CI which runs tests with pytest #2
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.
This PR does two things, in two commits:
src/pydsol/core
becomespydsol
tests/pydsol/core
becomestests
This makes running pytest as easy as running
python -m pytest
. The CI configuration worked on the first try, which I can tell you rarely happens. Using a wide-adopted project structure also makes packaging (to PyPI for example) also a lot easier.Note that the CI already catched an interesting error: While Python 3.9 and 3.10 passes the tests perfectly fine, 3.8 won't work because a lot of
TypeError: 'type' object is not subscriptable
errors. As you probably know this has to do with Python 3.8 and earlier not supporting this type hinting functionality (link).This is not documented in the docs and not specified in a
python_requires
variable, and can keep less experienced users stuck wondering why their code keeps producing errors and tests don't pass.Anyway, just a quick proof of concept, please let me know what you think of it and if you would like any changes.