Skip to content

Conversation

@imprvhub
Copy link
Contributor

  • Update Django from 5.1 to 5.1.4
  • Enhance test suite with Django configuration checks
  • Add database connection verification
  • Ensure all core Django functionalities work properly

Fixes #3

- Update Django from 5.1 to 5.1.4
- Enhance test suite with Django configuration checks
- Add database connection verification
- Ensure all core Django functionalities work properly

Fixes libresource#3
Copy link
Member

@quillcraftsman quillcraftsman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your PR.

It's good that you updated Django package version and add some new test.
There are some problems here:

  1. GitHub test action was failed: https://github.com/libresource/pygenesis-django/actions

It happened because of try-except blocks in test code:

try:
    call_command('check')
except Exception as e:
    self.fail(f"Django management command failed: {str(e)}")

Only one part of the code will be run. It don't make much sence in the test we can keep only one of this parts without try-except block

  1. It's strange that GitHub actions wasn't run in your forked repo. May be you should accept some policies in Actions tab.

  2. I think lint action will failed too: https://github.com/libresource/pygenesis-django/blob/main/.github/workflows/lint.yml
    Now this action starts only on push. Could you please add pull-request like this:

on: [push, pull_request]

Please make all checks locally first:
make lint, make test, make coverage

Then in your repository all actions should be green.

Thanks a lot of your help!

- Removed try-except block from test_django_configuration and test_database_connection to ensure proper execution of tests.
- Updated `lint.yml` GitHub Actions configuration to trigger on both push and pull_request events.
- Improved test clarity and streamlined error handling.
- Ensured all tests pass locally before pushing changes.

This update resolves issues with failed tests and ensures GitHub Actions run correctly in pull requests.

closes libresource#3
@imprvhub
Copy link
Contributor Author

Thanks a lot for your feedback and suggestions!

I've implemented the changes you recommended:

-Removed the try-except block from the test code in tests.py.
-Updated the lint.yml file to trigger on both push and pull_request events.
I've also run all tests locally, and everything should now pass successfully. Let me know if there's anything else you'd like me to address.

Copy link
Member

@quillcraftsman quillcraftsman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! PR Approved to merge. I will merge it and then create new pypi package release.

@quillcraftsman quillcraftsman merged commit 54cde55 into libresource:main Dec 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Django version

2 participants