-
Notifications
You must be signed in to change notification settings - Fork 49
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
Refactor dev (setup) #586
Refactor dev (setup) #586
Conversation
Hey @m6121 @MyPyDavid @triole , I pushed my setup.cfg setup. Basically everything moves to |
After installing https://pre-commit.com/#install SKIP=flake8,black,blacken-docs,trailing-whitespace,end-of-file-fixer git commit -m ...
# to see the pre-commit changes on all files
pre-commit run --all-files so that all of the |
our workflows run double on a push to a PR, Ive found this https://github.com/orgs/community/discussions/26276 and added it here. .. but I see now it didnt run on this commit.. |
Good idea, I would not run it on branches (except |
I just tried this with another repo, and now I think it would be much better to only run tests on push and not on PR or tags. It is just super weird when you try to fix some tests and nothing is happening. Also the workflow to |
This comment was marked as resolved.
This comment was marked as resolved.
Hi @afuetterer , sadly pytoml is only supported from Python 3.10 on, which is to high for us. Seperating pytest stuff from the actual rdmo dependecies makes sense. When the dependencies are in setup.cfg, we don't need them in requirements.txt anyway. Nowadays, I usually create package like here https://github.com/ISI-MIP/isimip-publisher. |
This comment was marked as resolved.
This comment was marked as resolved.
thanks @afuetterer, think this is really nice! I've tested it locally with |
Thanks again @afuetterer , I tested it with Python 3.7 and it works fine (without
and
|
This comment was marked as resolved.
This comment was marked as resolved.
Hi @jochenklar, could you point this PR to another branch (dev-1.10.0 is already merged) and rebase? |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
note: usage of pyproject.toml for project setup is not possible in Python 3.6.
I will look into the failing tests tomorrow, some of the tests are not correct and need to be rewritten.
|
I could sort of randomly reproduce the failing tests locally, there were only |
This branch is old enough, I think we accomplished most of what we wanted. I will run ruff on all files, and merge later today or in the next days. |
Yay for fixing the failing tests. |
One question though: What is the rationale behind testing the different db backends? The Django project does extensive testing of the backends already. They shoul all work, right? Wouldnt it maybe be enough to e.g. test only pgsql? |
thanks for fixing the tests!
No, we have had a bug where it mattered if the the db backend was mysql, sqlite or postgres. Only thing that was missing was the actual test for it ;) ... The same django queries on different dbs can yield different results.. |
@afuetterer I think I like to test both mysql and postgres since there are always subtile differences between the backends. But I am also not sure if we will catch all those with tests. |
As sqlite is not recommended for production anyway, could these tests be removed then? |
…toring Refactor dev (setup)
This PR serves as a collection of some minor improvements to the development (setup). In particular it introduces the following changes:
./manage.py makemigrations
->no changes detected
)Add Github Actions check forcompilemessages