Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding pyrealm #638

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.8.3
hooks:
- id: ruff # Run the linter.
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format # Run the formatter.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.11.2"
rev: "v1.13.0"
hooks:
- id: mypy
additional_dependencies: [types-jsonschema, xarray, types-tabulate, numpy]
additional_dependencies: [types-jsonschema, xarray, types-tabulate, numpy==2.1.3]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.43.0
hooks:
- id: markdownlint
- repo: https://github.com/mwouts/jupytext
Expand Down
2 changes: 1 addition & 1 deletion docs/source/using_the_ve/data/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ language_info:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
version: 3.10.14
---

# Adding and using data with the Virtual Ecosystem
Expand Down
2 changes: 1 addition & 1 deletion docs/source/using_the_ve/virtual_ecosystem_in_use.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ language_info:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
version: 3.10.14
---

# Using the Virtual Ecosystem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ language_info:
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
version: 3.10.14
---

# Implementation of the core components
Expand Down
1,708 changes: 919 additions & 789 deletions poetry.lock

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,20 @@ version = "0.1.1a6"
ve_run = "virtual_ecosystem.entry_points:ve_run_cli"

[tool.poetry.dependencies]
Shapely = "^2.0"
dask = ">=2023.6,<2025.0"
dpath = "^2.0.6"
jsonschema = "^4.14.0"
netcdf4 = "^1.6.5"
numpy = "^2.0"
pint = "^0.24.1"
python = ">=3.10,<3.13"
scipy = "^1.9.0"
tomli = {version = "^2.0.1", python = "<3.11"}
tomli-w = "^1.0.0"
tqdm = "^4.66.2"
xarray = "^2024.06.0"
Shapely = "^2.0"
dask = ">=2023.6,<2025.0"
dpath = "^2.0.6"
jsonschema = "^4.14.0"
netcdf4 = "^1.6.5"
numpy = "~2.1" # Pinning numpy less than 2.2.0 until this resolves: https://github.com/numpy/numpy/issues/27957
pint = "^0.24.1"
pyrealm = {version = "^2.0.0rc1", allow-prereleases = true}
python = ">=3.10,<3.13"
scipy = "^1.9.0"
tomli = {version = "^2.0.1", python = "<3.11"}
tomli-w = "^1.0.0"
tqdm = "^4.66.2"
xarray = "^2024.06.0"

[tool.poetry.group.types.dependencies]
types-dataclasses = "^0.6.6"
Expand Down
4 changes: 2 additions & 2 deletions virtual_ecosystem/core/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
function, which is used to populate the registry with the components of a given module.
""" # noqa: D205

from dataclasses import dataclass, is_dataclass
from dataclasses import dataclass
from importlib import import_module, resources
from inspect import getmembers, isclass
from typing import Any
Expand Down Expand Up @@ -172,7 +172,7 @@ def register_module(module_name: str) -> None:
constants_classes = {
class_name: class_obj
for class_name, class_obj in getmembers(constants_submodule)
if is_dataclass(class_obj)
if isclass(class_obj)
and issubclass(class_obj, ConstantsDataclass)
and class_obj is not ConstantsDataclass
}
Expand Down
Loading