-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit and implement automatic linting and formatting (#544)
- Loading branch information
Showing
57 changed files
with
4,482 additions
and
3,197 deletions.
There are no files selected for viewing
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,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/gwcs-maintainers | ||
* @spacetelescope/gwcs-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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,3 @@ updates: | |
actions: | ||
patterns: | ||
- "*" | ||
|
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,61 @@ | ||
ci: | ||
autofix_prs: false | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ["--enforce-all", "--maxkb=300"] | ||
# Prevent giant files from being committed. | ||
- id: check-case-conflict | ||
# Check for files with names that would conflict on a case-insensitive | ||
# filesystem like MacOS HFS+ or Windows FAT. | ||
- id: check-json | ||
# Attempts to load all json files to verify syntax. | ||
- id: check-merge-conflict | ||
# Check for files that contain merge conflict strings. | ||
- id: check-symlinks | ||
# Checks for symlinks which do not point to anything. | ||
- id: check-toml | ||
# Attempts to load all TOML files to verify syntax. | ||
- id: check-xml | ||
# Attempts to load all xml files to verify syntax. | ||
- id: check-yaml | ||
# Attempts to load all yaml files to verify syntax. | ||
- id: detect-private-key | ||
# Checks for the existence of private keys. | ||
- id: end-of-file-fixer | ||
# Makes sure files end in a newline and only a newline. | ||
exclude: ".*(data.*)$" | ||
# - id: fix-encoding-pragma # covered by pyupgrade | ||
- id: trailing-whitespace | ||
# Trims trailing whitespace. | ||
exclude_types: [python] # Covered by Ruff W291. | ||
exclude: ".*(data.*)$" | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: rst-directive-colons | ||
# Detect mistake of rst directive not ending with double colon. | ||
- id: rst-inline-touching-normal | ||
# Detect mistake of inline code touching normal text in rst. | ||
- id: text-unicode-replacement-char | ||
# Forbid files which have a UTF-8 Unicode replacement character. | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
args: ["--write-changes"] | ||
additional_dependencies: | ||
- tomli | ||
exclude: ".*.asdf" | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.9 | ||
hooks: | ||
- id: ruff | ||
args: ["--fix", "--show-fixes"] | ||
- id: ruff-format |
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,5 @@ | ||
Please open a new issue or new pull request for bugs, feedback, or new features you would like to see. If there is an issue you would like to work on, please leave a comment and we will be happy to assist. New contributions and contributors are very welcome! | ||
|
||
New to github or open source projects? If you are unsure about where to start or haven't used github before, please feel free to contact the package maintainers. | ||
New to github or open source projects? If you are unsure about where to start or haven't used github before, please feel free to contact the package maintainers. | ||
|
||
Feedback and feature requests? Is there something missing you would like to see? Please open an issue or send an email to the maintainers. This package follows the Spacetelescope [Code of Conduct](CODE_OF_CONDUCT.md) strives to provide a welcoming community to all of our users and contributors. |
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.