Skip to content

Commit

Permalink
use hatch for versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgafni committed Oct 7, 2024
1 parent 45abdd4 commit 44f306d
Show file tree
Hide file tree
Showing 4 changed files with 531 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
if: contains(github.ref, 'refs/tags/')
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: release
steps:
- name: Setup Python
uses: actions/setup-python@v2
Expand All @@ -107,7 +109,7 @@ jobs:
enable-cache: true
- name: Set up Python ${{ matrix.py }}
run: uv python install
- name: Generate Version
run: uv run hatch version $(dunamai from any --style pep440)
- name: Publish to PyPI
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish
2 changes: 1 addition & 1 deletion dagster_ray/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.0" # this field is managed by poetry-dynamic-versioning
__version__ = "0.0.0" # this field is managed by hatch
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
name = "dagster-ray"
urls = { repository = "https://github.com/danielgafni/dagster-ray" }
description = "Dagster integration library for Ray"
version = "0.0.0"
authors = [
{name = "Daniel Gafni", email = "[email protected]"},
]
Expand Down Expand Up @@ -33,6 +32,8 @@ dependencies = [
"tenacity>=8.0.0"
]

dynamic = ["version"]

[project.optional-dependencies]
executor = [
"ray[client]"
Expand All @@ -55,13 +56,18 @@ dev-dependencies = [
"pytest-kubernetes<1.0.0,>=0.3.1",
"blacken-docs<2.0.0,>=1.16.0",
"ray[client]>=2.7.0",
"hatch>=1.12.0",
"dunamai>=1.22.0",
]


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

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

[tool.pytest.ini_options]
addopts = "-vvv --capture=no --log-disable=faker"
log_cli = true
Expand Down
Loading

0 comments on commit 44f306d

Please sign in to comment.