Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
bb19458
update intro
SarahAlidoost Oct 15, 2025
a5b19bb
update docs
SarahAlidoost Oct 20, 2025
0f97f4d
Merge branch 'main' into setup_docs
SarahAlidoost Oct 20, 2025
db1474a
update docs
SarahAlidoost Oct 21, 2025
547bf20
add version to a dependency in pyproject
SarahAlidoost Oct 21, 2025
a4bd4bf
fix init
SarahAlidoost Oct 21, 2025
b917e83
add init files
SarahAlidoost Oct 21, 2025
10751e9
add download_button
SarahAlidoost Oct 21, 2025
20c435a
fix citation file
SarahAlidoost Oct 21, 2025
2a4ce15
update readme, add badges
SarahAlidoost Oct 21, 2025
d1060cf
update doc
SarahAlidoost Oct 21, 2025
90cd9b2
fix init file
SarahAlidoost Oct 21, 2025
ef11e2d
fix docstring in root_dynamics
SarahAlidoost Oct 21, 2025
93aa7a1
fix ruff formatting
SarahAlidoost Oct 21, 2025
12a948d
fix docsting
SarahAlidoost Oct 22, 2025
9450f37
update docs, add reference section, fix link in license
SarahAlidoost Oct 22, 2025
cbb8193
add reference file
SarahAlidoost Oct 22, 2025
eb3f404
update docs
SarahAlidoost Oct 22, 2025
552be22
fix sonar badge
SarahAlidoost Oct 22, 2025
c8cb035
Merge branch 'main' into setup_docs
SarahAlidoost Oct 27, 2025
c355bd7
fix docstring of leaf_dynamics
SarahAlidoost Oct 27, 2025
2a209f0
Update README.md
SarahAlidoost Oct 28, 2025
75077b2
Update LICENSE
SarahAlidoost Oct 28, 2025
44c91f4
Update docs/examples.md
SarahAlidoost Oct 28, 2025
f686a2d
Update docs/run_model.md
SarahAlidoost Oct 28, 2025
d2760ee
Update docs/installation.md
SarahAlidoost Oct 28, 2025
88b0c68
Update docs/installation.md
SarahAlidoost Oct 28, 2025
d99ea88
remove return none from docstring
SarahAlidoost Oct 29, 2025
1891eda
remove return none from docstring
SarahAlidoost Oct 29, 2025
2b48d9c
remove returns none from docstring
SarahAlidoost Oct 29, 2025
fc9ad44
add about zenodo integration to docs
SarahAlidoost Oct 29, 2025
6966dea
add version to release docs
SarahAlidoost Oct 29, 2025
2d6900c
add version to project_setup docs
SarahAlidoost Oct 29, 2025
a90b11f
fix links
SarahAlidoost Oct 29, 2025
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
40 changes: 34 additions & 6 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
# YAML 1.2
---
cff-version: "1.2.0"
title: "diffwofost"
title: "diffwofost: A differentiable implementation of the WOFOST crop growth model"
type: software
authors:
- family-names:
given-names:
orcid: ""
date-released: 2025-07-11
version: "0.1.0"
- given-names: Fakhereh (Sarah)
family-names: Alidoost
email: f.alidoost@esciencecenter.nl
affiliation: Netherlands eScience Center
orcid: 'https://orcid.org/0000-0001-8407-6472'
- given-names: Francesco
family-names: Nattino
email: f.nattino@esciencecenter.nl
affiliation: Netherlands eScience Center
orcid: 'https://orcid.org/0000-0003-3286-0139'
- given-names: Michiel
family-names: Kallenberg
email: michiel.kallenberg@wur.nl
affiliation: Wageningen University & Research
orcid: 'https://orcid.org/0000-0002-4661-6674'
- given-names: Ron
family-names: van Bree
email: ron.vanbree@wur.nl
affiliation: Wageningen University & Research
orcid: 'https://orcid.org/0009-0000-6365-6996'
- given-names: Ioannis
family-names: Athanasiadis
email: ioannis.athanasiadis@wur.nl
affiliation: Wageningen University & Research
orcid: 'https://orcid.org/0000-0003-2764-0078'
- given-names: Allard
family-names: de Wit
email: allard.dewit@wur.nl
affiliation: Wageningen University & Research
orcid: 'https://orcid.org/0000-0002-5517-6404'
date-released: 2025-09-23
version: "0.1.1"
repository-code: "https://github.com/WUR-AI/diffwofost"
keywords:
- "pytorch"
Expand Down
31 changes: 17 additions & 14 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Licensed under the EUPL, Version 1.1 or – as soon they
# will be approved by the European Commission - subsequent
# versions of the EUPL (the "Licence");
# You may not use this work except in compliance with the
# Licence.
# You may obtain a copy of the Licence at:
**EUPL, Version 1.1**

# http://ec.europa.eu/idabc/eupl
Licensed under the EUPL, Version 1.1 or as soon they
will be approved by the European Commission - subsequent
versions of the EUPL (the "Licence").

# Unless required by applicable law or agreed to in
# writing, software distributed under the Licence is
# distributed on an "AS IS" basis,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied.
# See the Licence for the specific language governing
# permissions and limitations under the Licence.
You may not use this work except in compliance with the
Licence.
You may obtain a copy of the Licence at:

https://interoperable-europe.ec.europa.eu/licence/european-union-public-licence-version-11-eupl
Unless required by applicable law or agreed to in
writing, software distributed under the Licence is
distributed on an "AS IS" basis,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express or implied.

See the Licence for the specific language governing
permissions and limitations under the Licence.
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<!-- (Customize these badges with your own links, and check https://shields.io/ or https://badgen.net/ to see which other badges are available.) -->

[![github repo badge](https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue)](https://github.com/WUR-AI/diffWOFOST)
[![PyPI - Version](https://badge.fury.io/py/diffwofost.svg)](https://img.shields.io/pypi/v/diffwofost)
[![Python package built](https://github.com/WUR-AI/diffWOFOST/actions/workflows/build.yml/badge.svg)](https://github.com/WUR-AI/diffWOFOST/actions/workflows/build.yml)
[![Documentation built](https://github.com/WUR-AI/diffWOFOST/actions/workflows/deploy-documentation.yml/badge.svg)](https://github.com/WUR-AI/diffWOFOST/actions/workflows/deploy-documentation.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=WUR-AI_diffWOFOST&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=WUR-AI_diffWOFOST)

# diffWOFOST

<img align="right" width="90" alt="Logo" src="./docs/logo/diffwofost.png">

The python package `diffWOFOST` is a differentiable implementation of WOFOST models using [`torch`](https://pytorch.org/),
allowing gradients to flow through the simulations for optimization and data assimilation.

Expand All @@ -24,20 +34,14 @@ To work with notebooks, you need to install `jupyterlab`:
pip install jupyterlab
```

## Usage

An example notebooks are provided in the `docs/notebooks` folder.
## Documentation

## PCSE
The documentation for `diffWOFOST` is available at
[https://WUR-AI.github.io/diffWOFOST](https://WUR-AI.github.io/diffWOFOST).

The python implementation of WOFOST is available at
[`PCSE`](https://pcse.readthedocs.io/en/stable/). For more information about the
models, the functional components of PCSE, and documentation have a look at the
following links:
## Acknowledgements

- [Models available in PCSE](https://pcse.readthedocs.io/en/stable/available_models.html#models-available-in-pcse)
- [The Engine](https://pcse.readthedocs.io/en/stable/reference_guide.html#the-engine)
- [PCSE source code](https://github.com/ajwdewit/pcse)
- [PCSE test data](https://github.com/ajwdewit/pcse/tree/master/tests/test_data)
- [PCSE example notebooks](https://github.com/ajwdewit/pcse_notebooks).
- [WOFOST_crop_parameters](https://github.com/ajwdewit/WOFOST_crop_parameters): each branch contains the crop parameters for a specific crop model version
The package `diffWOFOST` is developed in the
[DeltaCrop](https://research-software-directory.org/projects/deltacrop) project, a
collaboration between Wageningen University & Research and Netherlands eScience
Center.
79 changes: 38 additions & 41 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Contributing guidelines
#

We welcome any kind of contribution to our software, from simple comment or question to a full fledged [pull request](https://help.github.com/articles/about-pull-requests/). Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
We welcome any kind of contribution to our software, from simple comment or
question to a full fledged [pull
request](https://help.github.com/articles/about-pull-requests/). Please read and
follow our [Code of Conduct](CODE_OF_CONDUCT.md).

A contribution can be one of the following cases:

Expand All @@ -13,56 +16,50 @@ The sections below outline the steps in each case.

## You have a question

1. use the search functionality [here](https://github.com/WUR-AI/diffwofost/issues) to see if someone already filed the same issue;
1. use the search functionality [in
issues](https://github.com/WUR-AI/diffwofost/issues) to see if someone
already filed the same issue;
2. if your issue search did not yield any relevant results, make a new issue;
3. apply the "Question" label; apply other labels when relevant.

## You think you may have found a bug

1. use the search functionality [here](https://github.com/WUR-AI/diffwofost/issues) to see if someone already filed the same issue;
1. if your issue search did not yield any relevant results, make a new issue, making sure to provide enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include:
- the [SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) of the commit that is causing your problem;
- some identifying information (name and version number) for dependencies you're using;
- information about the operating system;
1. apply relevant labels to the newly created issue.
1. use the search functionality [in
issues](https://github.com/WUR-AI/diffwofost/issues) to see if someone
already filed the same issue;
2. if your issue search did not yield any relevant results, make a new issue,
making sure to provide enough information to the rest of the community to
understand the cause and context of the problem.

## You want to make some kind of change to the code base

1. (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue;
1. (**important**) wait until some kind of consensus is reached about your idea being a good idea;
1. if needed, fork the repository to your own Github profile and create your own feature branch off of the latest main commit. While working on your feature branch, make sure to stay up to date with the main branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions [here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and [here](https://help.github.com/articles/syncing-a-fork/));
1. install dependencies (see the [development documentation](README.dev.md#development_install));
1. make sure the existing tests still work by running ``pytest``;
1. add your own tests (if necessary);
1. update or expand the documentation;
1. (**important**) announce your plan to the rest of the community *before you
start working*. This announcement should be in the form of a (new) issue;
2. (**important**) wait until some kind of consensus is reached about your idea being a good idea;
3. follow the instruction in [developer_guide.md](developer_guide.md).

1. [push](http://rogerdudler.github.io/git-guide/) your feature branch to (your fork of) the diffwofost repository on GitHub;
1. create the pull request, e.g. following the instructions [here](https://help.github.com/articles/creating-a-pull-request/).

In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request.
In case you feel like you've made a valuable contribution, but you don't know
how to write or run tests for it, or how to generate the documentation: don't
let this discourage you from making the pull request; we can help you! Just go
ahead and submit an issue and ask your questions.

## You want to make a new release of the code base

To create a release you need write permission on the repository.

1. Check the author list in [`CITATION.cff`](CITATION.cff)
1. Bump the version using `bump-my-version bump <major|minor|patch>`. For example, `bump-my-version bump major` will increase major version numbers everywhere it's needed (code, meta, etc.) in the repo. Alternatively the version can be manually changed in diffwofost/__init__.py, pyproject.toml, CITATION.cffand docs/conf.py (and other places it was possibly added).

1. Go to the [GitHub release page](https://github.com/WUR-AI/diffwofost/releases)
1. Press draft a new release button
1. Fill version, title and description field
1. Press the Publish Release button
<!--
For projects that automatically publish to PyPI using a release or publish workflow, something like the following could be useful to add (make sure to replace the names and links):

1. Wait until [PyPi publish workflow](https://github.com/WUR-AI/diffwofost/actions/workflows/publish.yml) has completed
1. Verify new release is on [PyPi](https://pypi.org/project/matchms/#history)
-->
<!--
For projects that also build conda packages, e.g. on conda-forge or Bioconda, something like the following could be useful to add (example taken from matchms, make sure to replace the names and links):

1. Wait until new release is also on Bioconda (https://anaconda.org/bioconda/diffwofost) via a automaticly created PR on [bioconda recipes repo](https://github.com/bioconda/bioconda-recipes/pulls?q=is%3Apr+is%3Aopen+diffwofost)
1. Test diffwofost from bioconda by manually running [Conda verify](https://github.com/WUR-AI/diffwofost/actions/workflows/conda_verify.yml) workflow
-->

Also a Zenodo entry will be made for the release with its own DOI.
1. Check the author list in `CITATION.cff`in
the root of the repository.
2. Bump the version. The version can be manually changed in `pyproject.toml` in
Comment thread
SarahAlidoost marked this conversation as resolved.
the root of the repository. Follow [Semantic Versioning](https://semver.org/)
principles. Also, update `__version__` variable in `diffwofost/__init__.py` to the
same version.
3. Go to the [GitHub release
page](https://github.com/WUR-AI/diffwofost/releases). Press draft a new
release button. Fill version, title and description field. Press the Publish
Release button. For this package, the zenodo integration is enabled, so a new
DOI will be created automatically.
4. This software automatically publish to PyPI using a release or publish
workflow. Wait until [PyPi publish
workflow](https://github.com/WUR-AI/diffwofost/actions/workflows/python-publish.yml)
has completed and verify new release is on
[PyPi](https://pypi.org/project/matchms/#history)
Comment thread
SarahAlidoost marked this conversation as resolved.
Loading