Skip to content

Commit

Permalink
Update for hatch versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
moble committed Nov 28, 2023
1 parent 4e7edb8 commit f02292e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,22 @@ jobs:
echo "new_version: '${new_version}'"
echo "new_version=${new_version}" >> $GITHUB_ENV # Save env variable for later steps
- name: Update CITATION.cff
shell: bash
env:
timestamp: ${{ github.event.head_commit.timestamp }}
run: |
new_date=${timestamp:0:10}
sed -i -- "s/^version:.*/version: ${new_version}/" CITATION.cff
sed -i -- "s/^date-released:.*/date-released: ${new_date}/" CITATION.cff
echo "Updated CITATION.cff with version ${new_version} and date ${new_date}"
- name: Tag and push new version
shell: bash
run: |
git config user.name github-actions
git config user.email [email protected]
git add pyproject.toml
git add CITATION.cff quaternionic/__version__.py
git commit -m "Bump version to v${new_version}"
git tag -a "v${new_version}" -m "Version ${new_version}"
git status
Expand Down
11 changes: 11 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Boyle
given-names: Michael
orcid: https://orcid.org/0000-0002-5075-5116
title: "The quaternionic package"
license: MIT
doi: 10.5281/zenodo.4097227
version: 1.0.6
date-released: 2023-02-07
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "quaternionic"
version = "1.0.6"
dynamic = ["version"]
description = "Interpret numpy arrays as quaternionic arrays with numba acceleration"
readme = "README.md"
requires-python = ">=3.8"
Expand All @@ -17,7 +17,6 @@ classifiers = [
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Astronomy"
]

dependencies = [
"numpy >=1.20",
"scipy >=1.5",
Expand All @@ -26,13 +25,17 @@ dependencies = [

[project.urls]
Homepage = "https://github.com/moble/quaternionic"
Documentation = "https://sxs.readthedocs.io/"
Documentation = "https://quaternionic.readthedocs.io/"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"



[tool.hatch.version]
path = "quaternionic/__version__.py"

[tool.hatch.envs.default]
dependencies = [
"pytest",
Expand Down
1 change: 1 addition & 0 deletions quaternionic/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.0.6"

0 comments on commit f02292e

Please sign in to comment.