-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update tox for newer version of python and packages.
- removed redundant package versions. - moved to ruff, ran on all files, and fixed all errors. - removed isort, flake8, and black - added docker-compose.yml to create a redis server for running tox tests. - Updated CHANGES.md with what we have done. - Update makefile and added some new commands. - Updated README.md
- Loading branch information
Showing
25 changed files
with
263 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,13 +22,7 @@ runs: | |
- name: Start Redis | ||
uses: supercharge/[email protected] | ||
|
||
- name: tox tests for python 3.7 | ||
- name: tox tests | ||
shell: bash | ||
if: ${{inputs.python-version == '3.7'}} | ||
run: tox -e py37-django22-drf38,py37-django22-drf39,py37-django22-drf310,py37-django22-drf311,py37-django22-drf312,py37-django22-drf313,py37-django32-drf311,py37-django32-drf312,py37-django32-drf313 | ||
|
||
- name: tox tests for python >= 3.8 | ||
shell: bash | ||
if: ${{inputs.python-version != '3.7'}} | ||
run: | | ||
tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.2 | ||
hooks: | ||
- id: ruff | ||
alias: autoformat | ||
args: [--fix] | ||
language_version: python3.9 | ||
- id: ruff-format | ||
language_version: python3.9 | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-bugbear] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
- id: forbid-new-submodules | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
language_version: python3.12 | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-vcs-permalinks | ||
- id: check-xml | ||
- id: check-yaml | ||
- id: debug-statements | ||
language_version: python3.9 | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
- id: forbid-new-submodules | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: no-commit-to-branch | ||
args: [--branch=master] | ||
- id: trailing-whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# https://docs.astral.sh/ruff/tutorial/#configuration | ||
# https://docs.astral.sh/ruff/settings/ | ||
# Set the maximum line length to 88. | ||
line-length = 88 | ||
indent-width = 4 | ||
target-version="py39" | ||
|
||
[lint] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"C", | ||
"DJ", # flake8-django | ||
"E", # pycodestyle | ||
"F", # Pyflakes | ||
"I", # isort | ||
"PL", # pylint | ||
"UP", # pyupgrade | ||
"W", | ||
"B9" | ||
] | ||
ignore = ["E203", "B904", "DJ001", "DJ006", "W191"] | ||
|
||
|
||
# Add the `line-too-long` rule to the enforced rule set. By default, Ruff omits rules that | ||
# overlap with the use of a formatter, like Black, but we can override this behavior by | ||
# explicitly adding the rule. | ||
extend-select = ["E501"] | ||
|
||
[format] | ||
quote-style = "double" | ||
indent-style = "space" | ||
|
||
[lint.isort] | ||
known-first-party = ["deployer"] | ||
|
||
[lint.mccabe] # DO NOT INCREASE THIS VALUE | ||
max-complexity = 18 # default: 10 | ||
|
||
[lint.pylint] | ||
max-args = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3.8' | ||
|
||
services: | ||
redis: | ||
image: redis:7 # Use the desired Redis version | ||
container_name: redis_local | ||
ports: | ||
- "6379:6379" # Maps host port 6379 to container port 6379 | ||
command: ["redis-server", "--appendonly", "yes"] # Enables persistence | ||
volumes: | ||
- redis_data:/data # Persist data | ||
|
||
volumes: | ||
redis_data: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.