File tree Expand file tree Collapse file tree 4 files changed +84
-2
lines changed
Expand file tree Collapse file tree 4 files changed +84
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Test & Publish PyPI Release
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ permissions :
8+ id-token : write
9+ contents : read
10+
11+ jobs :
12+ test-pypi :
13+ name : Test PyPI Release
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Set up Python
22+ uses : actions/setup-python@v5
23+ with :
24+ python-version : " 3.10"
25+
26+ - name : Install build dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ python -m pip install build
30+
31+ - name : Build package
32+ run : python -m build
33+
34+ - name : Publish to TestPyPI
35+ uses : pypa/gh-action-pypi-publish@release/v1
36+ with :
37+ repository-url : https://test.pypi.org/legacy/
38+
39+ - name : Wait for TestPyPI to update
40+ run : sleep 120
41+
42+ - name : Verify TestPyPI installation
43+ run : |
44+ python -m pip install \
45+ --index-url https://test.pypi.org/simple/ \
46+ --extra-index-url https://pypi.org/simple \
47+ nebari-mlflow-plugin
48+
49+ release-pypi :
50+ name : Publish to PyPI
51+ needs : test-pypi
52+ runs-on : ubuntu-latest
53+ steps :
54+ - name : Checkout repository
55+ uses : actions/checkout@v4
56+ with :
57+ fetch-depth : 0
58+
59+ - name : Set up Python
60+ uses : actions/setup-python@v5
61+ with :
62+ python-version : " 3.10"
63+
64+ - name : Install build dependencies
65+ run : |
66+ python -m pip install --upgrade pip
67+ python -m pip install build
68+
69+ - name : Build package
70+ run : python -m build
71+
72+ - name : Publish to PyPI
73+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ share/python-wheels/
2626* .egg
2727MANIFEST
2828
29+ # Auto-generated version file
30+ src /nebari_mlflow_plugin /_version.py
31+
2932# PyInstaller
3033# Usually these files are written by a python script from a template
3134# before PyInstaller builds the exe, so as to inject date/other infos into it.
Original file line number Diff line number Diff line change 11[build-system ]
2- requires = [" hatchling" ]
2+ requires = [" hatchling" , " hatch-vcs " ]
33build-backend = " hatchling.build"
44
55[project ]
@@ -42,7 +42,8 @@ Issues = "https://github.com/Quansight/nebari-mlflow-plugin/issues"
4242Source = " https://github.com/Quansight/nebari-mlflow-plugin"
4343
4444[tool .hatch .version ]
45- path = " src/nebari_mlflow_plugin/__about__.py"
45+ source = " vcs"
46+ version-file = " src/nebari_mlflow_plugin/_version.py"
4647
4748[tool .black ]
4849target-version = [" py310" ]
Original file line number Diff line number Diff line change 88from nebari .schema import Base , ProviderEnum
99from pydantic import Field
1010
11+ try :
12+ from nebari_mlflow_plugin ._version import __version__
13+ except ImportError :
14+ __version__ = "unknown"
15+
1116
1217class MlflowConfigAWS (Base ):
1318 enable_s3_encryption : bool | None = True
You can’t perform that action at this time.
0 commit comments