-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pre-commit-ci-update-config
- Loading branch information
Showing
9 changed files
with
140 additions
and
73 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 |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Setup Miniconda | ||
uses: conda-incubator/[email protected].2 | ||
uses: conda-incubator/[email protected].3 | ||
with: | ||
# installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh | ||
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh | ||
|
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 |
---|---|---|
|
@@ -33,7 +33,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Set up conda | ||
uses: conda-incubator/[email protected].2 | ||
uses: conda-incubator/[email protected].3 | ||
with: | ||
auto-update-conda: false | ||
channels: conda-forge | ||
|
@@ -60,7 +60,7 @@ jobs: | |
shell: 'bash -l {0}' | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: conda-incubator/[email protected].2 | ||
- uses: conda-incubator/[email protected].3 | ||
with: | ||
channels: conda-forge | ||
miniforge-variant: Mambaforge | ||
|
@@ -91,7 +91,7 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up conda | ||
uses: conda-incubator/[email protected].2 | ||
uses: conda-incubator/[email protected].3 | ||
with: | ||
auto-update-conda: false | ||
channels: conda-forge | ||
|
@@ -134,7 +134,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Setup python | ||
uses: actions/setup-python@v5.0.0 | ||
uses: actions/setup-python@v5.1.0 | ||
with: | ||
python-version: '3.11' | ||
- name: Set up Julia | ||
|
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5.0.0 | ||
uses: actions/setup-python@v5.1.0 | ||
with: | ||
python-version: "3.10" | ||
|
||
|
@@ -45,7 +45,7 @@ jobs: | |
|
||
- name: Publish a Python distribution to PyPI | ||
if: success() && github.event_name == 'release' | ||
uses: pypa/[email protected].11 | ||
uses: pypa/[email protected].14 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
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,110 @@ | ||
[build-system] | ||
requires = ["setuptools>=42", "wheel", "pip"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.pytest] | ||
addopts = "--ignore=setup.py" | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = [ | ||
".git", | ||
".github", | ||
"docs", | ||
] | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
target-version = "py38" | ||
exclude = [".git", "asv_bench", "docs", "conftest.py"] | ||
|
||
|
||
[tool.ruff.lint] | ||
select = [ | ||
# https://pypi.org/project/pycodestyle | ||
"E", | ||
"W", | ||
# https://pypi.org/project/pyflakes | ||
"F", | ||
# https://pypi.org/project/flake8-bandit | ||
"S", | ||
# https://docs.astral.sh/ruff/rules/#pyupgrade-up | ||
"UP", | ||
"I002", # Missing required imports | ||
"UP008", # Super calls with redundant arguments passed. | ||
"G010", # Deprecated log warn. | ||
"PLR1722", # Use sys.exit() instead of exit() and quit(). | ||
"PT014", # pytest-duplicate-parametrize-test-cases. | ||
"PT006", # Checks for the type of parameter names passed to pytest.mark.parametrize. | ||
"PT007", # Checks for the type of parameter values passed to pytest.mark.parametrize. | ||
"PT018", # Checks for assertions that combine multiple independent conditions. | ||
] | ||
|
||
extend-select = [ | ||
"I", # isort | ||
"C4", # https://pypi.org/project/flake8-comprehensions | ||
] | ||
|
||
ignore = [ | ||
"S101", # Use of `assert` detected | ||
"E203", # Whitespace-before-punctuation. | ||
"E402", # Module-import-not-at-top-of-file. | ||
"E731", # Do not assign a lambda expression, use a def. | ||
"D100", # Missing docstring in public module. | ||
"D101", # Missing docstring in public class. | ||
"D102", # Missing docstring in public method. | ||
"D103", # Missing docstring in public function. | ||
"D104", # Missing docstring in public package. | ||
"D105", # Missing docstring in magic method. | ||
"D106", # Missing docstring in public nested class. | ||
"D107", # Missing docstring in `__init__`. | ||
"RET504", # Unnecessary variable assignment before `return` statement. | ||
"S101", # Use of `assert` detected. | ||
"S108", | ||
"D203", # 1 blank line required before class docstring. | ||
"D205", # 1 blank line required between summary line and description. | ||
"D212", # Multi-line docstring summary should start at the first line. | ||
"D213", # Multi-line docstring summary should start at the second line. | ||
"D209", # Multi-line docstring closing quotes should be on a separate line. | ||
"D400", # First line should end with a period. | ||
"D413", # Missing blank line after last section of docstrings. | ||
"D401", # First line of docstring should be in imperative mood. | ||
"D415", # First line should end with a period, question mark, or exclamation point. | ||
"D416", # Section name should end with a colon ("Attributes"). | ||
"D417", # Missing argument description in the docstring for argument "X". | ||
"RUF100", # https://docs.astral.sh/ruff/rules/unused-noqa/ | ||
"C408", | ||
"SIM118", | ||
"RET506", | ||
"TRY004", | ||
"RET505", | ||
"RET507", | ||
"SIM108", | ||
"SIM102", | ||
"E501", # line too long | ||
"E266", | ||
"F403", | ||
"F401", | ||
"F841", | ||
"RET", | ||
"SIM", | ||
"PT", | ||
] | ||
ignore-init-module-imports = true | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
|
||
"setup.py" = ["S101"] | ||
"**/__init__.py" = ["F401", "F403", "F405", "F811", "F821", "E501", "SIM102"] | ||
"tests/**" = [ | ||
"S605", # Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without `shell` | ||
"S607", # Starting a process with a partial executable path | ||
"RET504", # todo:Unnecessary variable assignment before `return` statement | ||
"PT004", # Fixture `tmpdir_unittest_fixture` does not return anything, add leading underscore | ||
"PT011", # `pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception | ||
"PT012", # `pytest.raises()` block should contain a single simple statement | ||
"PT019", # Fixture `_` without value is injected as parameter, use `@pytest.mark.usefixtures` instead | ||
"PT006" # Checks for the type of parameter names passed to pytest.mark.parametrize. | ||
] | ||
|
||
[tool.blackdoc] | ||
exclude = "docs/index.rst" |
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