-
Notifications
You must be signed in to change notification settings - Fork 5
fix(process_updates): Fix expirations, cleanup syncing, and add integration tests #157
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
Merged
crankynetman
merged 19 commits into
main
from
topic/chriscummings/fix-process-updates-expirations
Dec 19, 2025
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1ec19ea
attempt(model_history): try adding model history relation
crankynetman c6d2712
refactor(views): move to simple and less migration-oriented way of ge…
crankynetman b82aa43
Merge branch 'main' into topic/chriscummings/fix-process-updates-expi…
crankynetman ce380f4
refactor(process_updates): cleanup entry processing logic and separat…
crankynetman 0a3151b
Merge branch 'main' into topic/chriscummings/fix-process-updates-expi…
crankynetman 0d25230
Merge branch 'main' into topic/chriscummings/fix-process-updates-expi…
crankynetman 8c8790b
fix(local): actually use postgres in local.
crankynetman 3dace95
fix(process_updates): fix all the pending todos from the MR.
crankynetman 913d33a
chore(typo): fix typo, good catch!
crankynetman cedb277
docs(decisions): updated decisions.md for syncing bug
crankynetman a8b1d10
feat(route_manager): bubble up the entries we process to the HTTP res…
crankynetman 9c7ad89
tests(syncing): Add behave and pytest to cover syncing in more detail…
crankynetman 2f12323
Merge branch 'main' into topic/chriscummings/fix-process-updates-expi…
crankynetman fc3c4d3
chore(pyproject): remove dupe
crankynetman beedbc0
chore(tests): slap a variable on django url
crankynetman 9d736e3
tests(syncing): clean up tests way more and introduce integration tes…
crankynetman 29918a2
chore(typo): fix space issue
crankynetman 631bbb9
chore(tests): remove duplicated code I had copied over.
crankynetman 054086b
chore(formatting): ruff ruff update (dmx-style)
crankynetman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,139 +1,141 @@ | ||
| # ==== pytest ==== | ||
| [tool.pytest.ini_options] | ||
| minversion = "6.0" | ||
| addopts = "--ds=config.settings.test --reuse-db" | ||
| minversion = "6.0" | ||
| python_files = [ | ||
| "tests.py", | ||
| "test_*.py", | ||
| "tests.py", | ||
| "test_*.py", | ||
| ] | ||
|
|
||
| # ==== Coverage ==== | ||
| [tool.coverage.run] | ||
| branch = true | ||
| data_file = "coverage.coverage" | ||
| include = ["scram/*", "config/*", "translator/*"] | ||
| omit = ["**/migrations/*", "scram/contrib/*", "*/tests/*"] | ||
| plugins = ["django_coverage_plugin"] | ||
| branch = true | ||
| data_file = "coverage.coverage" | ||
|
|
||
| [tool.coverage.report] | ||
| exclude_also = [ | ||
| "if debug:", | ||
| "if self.debug:", | ||
| "if settings.DEBUG", | ||
| "raise AssertionError", | ||
| "raise NotImplementedError", | ||
| "if __name__ == .__main__.:", | ||
| ] | ||
| "if debug:", | ||
| "if self.debug:", | ||
| "if settings.DEBUG", | ||
| "raise AssertionError", | ||
| "raise NotImplementedError", | ||
| "if __name__ == .__main__.:", | ||
| ] | ||
|
|
||
| # ===== ruff ==== | ||
| [tool.ruff] | ||
| exclude = [ | ||
| "migrations", | ||
| "migrations", | ||
| ] | ||
|
|
||
| line-length = 119 | ||
| target-version = 'py312' | ||
| preview = true | ||
| target-version = 'py312' | ||
|
|
||
| [tool.ruff.lint] | ||
| select = [ | ||
| "A", # builtins | ||
| "ASYNC", # async | ||
| "B", # bugbear | ||
| "BLE", # blind-except | ||
| "C4", # comprehensions | ||
| "C90", # complexity | ||
| "COM", # commas | ||
| "D", # pydocstyle | ||
| "DJ", # django | ||
| "DOC", # pydoclint | ||
| "DTZ", # datetimez | ||
| "E", # pycodestyle | ||
| "EM", # errmsg | ||
| "ERA", # eradicate | ||
| "F", # pyflakes | ||
| "FBT", # boolean-trap | ||
| "FLY", # flynt | ||
| "G", # logging-format | ||
| "I", # isort | ||
| "ICN", # import-conventions | ||
| "ISC", # implicit-str-concat | ||
| "LOG", # logging | ||
| "N", # pep8-naming | ||
| "PERF", # perflint | ||
| "PIE", # pie | ||
| "PL", # pylint | ||
| "PTH", # use-pathlib | ||
| "Q", # quotes | ||
| "RET", # return | ||
| "RSE", # raise | ||
| "RUF", # Ruff | ||
| "S", # bandit | ||
| "SIM", # simplify | ||
| "SLF", # self | ||
| "SLOT", # slots | ||
| "T20", # print | ||
| "TRY", # tryceratops | ||
| "UP", # pyupgrade | ||
| ] | ||
| ignore = [ | ||
| "COM812", # handled by the formatter | ||
| "DOC501", # add possible exceptions to the docstring (TODO) | ||
| "ISC001", # handled by the formatter | ||
| "RUF012", # need more widespread typing | ||
| "SIM102", # use a single `if` statement instead of nested `if` statements | ||
| "SIM108", # use ternary operator instead of `if`-`else`-block | ||
| "PERF401", # list comprehensions are harder to read in our opinion and not worth the performance gain | ||
| "PERF403", # dict comprehensions are harder to read in our opinion and not worth the performance gain | ||
| "COM812", # handled by the formatter | ||
| "DOC501", # add possible exceptions to the docstring (TODO) | ||
| "ISC001", # handled by the formatter | ||
| "RUF012", # need more widespread typing | ||
| "SIM102", # use a single `if` statement instead of nested `if` statements | ||
| "SIM108", # use ternary operator instead of `if`-`else`-block | ||
| "PERF401", # list comprehensions are harder to read in our opinion and not worth the performance gain | ||
| "PERF403", # dict comprehensions are harder to read in our opinion and not worth the performance gain | ||
| ] | ||
| select = [ | ||
| "A", # builtins | ||
| "ASYNC", # async | ||
| "B", # bugbear | ||
| "BLE", # blind-except | ||
| "C4", # comprehensions | ||
| "C90", # complexity | ||
| "COM", # commas | ||
| "D", # pydocstyle | ||
| "DJ", # django | ||
| "DOC", # pydoclint | ||
| "DTZ", # datetimez | ||
| "E", # pycodestyle | ||
| "EM", # errmsg | ||
| "ERA", # eradicate | ||
| "F", # pyflakes | ||
| "FBT", # boolean-trap | ||
| "FLY", # flynt | ||
| "G", # logging-format | ||
| "I", # isort | ||
| "ICN", # import-conventions | ||
| "ISC", # implicit-str-concat | ||
| "LOG", # logging | ||
| "N", # pep8-naming | ||
| "PERF", # perflint | ||
| "PIE", # pie | ||
| "PL", # pylint | ||
| "PTH", # use-pathlib | ||
| "Q", # quotes | ||
| "RET", # return | ||
| "RSE", # raise | ||
| "RUF", # Ruff | ||
| "S", # bandit | ||
| "SIM", # simplify | ||
| "SLF", # self | ||
| "SLOT", # slots | ||
| "T20", # print | ||
| "TRY", # tryceratops | ||
| "UP", # pyupgrade | ||
| ] | ||
|
|
||
| [tool.ruff.lint.mccabe] | ||
| max-complexity = 7 # our current code adheres to this without too much effort | ||
|
|
||
| [tool.ruff.lint.per-file-ignores] | ||
| "**/{tests}/*" = [ | ||
| "DOC201", # documenting return values | ||
| "DOC402", # documenting yield values | ||
| "PLR6301", # could be a static method | ||
| "S101", # use of assert | ||
| "S106", # hardcoded password | ||
| "PLR2004" # magic value used in comparison | ||
| "**/tests/**" = [ | ||
| "C901", # function is too complex (applies to test helpers) | ||
| "DOC201", # documenting return values | ||
| "DOC402", # documenting yield values | ||
| "FBT002", # boolean default argument in function definition | ||
| "PLR6301", # could be a static method | ||
| "S101", # use of assert | ||
| "S106", # hardcoded password | ||
| "PLR2004", # magic value used in comparison | ||
| ] | ||
| "test.py" = [ | ||
| "S105", # hardcoded password as argument | ||
| "**/views.py" = [ | ||
| "DOC201", # documenting return values; it's fairly obvious in a View | ||
| ] | ||
| "scram/route_manager/**" = [ | ||
| "DOC201", # documenting return values | ||
| "DOC201", # documenting return values | ||
| ] | ||
| "scram/users/**" = [ | ||
| "DOC201", # documenting return values | ||
| "FBT001", # minimal issue; don't need to mess with in the User app | ||
| "PLR2004", # magic values when checking HTTP status codes | ||
| "DOC201", # documenting return values | ||
| "FBT001", # minimal issue; don't need to mess with in the User app | ||
| "PLR2004", # magic values when checking HTTP status codes | ||
| ] | ||
| "**/views.py" = [ | ||
| "DOC201", # documenting return values; it's fairly obvious in a View | ||
| "test.py" = [ | ||
| "S105", # hardcoded password as argument | ||
| ] | ||
|
|
||
| [tool.ruff.lint.pydocstyle] | ||
| convention = "google" | ||
|
|
||
| # ==== mypy ==== | ||
| [tool.mypy] | ||
| python_version = "3.11" | ||
| check_untyped_defs = true | ||
| ignore_missing_imports = true | ||
| warn_unused_ignores = true | ||
| warn_redundant_casts = true | ||
| warn_unused_configs = true | ||
| plugins = [ | ||
| "mypy_django_plugin.main", | ||
| "mypy_drf_plugin.main", | ||
| "mypy_django_plugin.main", | ||
| "mypy_drf_plugin.main", | ||
| ] | ||
| python_version = "3.11" | ||
| warn_redundant_casts = true | ||
| warn_unused_configs = true | ||
| warn_unused_ignores = true | ||
|
|
||
| [[tool.mypy.overrides]] | ||
| # Django migrations should not produce any errors: | ||
| module = "*.migrations.*" | ||
| ignore_errors = true | ||
| module = "*.migrations.*" | ||
|
|
||
| [tool.django-stubs] | ||
| django_settings_module = "config.settings.test" | ||
17 changes: 0 additions & 17 deletions
17
scram/route_manager/tests/acceptance/features/syncing_entries.feature
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.