-
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.
build(deps): first major release (#323)
- Numpy was upgraded to allow v2.0.0. - Do formatting and linting with ruff, rather than black, isort, flak8, etc. - Make mypy and docstring linting pass.
- Loading branch information
Showing
36 changed files
with
787 additions
and
916 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[tools] | ||
python = {version = "3.12", virtualenv = ".venv"} | ||
[env.'_'.python] | ||
venv = ".venv" |
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
Large diffs are not rendered by default.
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,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "volcano-cooking" | ||
version = "0.12.2" | ||
version = "1.0.0" | ||
description = "Make some volcanoes and simulate them in CESM2" | ||
authors = ["engeir <[email protected]>"] | ||
license = "GPL-3.0-or-later" | ||
|
@@ -29,18 +29,18 @@ xarray = ">=2023.12,<2025.0" | |
|
||
[tool.poetry.dev-dependencies] | ||
coverage = "^7.5" | ||
black = "^24.4" | ||
isort = "^5.13.2" | ||
flake8 = "^7.1.0" | ||
pre-commit = "^3.7.1" | ||
pre-commit-hooks = "^4.6.0" | ||
pyupgrade = "^3.16.0" | ||
darglint = "^1.8.0" | ||
pytest = "^8.2.2" | ||
pytest-cov = "^5.0.0" | ||
mypy = "^1.10" | ||
xdoctest = "^1.1.5" | ||
Pygments = "^2.18.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
ruff = "^0.4.9" | ||
pydoclint = "^0.4.1" | ||
pydocstringformatter = "^0.7.3" | ||
|
||
[tool.coverage.paths] | ||
source = ["src", "*/site-packages"] | ||
|
@@ -55,3 +55,134 @@ show_missing = true | |
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.mypy] | ||
files = ["src"] | ||
ignore_missing_imports = true | ||
allow_redefinition = false | ||
check_untyped_defs = true | ||
ignore_errors = false | ||
implicit_reexport = false | ||
local_partial_types = true | ||
no_implicit_optional = true | ||
strict_equality = true | ||
strict_optional = true | ||
warn_no_return = true | ||
warn_redundant_casts = true | ||
warn_unreachable = true | ||
warn_unused_configs = true | ||
warn_unused_ignores = true | ||
|
||
[tool.ruff] | ||
# Same as Black. | ||
line-length = 88 | ||
|
||
# Files that were downloaded | ||
extend-exclude = [] | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
|
||
# Assume Python 3.9 | ||
target-version = "py39" | ||
|
||
[tool.ruff.lint] | ||
per-file-ignores = {} | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
select = [ # https://docs.astral.sh/ruff/rules/ | ||
"B", # flake8-bugbear | ||
"D", # pydocstyle | ||
"E", # pycodestyle | ||
"F", # pyflakes | ||
"I", # isort | ||
"NPY201", | ||
"PL", # pylint | ||
"Q", # flake8-quotes | ||
"UP", # pyupgrade | ||
] | ||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. | ||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or | ||
# McCabe complexity (`C901`) by default. | ||
# select = ["E4", "E7", "E9", "F"] # These are the default | ||
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules | ||
ignore = [ | ||
# "COM812", # Since we don't select COM, this is already ignored | ||
# "COM819", # Since we don't select COM, this is already ignored | ||
"D206", | ||
"D300", | ||
"E111", | ||
"E114", | ||
"E117", | ||
"E266", | ||
"E501", | ||
# "ISC001", # Since we don't select ISC, this is already ignored | ||
# "ISC002", # Since we don't select ISC, this is already ignored | ||
"PLR0913", # Sometimes we want a lot of function signatures (6 not enough) | ||
"Q000", | ||
"Q001", | ||
"Q002", | ||
"Q003", | ||
# "W191", # Since we don't select W, this is already ignored | ||
] | ||
|
||
# Allow fix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["ALL"] | ||
unfixable = [] | ||
|
||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".hg", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"venv", | ||
] | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "numpy" | ||
ignore-decorators = ["typing.overload"] | ||
|
||
[tool.ruff.lint.flake8-quotes] | ||
docstring-quotes = "double" | ||
|
||
[tool.ruff.lint.flake8-import-conventions.aliases] | ||
# Declare the default aliases. | ||
"matplotlib.pyplot" = "plt" | ||
numpy = "np" | ||
scipy = "sp" | ||
xarray = "xr" | ||
|
||
[tool.ruff.lint.isort] | ||
case-sensitive = true | ||
known-local-folder = ["src", "de_verify"] | ||
|
||
[tool.isort] | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
force_grid_wrap = 0 | ||
use_parentheses = true | ||
line_length = 88 | ||
profile = "black" | ||
combine_as_imports = true | ||
|
||
[tool.pydocstringformatter] | ||
write = true | ||
strip-whitespaces = true | ||
split-summary-body = false | ||
numpydoc-section-hyphen-length = false | ||
style = ["pep257", "numpydoc"] |
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.