From d0c361714a9820598537a25c608646304c86a9e9 Mon Sep 17 00:00:00 2001 From: Luuk Blom Date: Mon, 13 Jan 2025 16:59:30 +0100 Subject: [PATCH 1/2] update CONTRIBUTING with release instructions --- CONTRIBUTING.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e2ae819..bc76984f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,3 +50,43 @@ description conforms to the standard. For changelog generation we use [git cliff](https://github.com/orhun/git-cliff). As long as the conventional commit specification is followed as specified above, this should happen automatically with every release. If you wish you can also generate them locally by simply running `git cliff` if you have the tool installed. + + +# Releases + +This section explains how to create new releases for the Python package and how the release process works. + +--- + +## Workflow Overview + +The [release workflow](.github/workflows/publish-to-pypi.yml) is triggered when a new tag is pushed to the repository in the format `v*.*.*` (e.g., `v1.2.3`). It performs the following steps: +1. Validates that the new version is greater than the latest version on PyPI. +2. Installs dependencies and builds the package. +3. Publishes the package to PyPI. +4. Creates a GitHub release with the tag name and release notes. + +--- + +## Steps to Create a New Release + + +1. **Increase the version in [`__init__.py`](flood_adapt/__init__.py)** + Note that the v is excluded here: + ```python + __version__ = "1.2.3" + ``` +2. **Commit and Push** + ```bash + git add . + git commit -m "bump version 1.2.3" + git push + ``` +3. **Create and push a new Tag** + Use the following command to create a tag for the new version: + ```bash + git tag v1.2.3 + git push --tags + ``` + +From here, the workflow should handle everything. You can find the latest release [here](https://github.com/Deltares/FloodAdapt/releases/latest). From ccf222e5c79983c3e3f8702d79810acbedc85de3 Mon Sep 17 00:00:00 2001 From: Luuk Blom Date: Mon, 13 Jan 2025 17:04:09 +0100 Subject: [PATCH 2/2] remove gh url from dependencies --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f24f0cf9..5b311d92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dependencies = [ "jellyfish<1.0", # This is a dependency of us->hydromt-fiat, FloodAdapt doesnt use it directly. Remove when .whl files are available. # jellyfish v1.0 starts requiring rust as a dependency, which is fine if there are built .whl files. BUT THERE ARE NO BUILDS FOR WINDOWS YET. "hydromt-fiat==0.4.2", - "hydromt-sfincs@ git+https://github.com/Deltares/hydromt_sfincs.git@quadtree_io", + "hydromt-sfincs", "numpy < 2.0", "numpy-financial", "pandas",