Skip to content

Commit

Permalink
updated whatsnew
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Oct 20, 2024
1 parent b9fda70 commit 6a53047
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 37 deletions.
73 changes: 37 additions & 36 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,79 @@

- this is just a suggestion, feel free to work with VScode or any other git-compatible workflow
- download git from [git-scm.com](https://git-scm.com/download/win), install with default settings
- open git bash window where you want to clone the dfm_tools github repository (e.g. ``C:\DATA\``)
- ``git clone https://github.com/deltares/dfm_tools`` (creates a folder dfm_tools with the checked out repository)
- ``cd dfm_tools``
- optional: ``git config --global user.email [emailaddress]``
- optional: ``git config --global user.name [username]``
- open git bash window where you want to clone the dfm_tools github repository (e.g. `C:\DATA\`)
- `git clone https://github.com/deltares/dfm_tools` (creates a folder dfm_tools with the checked out repository)
- `cd dfm_tools`
- optional: `git config --global user.email [emailaddress]`
- optional: `git config --global user.name [username]`

## Setup local developer environment

- python 3.11 is recommended, [python>=3.9 is required](https://github.com/Deltares/dfm_tools/issues/267), [python 3.13 not yet supported](https://github.com/Deltares/dfm_tools/issues/559)
- download Miniforge3 from [the miniforge github](https://github.com/conda-forge/miniforge?tab=readme-ov-file#download) and install it with the recommended settings.
- open Miniforge Prompt and navigate to the local checkout folder of the repository
- ``conda create --name dfm_tools_env python=3.11 git spyder -y`` (``git`` and ``spyder`` are optional)
- ``conda activate dfm_tools_env``
- ``python -m pip install -e .[dev,docs,examples]`` (pip developer mode, any updates to the local folder are immediately available in your python. It also installs all requirements via pip, square brackets are to install optional dependency groups)
- ``conda deactivate``
- to remove dfm_tools_env when necessary: ``conda remove -n dfm_tools_env --all``
- `conda create --name dfm_tools_env python=3.11 git spyder -y` (`git` and `spyder` are optional)
- `conda activate dfm_tools_env`
- `python -m pip install -e .[dev,docs,examples]` (pip developer mode, any updates to the local folder are immediately available in your python. It also installs all requirements via pip, square brackets are to install optional dependency groups)
- `conda deactivate`
- to remove dfm_tools_env when necessary: `conda remove -n dfm_tools_env --all`

## Contributing

- open an existing issue or create a new issue at [the issues page](https://github.com/Deltares/dfm_tools/issues)
- create a branch via ``Development`` on the right. This branch is now linked to the issue and the issue will be closed once the branch is merged with main again
- create a branch via `Development` on the right. This branch is now linked to the issue and the issue will be closed once the branch is merged with main again
- alternatively fork the repository and do your edits there
- open git bash window in local dfm_tools folder (e.g. ``C:\DATA\dfm_tools``)
- ``git fetch origin`` followed by ``git checkout [branchname]``
- make your local changes to the dfm_tools code (including docstrings and unittests for functions), after each subtask do ``git commit -am 'description of what you did'`` (``-am`` adds all changed files to the commit)
- check if all edits were committed with ``git status``, if there are new files created also do ``git add [path-to-file]`` and commit again
- ``git push`` to push your committed changes your branch on github
- open git bash window in local dfm_tools folder (e.g. `C:\DATA\dfm_tools`)
- `git fetch origin` followed by `git checkout [branchname]`
- make your local changes to the dfm_tools code (including docstrings and unittests for functions), after each subtask do `git commit -am 'description of what you did'` (`-am` adds all changed files to the commit)
- check if all edits were committed with `git status`, if there are new files created also do `git add [path-to-file]` and commit again
- `git push` to push your committed changes your branch on github
- open a pull request at the branch on github, there you can see what you just pushed and the automated checks will show up (testbank and code quality analysis).
- optionally make additional local changes (+commit+push) untill you are done with the issue and the automated checks have passed
- optionally increase the dfm_tools version with: ``bumpversion patch``
- optionally increase the dfm_tools version with: `bumpversion patch`
- request a review on the pull request
- after review, squash+merge the branch into main

## Running the testbank

- open Miniforge Prompt and navigate to the local checkout folder of the repository
- ``conda activate dfm_tools_env``
- ``pytest`` (runs all tests)
- ``pytest -m "not acceptance"``
- ``pytest -m acceptance`` (runs the acceptance tests, which are the scripts in [the examples folder](https://github.com/Deltares/dfm_tools/tree/main/tests/examples))
- ``pytest -m "not requireslocaldata"`` (this is what runs on github)
- `conda activate dfm_tools_env`
- `pytest` (runs all tests)
- `pytest -m "not acceptance"`
- `pytest -m acceptance` (runs the acceptance tests, which are the scripts in [the examples folder](https://github.com/Deltares/dfm_tools/tree/main/tests/examples))
- `pytest -m "not requireslocaldata"` (this is what runs on github)
- this workflow automatically runs via Github Actions upon push and pullrequest to main

## Generate documentation with sphinx

- open Miniforge Prompt and navigate to the local checkout folder of the repository
- ``conda activate dfm_tools_env``
- ``sphinx-build docs docs/_build``
- `conda activate dfm_tools_env`
- `sphinx-build docs docs/_build`
- this workflow automatically runs via Github Actions upon push to main

## Increase the version number

- commit all changes via git
- open Miniforge Prompt and navigate to the local checkout folder of the repository
- ``conda activate dfm_tools_env``
- ``bumpversion major`` or ``bumpversion minor`` or ``bumpversion patch`` (changes version numbers in files and commits changes)
- push changes with ``git push`` (from git bash window)
- `conda activate dfm_tools_env`
- `bumpversion major` or `bumpversion minor` or `bumpversion patch` (changes version numbers in files and commits changes)
- push changes with `git push` (from git bash window)

## Create release

- make sure the ``main`` branch is up to date (check pytest warnings, important issues solved, all pullrequests and branches closed)
- bump the versionnumber with ``bumpversion minor``
- update ``docs/whats-new.md`` and add a date to the current release heading
- make sure the `main` branch is up to date (check pytest warnings, important issues solved, all pullrequests and branches closed)
- bump the versionnumber with `bumpversion minor`
- update `docs/whats-new.md` and add a date to the current release heading
- run local testbank
- local check with: ``python -m build`` and ``twine check dist/*`` ([does not work on WCF](https://github.com/pypa/setuptools/issues/4133))
- copy the dfm_tools version from [pyproject.toml](https://github.com/Deltares/dfm_tools/blob/main/pyproject.toml) (e.g. ``0.11.0``)
- local check with: `python -m build` and `twine check dist/*` ([does not work on WCF](https://github.com/pypa/setuptools/issues/4133))
- copy the dfm_tools version from [pyproject.toml](https://github.com/Deltares/dfm_tools/blob/main/pyproject.toml) (e.g. `0.11.0`)
- create a [new release](https://github.com/Deltares/dfm_tools/releases/new)
- click ``choose a tag`` and type v+versionnumber (e.g. ``v0.11.0``), click ``create new tag: v0.11.0 on publish``
- set the release title to the tagname (e.g. ``v0.11.0``)
- click `Generate release notes` and replace the `What's Changed` info by a tagged link to ``docs/whats-new.md``
- if all is set, click ``Publish release``
- click `choose a tag` and type v+versionnumber (e.g. `v0.11.0`), click `create new tag: v0.11.0 on publish`
- set the release title to the tagname (e.g. `v0.11.0`)
- click `Generate release notes` and replace the `What's Changed` info by a tagged link to `docs/whats-new.md`
- if all is set, click `Publish release`
- a release is created and the github action publishes it [on PyPI](https://pypi.org/project/dfm-tools)
- post-release: commit+push `bumpversion patch` and `UNRELEASED` header in `docs/whats-new.md` to distinct between release and dev version

## What are all these packages for?

Expand Down
2 changes: 1 addition & 1 deletion docs/whats-new.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# What's new

## UNRELEASED
## 0.30.0 (2024-10-20)

### Fix
- fixed cmems-nrt insitu again by dropping station with varying coordinates again in [#1023](https://github.com/Deltares/dfm_tools/pull/1023)
Expand Down

0 comments on commit 6a53047

Please sign in to comment.