-
Notifications
You must be signed in to change notification settings - Fork 2
Chore/update linting tools #178
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
Open
mcocdawc
wants to merge
11
commits into
develop
Choose a base branch
from
chore/update-linting-tools
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
11b254a
chore: replace isort/black/flake8 with ruff, add YAML formatter
mcocdawc ad868ba
chore: apply standardized ruff lint select settings
mcocdawc 406207b
chore: use yamlfmt, standardize ruff-check args
mcocdawc 2cf1902
chore: use macisamuele formatter for YAML and TOML
mcocdawc ac29b66
chore: use yamlfmt for YAML, pyproject-fmt for TOML
mcocdawc 87ef0f7
chore: use macisamuele formatter for YAML and TOML
mcocdawc 4b04b47
fixed import sorting
mcocdawc 1a8b4c0
apply commit hooks
mcocdawc 1ed2eb2
fixed few ruff checks manually
mcocdawc af31d9b
fix: wrap long lines to comply with E501 (max 120 chars)
mcocdawc 52d87dc
Merge branch 'develop' of github.com:ecmwf/earthkit-hydro into chore/…
mcocdawc 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ name: cd | |
| on: | ||
| push: | ||
| tags: | ||
| - '**' | ||
| - '**' | ||
|
|
||
| jobs: | ||
| pypi_binwheels: | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ name: test-cd | |
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| branches: ["main"] | ||
|
|
||
| jobs: | ||
| pypi_binwheels: | ||
|
|
||
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,45 +1,43 @@ | ||
| default_language_version: | ||
| python: python3 | ||
| python: python3 | ||
| default_stages: | ||
| - pre-commit | ||
| - pre-push | ||
| - pre-commit | ||
| - pre-push | ||
| repos: | ||
| - repo: https://github.com/charliermarsh/ruff-pre-commit | ||
| rev: v0.5.6 | ||
| hooks: | ||
| - id: ruff # fix linting violations | ||
| types_or: [ python, pyi, jupyter ] | ||
| args: [ --fix ] | ||
| # - id: ruff-format # fix formatting | ||
| # types_or: [ python, pyi, jupyter ] | ||
| - repo: https://github.com/psf/black | ||
| rev: 25.1.0 | ||
| hooks: | ||
| - id: black | ||
| - repo: https://github.com/pycqa/isort | ||
| rev: 5.13.2 | ||
| hooks: | ||
| - id: isort | ||
| - repo: https://github.com/pycqa/flake8 | ||
| rev: 7.0.0 | ||
| hooks: | ||
| - id: flake8 | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.4.0 | ||
| hooks: | ||
| - id: detect-private-key | ||
| - id: check-ast | ||
| - id: end-of-file-fixer | ||
| - id: mixed-line-ending | ||
| args: [--fix=lf] | ||
| - id: trailing-whitespace | ||
| - id: check-case-conflict | ||
| - repo: local | ||
| hooks: | ||
| - id: forbid-to-commit | ||
| name: Don't commit rej files | ||
| entry: | | ||
| Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates. | ||
| Fix the merge conflicts manually and remove the .rej files. | ||
| language: fail | ||
| files: '.*\.rej$' | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.4.0 | ||
| hooks: | ||
| - id: detect-private-key | ||
| - id: check-ast | ||
| - id: end-of-file-fixer | ||
| - id: mixed-line-ending | ||
| args: [--fix=lf] | ||
| - id: trailing-whitespace | ||
| - id: check-case-conflict | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.4 | ||
| hooks: | ||
| - id: ruff-check | ||
| exclude: '(dev/.*|.*_)\.py$' | ||
| args: | ||
| - --line-length=120 | ||
| - --fix | ||
| - --exit-non-zero-on-fix | ||
| - --preview | ||
| - id: ruff-format | ||
| - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks | ||
| rev: v2.16.0 | ||
| hooks: | ||
| - id: pretty-format-yaml | ||
| args: [--autofix, --preserve-quotes] | ||
| - id: pretty-format-toml | ||
| args: [--autofix] | ||
| - repo: local | ||
| hooks: | ||
| - id: forbid-to-commit | ||
| name: Don't commit rej files | ||
| entry: | | ||
| Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates. | ||
| Fix the merge conflicts manually and remove the .rej files. | ||
| language: fail | ||
| files: '.*\.rej$' | ||
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,18 +1,18 @@ | ||
| [package] | ||
| name = "earthkit-hydro" | ||
| version = "0.0.0" # placeholder, will be overwritten | ||
| edition = "2021" | ||
|
|
||
| [dependencies] | ||
| pyo3 = { version = "0.26", features = ["extension-module"] } | ||
| fixedbitset = "0.5" | ||
| numpy = "0.26" | ||
| pyo3 = {version = "0.26", features = ["extension-module"]} | ||
| rayon = "1.7" | ||
| fixedbitset = "0.5" | ||
|
|
||
| [lib] | ||
| crate-type = ["cdylib"] | ||
| # See https://github.com/PyO3/pyo3 for details | ||
| name = "_rust" # private module to be nested into Python package | ||
| path = "rust/lib.rs" | ||
| crate-type = ["cdylib"] | ||
|
|
||
| [package] | ||
| edition = "2021" | ||
| name = "earthkit-hydro" | ||
| version = "0.0.0" # placeholder, will be overwritten | ||
|
|
||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
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
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.