Skip to content

Commit

Permalink
Merge branch 'develop' into Two_leaf_irradience_model
Browse files Browse the repository at this point in the history
  • Loading branch information
j-emberton authored Oct 22, 2024
2 parents 9434fd2 + 34c1f34 commit 1874eeb
Show file tree
Hide file tree
Showing 132 changed files with 15,890 additions and 2,872 deletions.
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.2
rev: v0.6.9
hooks:
# Run the linter.
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.10.1"
rev: "v1.11.2"
hooks:
- id: mypy
additional_dependencies: [numpy, types-tabulate, pandas-stubs]
exclude: "pyrealm_build_data/splash/splash_py_version/.*\\.py"
# https://stackoverflow.com/a/75447331/3401916
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
rev: v0.42.0
hooks:
- id: markdownlint
- repo: https://github.com/mwouts/jupytext
rev: v1.16.3d
rev: v1.16.4b
hooks:
- id: jupytext
args: [--pipe, black]
files: docs/source
files: docs/source
exclude: docs/source/conf.py
additional_dependencies:
- black==24.4.2 # Matches hook

13 changes: 12 additions & 1 deletion docs/source/_toc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
root: index
subtrees:


- caption: Users
entries:
- file: users/pmodel/module_overview.md
Expand All @@ -12,7 +13,8 @@ subtrees:
- file: users/pmodel/pmodel_details/worked_examples.md
- file: users/pmodel/pmodel_details/photosynthetic_environment.md
- file: users/pmodel/pmodel_details/optimal_chi.md
- file: users/pmodel/pmodel_details/lue_limitation.md
- file: users/pmodel/pmodel_details/quantum_yield.md
- file: users/pmodel/pmodel_details/jmax_limitation.md
- file: users/pmodel/pmodel_details/envt_variation_outputs.md
- file: users/pmodel/pmodel_details/soil_moisture.md
- file: users/pmodel/pmodel_details/extreme_values.md
Expand All @@ -26,7 +28,16 @@ subtrees:
- file: users/pmodel/subdaily_details/worked_example.md
- file: users/pmodel/c3c4model.md
- file: users/pmodel/isotopic_discrimination.md
- file: users/demography/module_overview.md
subtrees:
- entries:
- file: users/demography/flora.md
- file: users/demography/t_model.md
- file: users/demography/crown.md
- file: users/demography/community.md
- file: users/demography/canopy.md
- file: users/tmodel/tmodel.md
- file: users/tmodel/canopy.md
- file: users/splash.md
- file: users/constants.md
- file: users/hygro.md
Expand Down
12 changes: 11 additions & 1 deletion docs/source/api/constants_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.3
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
---

# The {mod}`~pyrealm.constants` module
Expand Down
12 changes: 11 additions & 1 deletion docs/source/api/core_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.3
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
---

# The {mod}`~pyrealm.core` module
Expand Down
71 changes: 71 additions & 0 deletions docs/source/api/demography_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
jupytext:
formats: md:myst
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
---

# The {mod}`~pyrealm.demography` module

```{eval-rst}
.. automodule:: pyrealm.demography
:autosummary:
:members:
```

## The {mod}`~pyrealm.demography.flora` module

```{eval-rst}
.. automodule:: pyrealm.demography.flora
:autosummary:
:members:
```

## The {mod}`~pyrealm.demography.t_model_functions` module

```{eval-rst}
.. automodule:: pyrealm.demography.t_model_functions
:autosummary:
:members:
```

## The {mod}`~pyrealm.demography.crown` module

```{eval-rst}
.. automodule:: pyrealm.demography.crown
:autosummary:
:members:
```

## The {mod}`~pyrealm.demography.community` module

```{eval-rst}
.. automodule:: pyrealm.demography.community
:autosummary:
:members:
```

## The {mod}`~pyrealm.demography.canopy` module

```{eval-rst}
.. automodule:: pyrealm.demography.canopy
:autosummary:
:members:
```
20 changes: 19 additions & 1 deletion docs/source/api/pmodel_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.3
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
---

# The {mod}`~pyrealm.pmodel` module
Expand Down Expand Up @@ -50,6 +60,14 @@ kernelspec:
:members:
```

## The {mod}`~pyrealm.pmodel.quantum_yield` submodule

```{eval-rst}
.. automodule:: pyrealm.pmodel.quantum_yield
:autosummary:
:members:
```

## The {mod}`~pyrealm.pmodel.functions` submodule

```{eval-rst}
Expand Down
12 changes: 11 additions & 1 deletion docs/source/api/splash_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.3
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
---

# The {mod}`~pyrealm.splash` module
Expand Down
12 changes: 11 additions & 1 deletion docs/source/api/tmodel_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.3
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
---

# The {mod}`~pyrealm.tmodel` module
Expand Down
18 changes: 17 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@
from dataclasses import dataclass, field
from datetime import datetime

# Import Matplotlib to avoid this message in notebooks:
# "Matplotlib is building the font cache; this may take a moment."
import matplotlib.pyplot # noqa: F401
import sphinxcontrib.bibtex.plugin
from sphinxcontrib.bibtex.style.referencing import BracketStyle
from sphinxcontrib.bibtex.style.referencing.author_year import AuthorYearReferenceStyle

from pyrealm import __version__ as pyrealm_version

# +
sys.path.insert(0, os.path.abspath("../"))
# -


# -- Project information -----------------------------------------------------
Expand Down Expand Up @@ -55,7 +60,9 @@
external_toc_path = "_toc.yml" # optional, default: _toc.yml
external_toc_exclude_missing = False # optional, default: False

# + [markdown]
# Citation styling
# -


def bracket_style() -> BracketStyle:
Expand All @@ -82,7 +89,7 @@ class MyReferenceStyle(AuthorYearReferenceStyle):
)

bibtex_reference_style = "author_year_round"

bibtex_default_style = "plain"

# Cross-reference checking
# TODO - find some better solution than this to all of these bizarre cross reference
Expand All @@ -92,6 +99,8 @@ class MyReferenceStyle(AuthorYearReferenceStyle):
("py:class", "numpy._typing._array_like._ScalarType_co"),
("py:class", "numpy._typing._generic_alias.ScalarType"),
("py:class", "numpy.float32"),
("py:class", "numpy.float64"),
("py:class", "numpy.int64"),
("py:class", "numpy.timedelta64"),
("py:class", "numpy.bool_"),
("py:class", "numpy.ndarray"),
Expand Down Expand Up @@ -140,15 +149,20 @@ class MyReferenceStyle(AuthorYearReferenceStyle):
"numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]]]"
),
),
("py:class", "pandas.core.frame.DataFrame"),
]

# +
intersphinx_mapping = {
"pytest": ("https://docs.pytest.org/en/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"python": ("https://docs.python.org/3/", None),
"xarray": ("https://docs.xarray.dev/en/stable/", None),
"pandas": ("http://pandas.pydata.org/pandas-docs/dev/", None),
"shapely": ("https://shapely.readthedocs.io/en/stable/", None),
"marshmallow": ("https://marshmallow.readthedocs.io/en/stable/", None),
}
# -


autodoc_default_flags = ["members"]
Expand Down Expand Up @@ -195,6 +209,7 @@ class MyReferenceStyle(AuthorYearReferenceStyle):
# html_theme = 'sphinx_material'
html_theme = "sphinx_rtd_theme"

# +
html_theme_options = {
"logo_only": False,
"display_version": True,
Expand All @@ -208,6 +223,7 @@ class MyReferenceStyle(AuthorYearReferenceStyle):
"includehidden": True,
"titles_only": False,
}
# -


# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
12 changes: 11 additions & 1 deletion docs/source/development/code_qa_and_typing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ jupytext:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.16.3
jupytext_version: 1.16.4
kernelspec:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.11.9
---

# Code quality and static typing
Expand Down
Loading

0 comments on commit 1874eeb

Please sign in to comment.