Skip to content

Commit

Permalink
Heat 1.5.1 - Release (#1796)
Browse files Browse the repository at this point in the history
* Bump version to 1.5.1

* add backport label

* updated changelog

* Update CHANGELOG.md

* updated pre-commit

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update CITATION.cff

* Support pytorch 2.6

* Match torchvision to pytorch 2.6

* updated release note

* Updated RELEASE.md

* Merge pull request #1775 from helmholtz-analytics/support/new-pytorch-main

Support PyTorch 2.6.0 / Add zarr as optional dependency

* Removing some cherrypicked stuff

* Update RELEASE.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Heat Release Bot <>
Co-authored-by: Claudia Comito <[email protected]>
Co-authored-by: Gutiérrez Hermosillo Muriedas, Juan Pedro <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fabian Hoppe <[email protected]>
  • Loading branch information
5 people authored Feb 17, 2025
1 parent 7e6e3bc commit 2008688
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 76 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1'
- 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1'
- 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1'
- 'torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0'
exclude:
- py-version: '3.12'
pytorch-version: 'torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/latest-pytorch-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ jobs:
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
reviewers: ClaudiaComito, mtar, mrfh92
labels: interoperability
labels: backport stable, interoperability
draft: true
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-toml
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
rev: 7.1.2
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# v1.5.1
## Changes

### Compatibility
- #1706 Support PyTorch 2.5.1 (#1701) (by @mtar)
- #1775 Support PyTorch 2.6.0 (#1775) (by @mrfh92)

### Bug Fixes
- #1791 `heat.eq`, `heat.ne` now allow non-array operands (by @[github-actions[bot]](https://github.com/apps/github-actions))
- #1790 Fixed precision loss in several functions when dtype is float64 (by @[github-actions[bot]](https://github.com/apps/github-actions))
- #1764 Printing non-distributed data (by @[github-actions[bot]](https://github.com/apps/github-actions))

### CI
- #1750 Linters will no longer format tutorials (by @[github-actions[bot]](https://github.com/apps/github-actions))
- #1708 Documentation updates after new release (by @[github-actions[bot]](https://github.com/apps/github-actions))
- #1743 Modernise setup.py configuration (by @[github-actions[bot]](https://github.com/apps/github-actions))

### Docs
- #1698 Added Dalcin et al. 2018 reference to `manipulations._axis2axisResplit` (by @[github-actions[bot]](https://github.com/apps/github-actions))
- #1745 Easier access to GitHub from the docs (by @[github-actions[bot]](https://github.com/apps/github-actions))

## Contributors
@ClaudiaComito, @JuanPedroGHM, @github-actions[bot], @joernhees, @mrfh92, @mtar and [github-actions[bot]](https://github.com/apps/github-actions) v1.5.1 - Heat 1.5.1

# v1.5.0

## Changes
Expand Down
2 changes: 2 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ authors:
given-names: Tu
- family-names: Tarnawa
given-names: Michael
- family-names: Hees
given-names: Jörn
# core team
# - family-names: Comito
# given-names: Claudia
Expand Down
97 changes: 31 additions & 66 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,60 +18,47 @@ In the following, we assume we are about to release Heat v1.5.0.
- You need [PyPi](https://pypi.org/), [Test.PyPi](https://test.pypi.org/) account
- All intended PRs are merged, all tests have passed, and the `main` branch is ready for release.

1. We will release all new features in the development branch `main`. Branch off `main` to create a new release branch, e.g.:
**Create Pre-release Branch**

```bash
git checkout main
git pull
git checkout -b release/1.5.x
```
1. Got to [this GH Action](https://github.com/helmholtz-analytics/heat/actions/workflows/release-prep.yml) and start a new manual workflow.

2. Create a new branch off `release/1.5.x` and update the version number in `heat/core/version.py`:
a. `Use workflow from` should always be `main`.

```bash
git checkout release/1.5.x
git pull
git checkout -b workflows/version-update
```
b. Set the version number to the next release (1.5.0) in this case.

c. Because this is a major or minor release, the base branch should be `main`.

d. Change the title, if you want to give the release a special name.

Update `heat/core/version.py` like this:
e. Run the workflow.

```python
"""This module contains Heat's version information."""
When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an up-to-date `CHANGELOG.md`. For now, **ignore the PR targeting `main`**. That PR should only be merged after the release has been merged to `stable`.

major: int = 1
"""Indicates Heat's main version."""
minor: int = 4 # <-- update to 5
"""Indicates feature extension."""
micro: int = 2 # <-- update to 0
"""Indicates revisions for bugfixes."""
extension: str = "dev" # <-- set to None
"""Indicates special builds, e.g. for specific hardware."""
```
2. Ensure that the changes to `version.py` and `CHANGELOG.md` are correct, if not, fix them.

3. Commit and push new `version.py` in `workflows/version-update`.
3. If necessary, also update the Requirements section on README.md to reflect the latest version of the dependencies.

4. If necessary, also update the Requirements section on README.md to reflect the latest version of the dependencies.
4. Update `CITATION.cff` if needed, i.e. add names of non-core contributors (they are included in the Release notes draft you just created).

5. Update `CITATION.cff` if needed, i.e. add names of non-core contributors (they are included in the Release notes draft you just created). Push to `workflows/version-update`.

6. Create a pull request from `workflows/version-update` to `release/1.5.x`

- Remember to get a reviewers approval.
5. Once the changes are done:
- Get a reviewers approval.
- ONLY MERGE THE PR FOR `stable`
- DO NOT DELETE THE BRANCH AFTERWARDS.
- Wait for the tests to finish.
- Squash and merge.

7. Draft release notes:
Go to the main repo page, and then to releases (right panel). There should be a draft release with the changes made by the latest release.

6. Draft release notes:

- Go to the GitHub repo's [Releases](https://github.com/helmholtz-analytics/heat/releases) page.
- The release notes draft is automated. Click on Edit Draft
- Select the new tag: v1.5.0. Modify Target branch: `release/1.5.x`
- Edit release notes as needed (see older releases)
- Click on Save **but do not publish yet**

8. Build wheel in your local `heat/` directory, make sure you are on branch `release/1.5.x`.
7. On your local machine, fetch all the changes from origin, checkout the `stable` branch.
8. Build wheel in your local `heat/` directory.

```bash
rm -f dist/*
Expand Down Expand Up @@ -99,50 +86,28 @@ extension: str = "dev" # <-- set to None
- Make sure the CHANGELOG.md got updated, if not, call @JuanPedroGHM.
- Check our [Zenodo page](https://zenodo.org/doi/10.5281/zenodo.2531472) to make sure a DOI was created for the release.

12. On branch `main`, we want to modify the version so that `minor` is increased by 1, and `extension` is "dev". In this example we want the version on `main` to be:`1.6.0-dev`. We need to create a new branch from `main`:

```bash
git checkout main
git pull
git checkout -b workflows/update-version-main
git branch
```

On branch `workflows/update-version-main`, modify `version.py` so that `minor` is increased by 1, and `extension` is `"dev"`. Commit and push the changes.
12. On branch `main`, we want to modify the version so that `minor` is increased by 1, and `extension` is "dev". We also want to merge any changes to the changelog, and overall make sure it is up to date with the latest release changes. That is what the second PR is for. In this example we want the version on `main` to be:`1.6.0-dev`. We go to the left over PR, and change the version number accordingly. Make sure to also fix any merge conflicts.

13. Create a PR with `main` as the base branch.

14. Get approval and merge. You're done! Except if you're a conda-forge maintainer, then see [conda-forge build](#conda-forge-build).
13. Get approval and merge. You're done! Except if you're a conda-forge maintainer, then see [conda-forge build](#conda-forge-build).


### Patch release

(e.g. 1.5.0 --> 1.5.1)

1. Check that all intended branches have been merged to the release branch you want to upgrade, in this example `release/1.5.x`. Create a new branch off `release/1.5.x`, e.g.:

```bash
git checkout release/1.5.x
git pull
git checkout -b workflows/version-update
```
1. Check that all intended branches have been merged to the `stable` branch.

2. Update `heat/core/version.py` like this:
2. Got to [this GH Action](https://github.com/helmholtz-analytics/heat/actions/workflows/release-prep.yml) and start a new manual workflow.

```python
"""This module contains Heat's version information."""
1. `Use workflow from` should always be `main`.
2. Set the version number to the next release (1.5.1 in this case).
3. Because this is a patch release, the base branch should be `stable`.
4. Change the title, if you want to give the release a special name.
5. Run the workflow.

major: int = 1
"""Indicates Heat's main version."""
minor: int = 5
"""Indicates feature extension."""
micro: int = 0 # <-- update to 1
"""Indicates revisions for bugfixes."""
extension: str = None
"""Indicates special builds, e.g. for specific hardware."""
```
When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an update `CHANGELOG.md`. For now, **ignore the PR targeting `main`**. That PR should only be merged after the release has been merged to `stable`.

3. Follow steps 3-14 from the [Major or minor release section](#major-or-minor-release).
3. Follow steps 2-14 from the [Major or minor release section](#major-or-minor-release).


## conda-forge build
Expand Down
2 changes: 1 addition & 1 deletion heat/core/sanitation.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def sanitize_out(


def sanitize_sequence(
seq: Union[Sequence[int, ...], Sequence[float, ...], DNDarray, torch.Tensor]
seq: Union[Sequence[int, ...], Sequence[float, ...], DNDarray, torch.Tensor],
) -> List:
"""
Check if sequence is valid, return list.
Expand Down
2 changes: 1 addition & 1 deletion heat/core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def heat_type_is_complexfloating(ht_dtype: Type[datatype]) -> bool:


def heat_type_of(
obj: Union[str, Type[datatype], Any, Iterable[str, Type[datatype], Any]]
obj: Union[str, Type[datatype], Any, Iterable[str, Type[datatype], Any]],
) -> Type[datatype]:
"""
Returns the corresponding HeAT data type of given object, i.e. scalar, array or iterable. Attempts to determine the
Expand Down
2 changes: 1 addition & 1 deletion heat/core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""Indicates Heat's main version."""
minor: int = 5
"""Indicates feature extension."""
micro: int = 0
micro: int = 1
"""Indicates revisions for bugfixes."""
extension: str = None
"""Indicates special builds, e.g. for specific hardware."""
Expand Down
2 changes: 1 addition & 1 deletion scripts/heat_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" Test script for MPI & Heat installation """
"""Test script for MPI & Heat installation"""

import heat as ht

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
install_requires=[
"mpi4py>=3.0.0",
"numpy>=1.22.0, <2",
"torch>=2.0.0, <2.5.2",
"torch>=2.0.0, <2.6.1",
"scipy>=1.10.0",
"pillow>=6.0.0",
"torchvision>=0.15.2, <0.20.2",
"torchvision>=0.15.2, <0.21.1",
],
extras_require={
"docutils": ["docutils>=0.16"],
Expand Down

0 comments on commit 2008688

Please sign in to comment.