-
Notifications
You must be signed in to change notification settings - Fork 1
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 filtering Hit model by ip to include the HitCount model instance #38
base: main
Are you sure you want to change the base?
Conversation
Hey @karimabdelhakim thanks for the contribution. I hope I can find some time to fix the CI pipeline soon, it would be great if you have time and want to take a stab at it. Let me know if you need any help. |
update python and django versions
update python 3.7 to 3.7.1 as 3.7.0 no longer exists in https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
change 3.7.1 to 3.7 and change actions/setup-python@v2 to v4
change actions/setup-python@v4 to v5 and actions/checkout@v2 to actions/checkout@v4
change setup-python@v4 to v5
downgrade ubuntu version to ubuntu-22.04 to support python 3.7
add more django versions to envlist
Hey @abhiabhi94 i did some changes hopefully this works |
Hi @abhiabhi94 CI pipeline is fixed |
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.
Thanks for the contribution.
Please move the changes for CI to a separate commit or PR. It will allow the future us to easily come back and review the change set.
Let me know if you get stuck anywhere.
@@ -64,23 +64,23 @@ jobs: | |||
|
|||
tests: | |||
name: Python ${{ matrix.python-version }} | |||
runs-on: ubuntu-latest | |||
runs-on: ubuntu-22.04 |
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.
why this change?
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 |
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.
can you please make the changes to CI in a separate commit or PR? the rationale is to keep the commit history clean, so that it makes sense to look back at a change set for the future us.
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.
Do you think it makes sense to track the changes in this file? I would say no. feel free to remove this from the version control
@@ -43,6 +43,9 @@ deps = | |||
dj31: Django>=3.1,<3.2 | |||
dj32: Django>=3.2,<3.3 | |||
dj40: Django>=4.0,<4.1 | |||
dj42: Django>=4.2,<4.3 | |||
dj50: Django>=5.0,<5.1 | |||
dj51: Django>=5.1,<5.2 | |||
djmain: https://github.com/django/django/archive/main.tar.gz |
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.
if main was removed from the testing above, this too can be removed. it was used to test the changes with the bleeding edge of django, to allow for faster feedback.
include the HitCount model instance in the has_limit_reached_by_ip method to filter the Hit model by the IP and HitCount instance as it is done in the has_limit_reached_by_session method