-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* IN-896 App stabilization: Update Python version and dependencies Why these changes are being introduced: * Keeping our Python version and dependencies updated is good practice and allows us to take advantage of the latest security updates and bug fixes for Python. How this addresses that need: * Update Dockerfile * Update Pipfile * Update .python-version Side effects of this change: * None Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/IN-896 * IN-896 App stabilization: add linters and pre-commit hooks Why these changes are being introduced: * We updated our method for managing linters and code formatting for our Python projects to simplify configuration and use. How this addresses that need: * Apply standard pyproject.toml file * Deprecate setup.cfg * Apply linting with Ruff * Set black, mypy, ruff, and safety as linters * Add pre-commit hooks * Update Makefile * Update Pipfile Side effects of this change: * None Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/IN-896 * Updates after merge of #144 * Update imports, type hinting, and datetime calls in webhook modules * Update mypy command in Makefile * Update dependencies * Update _test_env fixture and datetime calls in conftest module * Update test_validate_missing_signature_returns_false with more explicit error check --------- Co-authored-by: Eric Hanson <ehanson@mit.edu>
- Loading branch information
1 parent
a8d1a58
commit f8f7d96
Showing
14 changed files
with
373 additions
and
274 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
default_language_version: | ||
python: python3.11 # set for project python version | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: black-apply | ||
name: black-apply | ||
entry: pipenv run black | ||
language: system | ||
pass_filenames: true | ||
types: ["python"] | ||
- id: mypy | ||
name: mypy | ||
entry: pipenv run mypy | ||
exclude: tests/ | ||
language: system | ||
pass_filenames: true | ||
types: ["python"] | ||
- id: ruff-apply | ||
name: ruff-apply | ||
entry: pipenv run ruff check --fix | ||
language: system | ||
pass_filenames: true | ||
types: ["python"] | ||
- id: safety | ||
name: safety | ||
entry: pipenv check | ||
language: system | ||
pass_filenames: false |
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 +1 @@ | ||
3.10.10 | ||
3.11.2 |
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
Oops, something went wrong.