-
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
Add pyproject.toml to dev-setup-ractoring #664
Add pyproject.toml to dev-setup-ractoring #664
Conversation
9b1729e
to
09907eb
Compare
note: usage of pyproject.toml for project setup is not possible in Python 3.6.
this additional library runs pytest cases in random order every time. It helps identifying dependent test cases.
09907eb
to
65fe8a1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
How big is the difference between md5 hashing and the regular PBKDF2? If we change the settings I would also change the settings in my dev setup (which is documented here: https://github.com/rdmorganiser/rdmo/blob/master/docs/dev.md). The idea is to use the same fixtures for development as for testing. |
This comment was marked as resolved.
This comment was marked as resolved.
- run: python -Im pip install -e .[dev] | ||
- run: python -Ic 'import rdmo; print(rdmo.__version__)' | ||
|
||
required-checks-pass: |
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.
This check can be set as required in pull requests.
This comment was marked as resolved.
This comment was marked as resolved.
Yes, thanks, then I will just update my dev setup here when I use the fixtures in testing. |
You want to use this instead to speed up things even more? |
I tried the plaintext stuff and luckily it is not faster than md5. It it probably about the rotations and not about the algorithm.
|
The other new settings don't seem to make anything faster (for |
even more impressive, this is only the md5 hasher. I am checking the other options, but I think we can remove them (except the DEBUG settings). We could also put the logging part in the mysql/postgres/sqlite files so that they are still used locally. |
I think that the password fixtures for development are now broken. Should this hashing algorithm also be part of the
|
Hi there,
update: This PR got a little bit out of hand and I added a few more suggestions. Please let me know what we think.
My goal was to bring down the durations of your CI runs, which I succesfully did.
CI duration
I saw that your test suite has an impressive number of > 17k tests. The runtime of a single test run (one Python version + one DB) on CI took between 1 and 2 hours. So enough time for coffee and lunch. The PR proposes a few performance improvement in your test suite as well your CI setup.
Proposed changes (succesfully tested)
So far all tests are still working and the run time came done to ~ 15 minutes per run. This is still enough time for coffee, but not for lunch anymore. I think you could do even better with more tweaks. But please let me know what you think.
For example: Do you really need to run the tests against sqlite in CI? Actually you test Django's capability to handle different backends, right?
Unable (unsuccesfully tested)
TOML setup
There is still room for improvement, but I wanted to suggest the toml for further discussion.
I added the following dependency groups:
But tests, dev and ci are pretty similar.
Do you want to enforce using pre-commit for contributors? That is always a good idea. But if you want to use isort, flake8, (maybe black), you need to have on linting/reformatting-PR, I guess with the described 600+ files being changed. Also pre-commit should run on CI.
Flake8 sadly cannot be configured using the toml file. I would nowadays always recommend using ruff, which is really great and fast and adopted by major projects like pandas. ruff can replace isort and flake8 in my opinion.
Another question is still #648. The installation process using the toml file does not work with Python 3.6.
What do you think?