Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hatch for version #998

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ The recommended way to make a release is to use [`jupyter_releaser`](https://git

```bash
export VERSION=<version>
pip install jupyter_releaser
tbump --only-patch $VERSION
pip install pipx
pipx run hatch version $VERSION
git commit -a -m "Release $VERSION"
git tag $VERSION; true;
git push --all
git push --tags
rm -rf dist build
python -m build .
twine check dist/*
twine upload dist/*
pipx run build .
pipx run twine check dist/*
pipx run twine upload dist/*
```
2 changes: 1 addition & 1 deletion ipykernel/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import re
from typing import List

# Version string must appear intact for tbump versioning
# Version string must appear intact for hatch versioning
__version__ = "6.15.3"

# Build up version_info tuple for backwards compatibility
Expand Down
22 changes: 4 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "ipykernel"
version = "6.15.3"
dynamic = ["version"]
authors = [{name = "IPython Development Team", email = "ipython-dev@scipy.org"}]
license = {file = "COPYING.md"}
readme = "README.md"
Expand Down Expand Up @@ -48,6 +48,9 @@ test = [
"pytest-timeout",
]

[tool.hatch.version]
path = "ipykernel/_version.py"

# Used to call hatch_build.py
[tool.hatch.build.hooks.custom]

Expand All @@ -60,23 +63,6 @@ test = [
[tool.jupyter-releaser]
skip = ["check-links"]

[tool.tbump.version]
current = "6.15.3"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
'''

[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"

[[tool.tbump.file]]
src = "ipykernel/_version.py"

[[tool.tbump.file]]
src = "pyproject.toml"

[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
Expand Down