-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update github actions and add black linter for PRs (#475)
- update pypi action to use OIDC trusted publisher mgmt - generalize the flake8 action to a general linting action and add black - put flake8 config parameters into a separate file (.flake8) - update versions of actions/pre-commit hooks - specify uml updates only need to run on PRs to development - do not run uml updates on PRs into main #449) - update docs config files to be compliant - temporarily ignore many flake8 error codes until legacy files are updated
- Loading branch information
1 parent
690ef17
commit 5319fb4
Showing
8 changed files
with
85 additions
and
28 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,41 @@ | ||
[flake8] | ||
#GOAL: max_line_length = 79 or 99 | ||
max_line_length = 99 | ||
per-file-ignores = | ||
# too many leading '#' for block comment | ||
*/tests/*:E266 | ||
# line too long (several test strs) | ||
test_granules.py:E501 | ||
# imported but unused | ||
__init__.py:F401 | ||
# import not at top of file | ||
doc/source/conf.py:E402 | ||
|
||
# GOAL: remove these ignores | ||
ignore = | ||
# line too long | ||
E501 | ||
# comparison syntax | ||
E711 | ||
# comparison syntax | ||
E712 | ||
# comparison syntax in tests | ||
E714 | ||
# comparison syntax in tests | ||
E721 | ||
# bare except | ||
E722 | ||
# ambiguous var name | ||
E741 | ||
# imported but unused | ||
F401 | ||
# unable to detect undefined names | ||
F403 | ||
# assigned and unused (in tests) | ||
F841 | ||
# line break before binary operator | ||
W503 | ||
|
||
# GOAL: | ||
# syntax check doctests in docstrings | ||
# doctests = True |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Run linters on PRs | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- development | ||
- main | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run black linter | ||
uses: psf/black@stable | ||
# use the flake8 linter to annotate improperly formatted code | ||
# note linter arguments are supplied via the .flake8 config file | ||
- name: Annotate PR after running flake8 | ||
uses: TrueBrain/actions-flake8@v2 | ||
|
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
rev: 23.12.0 | ||
hooks: | ||
- id: black | ||
- id: black | ||
|
||
# you can run `pre-commit autoupdate` to automatically update to the latest version of hooks! |
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