-
Notifications
You must be signed in to change notification settings - Fork 19
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
fix: improved testing environment and fixed existing errors #35
Conversation
Taking a look into implementing a test for "basic functionality" now. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #35 +/- ##
===========================================
+ Coverage 31.18% 62.12% +30.94%
===========================================
Files 11 11
Lines 404 404
Branches 61 61
===========================================
+ Hits 126 251 +125
+ Misses 278 137 -141
- Partials 0 16 +16 ☔ View full report in Codecov by Sentry. |
Just pushed the commits including tests to cover some basic functionality of this project. I also included skipped tests with 8daa9b6. Those would cover more functionality of the imports but since I get errors for the I think the currently "able to run" tests are a good base for future implementations / changes. |
@fsbraun I'd put this changes up for review now. |
@wfehr Excellent work! Thank you! |
Hope I didn't interfere anything with my foce-push now ;) I rebased the branch onto the current The Dockerfile is used for running the tests locally via With this setup you can run tests a little easier with different python-versions for example. |
@@ -2,3 +2,6 @@ | |||
django-app-helper | |||
tox | |||
coverage | |||
black |
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.
We're using ruff for linting and formatting, so we could merge this with black and the old linting setup and tackle ruff as a separate task. But just wanted to raise this here.
It's in pre-commit for django-cms itself; https://github.com/django-cms/django-cms/blob/develop-4/.pre-commit-config.yml#L41
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.
I can also throw out the commits for "including black"/"formatting running black" if and maybe switch it with ruff
for the development process?
Or what would be the workflow you'd want?
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.
I don't mind the code being formatted with black because the ruff formatter is about 97% the same.
The workflow/process around this area on the whole is using pre-commit hooks;
https://github.com/django-cms/django-cms/blob/develop-4/.pre-commit-config.yml
Combined with a github action that runs the linter;
https://github.com/django-cms/django-cms/blob/develop-4/.github/workflows/linters.yml
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.
Alright, then I'd leave that 'as is' for now.
@wfehr I understand why you're using Docker for testing, but I would like to keep the test setup similar for all django-cms packages. Can you update the tox.ini to run without Docker? We can run the specific python versioned tests in the github actions. |
- sorting inside project files - configuration of sections (removed LIB since it is not defined as "known") - changes for isort 5: - removed deprecated "-rc" (recursive is done by default now) - "-df" -> "--df"
- installed freezegun to fix datetime-values
…the test - those tests need fixing in the future to cover more functionality with tests
I updated the branch and removed docker from the first commit (34b3bcc => 541b434). |
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 is great work! Thank you @wfehr !! 🚀
Setup a better testing-environment for running tests locally.
This is done via
docker(-compose)
.Other changes:
black
for standardized code formattingisort
errorsThis changes are a good base for future test-implementation. Also some of the occuring errors are getting fixed.