Skip to content

Commit

Permalink
Migrate to hatch
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson committed Apr 29, 2024
1 parent e39d59c commit 21d2831
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 3,114 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
python-version: "3.10"

- name: Install pypa/build and chartpress
run: python -m pip install build wheel chartpress pyyaml
run: python -m pip install hatch build wheel chartpress pyyaml

# chartpress pushes a packages Helm chart to dask/helm-chart's gh-pages
# branch, so we need to have a git user.email and user.name configured
Expand All @@ -27,14 +27,11 @@ jobs:
- name: Build distributions
shell: bash -l {0}
run: python setup.py sdist bdist_wheel
run: hatch build

- name: Publish package to PyPI
if: github.repository == 'dask/dask-kubernetes' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
uses: pypa/gh-action-pypi-publish@release/v1

- name: Get the version
id: get_version
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,7 @@ credentials.csv

# IDEs
.idea/
.vscode/
.vscode/

# Version
_version.py
10 changes: 8 additions & 2 deletions dask_kubernetes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from warnings import warn

from . import config
from . import _version

from .common.auth import (
AutoRefreshConfiguration,
AutoRefreshKubeConfigLoader,
Expand All @@ -15,7 +15,13 @@
from .helm import HelmCluster

__all__ = ["HelmCluster", "KubeCluster"]
__version__ = _version.get_versions()["version"]

try:
from ._version import version as __version__ # noqa
from ._version import version_tuple as __version_tuple__ # noqa
except ImportError:
__version__ = "0.0.0"
__version_tuple__ = (0, 0, 0)


def __getattr__(name):
Expand Down
Loading

0 comments on commit 21d2831

Please sign in to comment.