Skip to content

Commit

Permalink
Prepare v0.3.1 (#38)
Browse files Browse the repository at this point in the history
### What kind of change does this PR introduce?

* Prepares v0.3.1
* Updates the versions of GitHub Actions to use their commit hashes
* Adds the step-security/harden-runner Actions (security measure)
* Updates the README.md and CHANGELOG.md to use `https` for Raven
project URLs and to clarify the relation to `RavenPy`

### Does this PR introduce a breaking change?

`CHANGES.md` is now `CHANGELOG.md`.

### Other information:

Why "CHANGELOG.md"?
https://keepachangelog.com/en/1.0.0/#frequently-asked-questions
  • Loading branch information
Zeitsperre authored Jun 17, 2024
2 parents cf52f26 + e9efd90 commit 64f6ad3
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- This PR fixes #xyz
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] (If applicable) Documentation has been added / updated (for bug fixes / features)
- [ ] CHANGES.rst has been updated (with summary of main changes)
- [ ] CHANGELOG.rst has been updated (with summary of main changes)

### What kind of change does this PR introduce?

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,23 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
submodules: true
- name: Set up Python${{ matrix.python-version }}
if: ${{ !matrix.conda }}
id: pyinstalled
uses: actions/setup-python@v5
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python${{ matrix.python-version }} with NetCDF4 (conda)
if: ${{ matrix.conda }}
uses: mamba-org/setup-micromamba@v1
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0
with:
cache-downloads: true
cache-environment: true
Expand All @@ -89,7 +93,7 @@ jobs:
sudo apt-get install libnetcdf-dev
- name: Install NetCDF4 (macOS/homebrew)
if: (matrix.os == 'macos-latest') && (!matrix.conda)
uses: tecolicom/actions-use-homebrew-tools@v1
uses: tecolicom/actions-use-homebrew-tools@5c37fd17a71166ce64ee8ba712f6f2b8c4e6089a # v1.2
with:
tools: netcdf
cache: yes
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
submodules: true
Expand Down Expand Up @@ -87,12 +91,16 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/download-artifact@v4
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
id: download
with:
name: artifact
path: dist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
with:
print-hash: true
16 changes: 12 additions & 4 deletions .github/workflows/tag-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ jobs:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
submodules: true
- name: Set up Python3
id: pyinstalled
uses: actions/setup-python@v5
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: ${{ matrix.python-version }}
# - name: Set up Python${{ matrix.python-version }} with NetCDF4 (conda)
Expand Down Expand Up @@ -84,13 +88,17 @@ jobs:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
id: download
with:
name: artifact
path: dist
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
with:
print-hash: true
repository-url: https://test.pypi.org/legacy/
Expand Down
2 changes: 1 addition & 1 deletion CHANGES.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes

## 0.3.1 (unreleased)
## 0.3.1 (2024-06-17)

* Updated the `RavenHydroFramework` to v3.8.1.
* `RavenHydroFramework` now compiles with the ``Release`` build type by default.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

<!-- cut after this -->

Raven-hydro is a Python-based installer for the hydrologic modelling framework [Raven](http://raven.uwaterloo.ca/).
Raven-hydro is a Python-based installer for the hydrologic modelling framework [Raven](https://raven.uwaterloo.ca/).

- Free software: Apache Software License v2.0

### About

[Raven](http://raven.uwaterloo.ca) is a hydrological modeling framework that lets hydrologists build hydrological models by combining different hydrological processes together. It can also be used to emulate a variety of existing lumped and distributed models. Model structure, parameters, initial conditions and forcing files are configured in text files, which Raven parses to build and run hydrological simulations. A detailed description about modeling capability of Raven can be found in the [docs](https://www.civil.uwaterloo.ca/raven/files/v3.6/RavenManual_v3.6.pdf).
[Raven](https://raven.uwaterloo.ca) is a hydrological modeling framework that lets hydrologists build hydrological models by combining different hydrological processes together. It can also be used to emulate a variety of existing lumped and distributed models. Model structure, parameters, initial conditions and forcing files are configured in text files, which Raven parses to build and run hydrological simulations. A detailed description about modeling capability of Raven can be found in the [docs](https://raven.uwaterloo.ca/files/v3.8/RavenManual_v3.8.pdf).

### Purpose

The goal of this project is to provide a Python-based multiplatform installer for the Raven hydrological model using [scikit-build-core](https://github.com/scikit-build/scikit-build-core) and [pybind11](https://github.com/pybind/pybind11). The compiled binary is built with support for [NetCDF4](https://www.unidata.ucar.edu/software/netcdf/), and uses a custom `CMakeLists.txt`, rather than the one provided with the [Raven source code](http://raven.uwaterloo.ca/Downloads.html), in order to leverage *pip* for handling the installation and management of binaries and libraries.
The goal of this project is to provide a Python-based multiplatform installer for the Raven hydrological model using [scikit-build-core](https://github.com/scikit-build/scikit-build-core) and [pybind11](https://github.com/pybind/pybind11). The compiled binary is built with support for [NetCDF4](https://www.unidata.ucar.edu/software/netcdf/), and uses a custom `CMakeLists.txt`, rather than the one provided with the [Raven source code](https://raven.uwaterloo.ca/Downloads.html), in order to leverage *pip* for handling the installation and management of binaries and libraries.

This project differs from [RavenPy](https://github.com/CSHS-CWRA/RavenPy) by solely providing a means for downloading, compiling, and installing the Raven binary (with NetCDF4 support) on multiple platforms and as well as providing version control and updating via *pip*/PyPI.
This project supports [RavenPy](https://github.com/CSHS-CWRA/RavenPy) by providing a dedicated library for downloading, compiling, and installing the Raven binary (with NetCDF4 support by default) on multiple platforms, as well as providing version control and updates via *pip*/PyPI.

The source code for Raven is not included in this repository, but is fetched from the releases of [RavenHydroFramework GitHub repository](https://github.com/CSHS-CWRA/RavenHydroFramework) and compiled during the installation process.

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ end-before = "\n\n<!-- but before this -->"
[tool.scikit-build]
build-dir = "build"
experimental = true
minimum-version = "0.8"
minimum-version = "0.9"

[tool.scikit-build.cmake]
version = ">=3.26.1"
Expand Down Expand Up @@ -95,7 +95,7 @@ version = ">=1.11.0"
include = [
".zenodo.json",
"AUTHORS.md",
"CHANGES.md",
"CHANGELOG.md",
"CMakeLists.txt",
"LICENSE",
"README.md",
Expand Down

0 comments on commit 64f6ad3

Please sign in to comment.