-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] pre-commit autoupdate (#932)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.3 → v0.4.7](astral-sh/ruff-pre-commit@v0.4.3...v0.4.7) - [github.com/tox-dev/pyproject-fmt: 1.8.0 → 2.1.3](tox-dev/pyproject-fmt@1.8.0...2.1.3) - [github.com/abravalheri/validate-pyproject: v0.16 → v0.18](abravalheri/validate-pyproject@v0.16...v0.18) - https://github.com/codespell-project/codespell/: v2.2.6 → v2.3.0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update pytest.yml * Update pytest.yml * cleanup and move to .ruff.toml * pyproject.toml --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Çağtay Fabry <[email protected]>
- Loading branch information
1 parent
fa2deea
commit 31f75fe
Showing
10 changed files
with
161 additions
and
150 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 |
---|---|---|
|
@@ -39,12 +39,12 @@ jobs: | |
with: | ||
fetch-depth: '0' # Fetch all history for all tags and branches | ||
|
||
- uses: CagtayFabry/pydeps2env@main | ||
- uses: CagtayFabry/pydeps2env@v1.1.0 | ||
with: | ||
file: 'pyproject.toml' | ||
files: 'pyproject.toml' | ||
channels: 'conda-forge defaults' | ||
extras: 'test vis media' | ||
setup_requires: 'include' | ||
build_system: 'include' | ||
|
||
- name: Setup Conda Environment | ||
uses: mamba-org/[email protected] | ||
|
@@ -139,12 +139,12 @@ jobs: | |
with: | ||
fetch-depth: '0' # Fetch all history for all tags and branches | ||
|
||
- uses: CagtayFabry/pydeps2env@main | ||
- uses: CagtayFabry/pydeps2env@v1.1.0 | ||
with: | ||
file: 'pyproject.toml' | ||
files: 'pyproject.toml' | ||
channels: 'conda-forge defaults' | ||
extras: 'test vis media' | ||
setup_requires: 'include' | ||
build_system: 'include' | ||
|
||
- name: Setup Conda Environment | ||
uses: mamba-org/[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
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,81 @@ | ||
# Exclude a variety of commonly ignored directories. | ||
extend-exclude = [ | ||
"__init__.py", | ||
"doc/src/conf.py", | ||
] | ||
|
||
# Same as Black. | ||
line-length = 88 | ||
indent-width = 4 | ||
|
||
# Assume Python 3.9 | ||
target-version = "py39" | ||
|
||
|
||
[lint] | ||
# TODO: should be the following list, but Ruff does not yet impl all of them. | ||
# W503,W504 | ||
# E203 | ||
# C408 | ||
ignore = [ | ||
"C408", | ||
#"E203", | ||
"E402", | ||
#"W503", | ||
#"W504", | ||
"D203", | ||
"D211", | ||
"D213", | ||
"UP006", | ||
"UP007", # see ruff GH#4427 | ||
] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"C", # flake8-comprehensions | ||
#"D", # note: all relevant D's will be set by setting pydocstyle.convention=numpy! | ||
"E", # pycodestyles | ||
"F", # pyflakes | ||
"W", # pycodestyle warnings | ||
"UP", # pyupgrade | ||
"T2", # flake8-print | ||
"I001", # isort | ||
"ICN", # import conventions, e.g. import numpy as np | ||
#"B950", # not yet implemented by Ruff. | ||
"RUF100", # ensure 'noqa' declarations are still valid. | ||
] | ||
|
||
[lint.extend-per-file-ignores] | ||
# Allow pydocstyle violations in certain areas. | ||
"**/{tests,tags,asdf,devtools}/**" = [ | ||
"D", | ||
] | ||
"conftest.py" = [ | ||
"D", | ||
] | ||
"doc/src/tutorials/*" = [ | ||
"D", | ||
] | ||
"doc/src/conf.py" = [ | ||
"E501", # ignore long lines. | ||
"RUF100", # do no check if 'noqa' is needed (circular import workaround) | ||
] | ||
"**/{cli,tests,tutorials,devtools}/**/*{.py,ipynb}" = [ | ||
"T2", | ||
] # Allow prints in certain areas. | ||
|
||
[lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[lint.mccabe] | ||
max-complexity = 15 # max branches inside a function. | ||
|
||
[lint.isort] | ||
known-first-party = [ | ||
"weldx", | ||
] | ||
required-imports = [ | ||
"from __future__ import annotations", | ||
] | ||
|
||
[flake8-import-conventions] | ||
extend-aliases = { xarray = "xr" } |
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,12 @@ | ||
[project] | ||
name = "myst-nb-json-renderer" | ||
version = "1" | ||
[project.entry-points."myst_nb.mime_renderers"] | ||
json_mime = "myst_nb_json_render_plugin:MimeRenderPlugin" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
entry-points."myst_nb.mime_renderers".json_mime = "myst_nb_json_render_plugin:MimeRenderPlugin" |
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.