forked from geofileops/geobenchmark
-
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.
Merge remote-tracking branch 'upstream/main' into pr/27
- Loading branch information
Showing
9 changed files
with
183 additions
and
30 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,27 @@ | ||
# This workflow will install Python dependencies and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main, 0.** ] | ||
pull_request: | ||
branches: [ main, 0.** ] | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Linting: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- uses: pre-commit/[email protected] |
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,14 @@ | ||
ci: | ||
autofix_prs: false | ||
autoupdate_schedule: weekly | ||
|
||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.0.271" | ||
hooks: | ||
- id: ruff |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,6 @@ dependencies: | |
- pygeoprocessing | ||
- rasterstats | ||
# linting | ||
- black | ||
- flake8 | ||
- black =23 | ||
- ruff | ||
- pre-commit |
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,124 @@ | ||
[tool.black] | ||
line-length = 88 | ||
|
||
[tool.ruff] | ||
line-length = 88 | ||
select = [ | ||
# pyflakes | ||
"F", | ||
# pycodestyle | ||
"E", | ||
"W", | ||
# flake8-2020 | ||
"YTT", | ||
# flake8-bugbear | ||
"B", | ||
# flake8-quotes | ||
"Q", | ||
# flake8-debugger | ||
"T10", | ||
# flake8-gettext | ||
"INT", | ||
# pylint | ||
"PLC", | ||
"PLE", | ||
"PLR", | ||
"PLW", | ||
# misc lints | ||
"PIE", | ||
# flake8-pyi | ||
"PYI", | ||
# tidy imports | ||
"TID", | ||
# implicit string concatenation | ||
"ISC", | ||
# type-checking imports | ||
"TCH", | ||
# comprehensions | ||
"C4", | ||
# pygrep-hooks | ||
"PGH", | ||
# Ruff-specific rules | ||
"RUF", | ||
] | ||
target-version = "py38" | ||
ignore = [ # space before : (needed for how black formats slicing) | ||
# "E203", # not yet implemented | ||
# do not assign a lambda expression, use a def | ||
"E731", | ||
# line break before binary operator | ||
# "W503", # not yet implemented | ||
# line break after binary operator | ||
# "W504", # not yet implemented | ||
# controversial | ||
"B006", | ||
# controversial | ||
"B007", | ||
# controversial | ||
"B008", | ||
# setattr is used to side-step mypy | ||
"B009", | ||
# getattr is used to side-step mypy | ||
"B010", | ||
# tests use assert False | ||
"B011", | ||
# tests use comparisons but not their returned value | ||
"B015", | ||
# false positives | ||
"B019", | ||
# Loop control variable overrides iterable it iterates | ||
"B020", | ||
# Function definition does not bind loop variable | ||
"B023", | ||
# Functions defined inside a loop must not use variables redefined in the loop | ||
# "B301", # not yet implemented | ||
# Only works with python >=3.10 | ||
"B905", | ||
# Too many arguments to function call | ||
"PLR0913", | ||
# Too many returns | ||
"PLR0911", | ||
# Too many branches | ||
"PLR0912", | ||
# Too many statements | ||
"PLR0915", | ||
# Redefined loop name | ||
"PLW2901", | ||
# Global statements are discouraged | ||
"PLW0603", | ||
# Docstrings should not be included in stubs | ||
"PYI021", | ||
# No builtin `eval()` allowed | ||
"PGH001", | ||
# compare-to-empty-string | ||
"PLC1901", | ||
# Use typing_extensions.TypeAlias for type aliases | ||
# "PYI026", # not yet implemented | ||
# Use "collections.abc.*" instead of "typing.*" (PEP 585 syntax) | ||
# "PYI027", # not yet implemented | ||
# while int | float can be shortened to float, the former is more explicit | ||
# "PYI041", # not yet implemented | ||
|
||
# Additional checks that don't pass yet | ||
# Useless statement | ||
"B018", | ||
# Within an except clause, raise exceptions with ... | ||
"B904", | ||
# Magic number | ||
"PLR2004", | ||
# Consider `elif` instead of `else` then `if` to remove indentation level | ||
"PLR5501", | ||
# ambiguous-unicode-character-string | ||
"RUF001", | ||
# ambiguous-unicode-character-docstring | ||
"RUF002", | ||
# ambiguous-unicode-character-comment | ||
"RUF003", | ||
# collection-literal-concatenation | ||
"RUF005", | ||
# pairwise-over-zipped (>=PY310 only) | ||
"RUF007", | ||
# explicit-f-string-type-conversion | ||
"RUF010", | ||
] | ||
exclude = ["doc/*", "benchmarks/*", "versioneer.py", "geopandas/_version.py"] |
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