rscm 0.2.3

Rust Simple Climate Model - A framework for building reduced-complexity climate models
Documentation
[project]
name = "rscm"
version = "0.2.3"
description = "Simple Climate Model framework implemented in Rust"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "Apache-2.0"}
authors = [
    {name = "Jared Lewis", email = "jared.lewis@climate-energy-college.org"}
]
keywords = ["climate", "climate-model", "scm", "physics", "rust"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Rust",
    "Topic :: Scientific/Engineering :: Atmospheric Science",
]
dependencies = [
    "numpy",
    "scmdata>=0.17.0",
]

[project.urls]
Homepage = "https://github.com/lewisjared/rscm"
Repository = "https://github.com/lewisjared/rscm"
Documentation = "https://lewisjared.github.io/rscm/"

[build-system]
requires = [
    'maturin>=1.7,<2'
]
build-backend = 'maturin'

[tool.maturin]
python-source = "python"
module-name = "rscm._lib"
bindings = 'pyo3'
features = ["pyo3/extension-module"]


[dependency-groups]
dev = [
    "ruff>=0.6.2",
    "pytest>=8.3.2",
    "pip>=24.2",
    "notebook>=7.2.2",
    "pydot>=3.0.1",
    "towncrier>=24.8.0",
    "bump-my-version>=0.26.1",
    # Docs
    "mkdocs>=1.6.0",
    "mkdocstrings[python]>=0.25.0",
    "mkdocs-material>=9.5.0",
    "mkdocs-gen-files>=0.5.0",
    "mkdocs-section-index>=0.3.9",
    "mkdocs-literate-nav>=0.6.1",
    "mkdocs-autorefs>=1.0.1",
    "mkdocs-jupyter>=0.24.0",
    "myst-nb>=1.1.1",
    "jupyterlab>=4.2.0",
    "jupytext>=1.16.4",
    "matplotlib>=3.9.2",
    "seaborn>=0.13.2",
    "mike>=2.1.3",
    "mkdocs-minify-plugin>=0.8.0",
]


[tool.ruff]
src = ["python"]
target-version = "py311"
# Provide some leeway for long docstring
line-length = 88


[tool.ruff.lint]
select = [
    "E", # pycodestyle error
    "W", # pycodestyle warning
    "F", # pyflakes
    "I", # isort
    "D", # pydocstyle
    "PL", # pylint
    "TRY", # tryceratops
    "NPY", # numpy rules
    "RUF", # ruff specifics
    "UP", # pyupgrade
    "S", # flake8-bandit
    # pandas support via pandas-vet. In some cases we will want to disable
    # this because it can lead to too many false positives.
    "PD",
]
unfixable = [
    "PD002", # Disable autofix for inplace as this often introduces bugs
]
ignore = [
    "D200", # One-line docstring should fit on one line with quotes
    "D400", # First line should end with a period
    "D105", # Missing docstring in magic method
    "UP007",
    "PD011", # Ruff confused about APIs
]


[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint.per-file-ignores]
"test*.py" = [
    "D", # Documentation not needed in tests
    "S101", # S101 Use of `assert` detected
    "PLR2004" # Magic value used in comparison
]
"docs/notebooks/*" = [
    "D100", # Missing docstring at the top of file
    "E402", # Module level import not at top of file
    "S101", # Use of `assert` detected
    "PLR2004", # Magic value used in comparison
]
"scripts/*" = [
    "S101", # S101 Use of `assert` detected
]
"tests/integration/test_compilation.py" = [
    "S603", # `subprocess` call: check for execution of untrusted input
]
"tests/test-data/*" = [
    "I001", # different first-party in generated files
]

[tool.ruff.lint.isort]
known-first-party = ["src"]

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.towncrier]
package = "rscm"
package_dir = "src"
filename = "docs/changelog.md"
directory = "changelog/"
title_format = "## rscm {version} ({project_date})"
underlines = [
    "",
    "",
    "",
]
issue_format = "[#{issue}](https://github.com/lewisjared/rscm/pulls/{issue})"
type = [
    { directory = "breaking", name = "⚠️ Breaking Changes ⚠️", showcontent = true },
    { directory = "deprecation", name = "Deprecations", showcontent = true },
    { directory = "feature", name = "Features", showcontent = true },
    { directory = "improvement", name = "Improvements", showcontent = true },
    { directory = "fix", name = "Bug Fixes", showcontent = true },
    { directory = "docs", name = "Improved Documentation", showcontent = true },
    { directory = "trivial", name = "Trivial/Internal Changes", showcontent = false },
]

[tool.bumpversion]
current_version = "0.2.3"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
regex = false
ignore_missing_version = true
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "chore: release {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "chore: release {current_version} → {new_version}"
commit_args = ""
pre_commit_hooks = [
    "cargo update --workspace",
    "uv lock",
    "git add Cargo.lock uv.lock",
    "uv run towncrier build --yes",
]

# Python package version
[[tool.bumpversion.files]]
filename = "pyproject.toml"

# Workspace package version (inherited by all crates)
[[tool.bumpversion.files]]
filename = "Cargo.toml"

# All workspace path dependencies (matches `{ version = "X.Y.Z", path =` pattern)
[[tool.bumpversion.files]]
filename = "Cargo.toml"
regex = true
search = '\{{ version = "{current_version}", path ='
replace = '{{ version = "{new_version}", path ='