-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove old build files and make python 3.11 work #415
Conversation
Codecov Report
@@ Coverage Diff @@
## main #415 +/- ##
==========================================
+ Coverage 71.61% 79.12% +7.51%
==========================================
Files 43 62 +19
Lines 4101 5730 +1629
==========================================
+ Hits 2937 4534 +1597
- Misses 1164 1196 +32
... and 18 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
While working on this I saw that 3.11 unfortunately introduced some changes that caused parts of the codegen to fail. Since i have no time to investigate now, the PR currently just sets the max supported version to 3.10. |
commands = | ||
#shed # combines autoflake, black, isort, and pyupgrade | ||
flake8 | ||
|
||
[testenv:test] | ||
[testenv] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to future reviewer: the reason I removed the :test
here is because by making the test run the default environment, every other environment inherits it. The practical consequence of this is that you can do tox -e test-py39
to test against python 3.9, and similar for other versions, without actually having to make environments for every individual python version. Very convenient during development IMO.
One disadvantage is that by declaring it as such, the check
environment also inherits the settings here, except for those fields that it overrides. The only consequence in this config is that that means that the TERMINUSX_TOKEN is also passed to flake8, who completely ignores it. But something to keep in mind.
commands = | ||
pip install -e . | ||
python -m pytest --tb=native --cov=terminusdb_client terminusdb_client/tests/{posargs} --cov-report xml:cov.xml | ||
passenv = TERMINUSX_TOKEN | ||
|
||
|
||
[testenv:deps] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of this was incredibly evil.
The whole point of a build system is to have a single authority for how the build is done. Tox already uses the normal build (through pip install), and yet here we're messing with an entirely different set of requirement files. Pointless and confusing at best, widely divergent at worst.
# Settings for other tools | ||
[flake8] | ||
# S501 is turned off for now, check if the verify=false for request is ok | ||
ignore = E501,W503,S101,S310,A003,E203,S607,S603,S404,W391,N814,N804,S106,F722,S105,E266,S311,N806 | ||
exclude = .*/,__pycache__,docs/,build/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isort is now configurable through the pyproject.toml file, which imo is better.
I'd have liked to move everything there. Unfortunately, flake8 cannot yet do it. Therefore there's still a flake8 section above.
This removes all of the old build system in favor of poetry.
We were still installing the tdbpy tool using the old build script, and maintaining two separate lists of dependencies where tox used a weird mix of both. This only retains poetry.