-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ned Molter <[email protected]>
- Loading branch information
Showing
144 changed files
with
3,322 additions
and
2,476 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# automatically requests pull request reviews for files matching the given pattern; the last match takes precendence | ||
# automatically requests pull request reviews for files matching the given pattern; the last match takes precedence | ||
|
||
* @spacetelescope/stdatamodels-maintainers |
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,35 @@ | ||
exclude: ".*\\.asdf$" | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-yaml | ||
args: ["--unsafe"] | ||
- id: check-toml | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: debug-statements | ||
- id: detect-private-key | ||
# - id: end-of-file-fixer | ||
# - id: trailing-whitespace | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: 'v0.9.2' | ||
hooks: | ||
- id: ruff | ||
args: ["--fix"] | ||
- id: ruff-format | ||
# - repo: https://github.com/numpy/numpydoc | ||
# rev: v1.8.0 | ||
# hooks: | ||
# - id: numpydoc-validation | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.4.0 | ||
hooks: | ||
- id: codespell | ||
args: ["--write-changes"] | ||
additional_dependencies: | ||
- tomli |
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,70 @@ | ||
extend = "pyproject.toml" | ||
|
||
exclude = [ | ||
".git", | ||
"__pycache__", | ||
"docs", | ||
".eggs", | ||
"build", | ||
"dist", | ||
".tox", | ||
".eggs", | ||
] | ||
line-length = 100 | ||
target-version = "py310" | ||
|
||
[format] | ||
quote-style = "double" | ||
indent-style = "space" | ||
docstring-code-format = true | ||
|
||
[lint] | ||
select = [ | ||
"F", # Pyflakes (part of default flake8) | ||
"E", # pycodestyle (part of default flake8) | ||
"W", # pycodestyle (part of default flake8) | ||
#"D", # docstrings, see also numpydoc pre-commit action | ||
"N", # pep8-naming (naming conventions) | ||
"A", # flake8-builtins (prevent shadowing of builtins) | ||
#"ARG", # flake8-unused-arguments (prevent unused arguments) | ||
"B", # flake8-bugbear (miscellaneous best practices to avoid bugs) | ||
"C4", # flake8-comprehensions (best practices for comprehensions) | ||
"ICN", # flake8-import-conventions (enforce import conventions) | ||
"INP", # flake8-no-pep420 (prevent use of PEP420, i.e. implicit name spaces) | ||
"ISC", # flake8-implicit-str-concat (conventions for concatenating long strings) | ||
"LOG", # flake8-logging | ||
"NPY", # numpy-specific rules | ||
"PGH", # pygrep-hooks (ensure appropriate usage of noqa and type-ignore) | ||
"PTH", # flake8-use-pathlib (enforce using Pathlib instead of os) | ||
"S", # flake8-bandit (security checks) | ||
"SLF", # flake8-self (prevent using private class members outside class) | ||
"SLOT", # flake8-slots (require __slots__ for immutable classes) | ||
"T20", # flake8-print (prevent print statements in code) | ||
"TRY", # tryceratops (best practices for try/except blocks) | ||
"UP", # pyupgrade (simplified syntax allowed by newer Python versions) | ||
"YTT", # flake8-2020 (prevent some specific gotchas from sys.version) | ||
] | ||
ignore = [ | ||
"D100", # missing docstring in public module | ||
"E741", # ambiguous variable name (O/0, l/I, etc.) | ||
"UP008", # use super() instead of super(class, self). no harm being explicit | ||
"UP015", # unnecessary open(file, "r"). no harm being explicit | ||
"TRY003", # prevents custom exception messages not defined in exception itself. | ||
"ISC001", # single line implicit string concatenation. formatter recommends ignoring this. | ||
"PTH123", # use Path.open instead of open | ||
"UP038", # isinstance with | instead of , | ||
# longer term fix | ||
"S101", # asserts are used in many non-test places | ||
"SLF001", # private member access, this is overly restrictive | ||
] | ||
|
||
[lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[lint.flake8-annotations] | ||
ignore-fully-untyped = true # Turn of annotation checking for fully untyped code | ||
|
||
[lint.per-file-ignores] | ||
"**/test_*.py" = ["S101", "SLF001", "B011"] | ||
"tests/**" = ["INP001"] | ||
"src/stdatamodels/jwst/datamodels/darkMIRI.py" = ["N999"] |
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 @@ | ||
Apply style checks to code to match jwst. |
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
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
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.