Skip to content

Commit b5691ab

Browse files
authored
Merge pull request #1793 from pyiron/hatch
Transition from versioneer to hatchling
2 parents 460cab3 + 533b126 commit b5691ab

File tree

13 files changed

+54
-751
lines changed

13 files changed

+54
-751
lines changed

.ci_support/environment-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ dependencies:
3131
- pyxtal =0.6.2
3232
- jupyter-book =1.0.0
3333
- sphinx_parser =0.0.3
34+
- hatchling =1.27.0
35+
- hatch-vcs =0.5.0

.ci_support/environment-old.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ dependencies:
2727
- spglib =2.0.2
2828
- structuretoolkit =0.0.29
2929
- sphinx_parser =0.0.1
30+
- hatchling =1.27.0
31+
- hatch-vcs =0.5.0

.ci_support/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ dependencies:
2727
- structuretoolkit =0.0.34
2828
- sphinx_parser =0.0.3
2929
- pyxtal =0.6.2
30+
- hatchling =1.27.0
31+
- hatch-vcs =0.5.0

.ci_support/test_backwards.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ for t in tests/backwards/*save.py; do
77
python $t
88
done
99

10-
pip install versioneer[toml]==0.29
1110
pip install . --no-deps --no-build-isolation
1211
i=0;
1312
echo "Before loading";

.github/workflows/deploy.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ jobs:
2727
miniforge-version: latest
2828
condarc-file: .condarc
2929
environment-file: .ci_support/environment.yml
30-
- name: Convert dependencies
31-
run: |
32-
cp .ci_support/environment-old.yml environment.yml
33-
python .ci_support/release.py; cat pyproject.toml
3430
- name: Build
3531
shell: bash -l {0}
3632
run: |
37-
pip install versioneer[toml]==0.29
38-
python setup.py sdist bdist_wheel
33+
cp .ci_support/environment-old.yml environment.yml
34+
python .ci_support/release.py; cat pyproject.toml
35+
git update-index --assume-unchanged pyproject.toml pyiron_atomistics/_version.py
36+
hatchling build -t sdist -t wheel
3937
- name: Publish distribution 📦 to PyPI
4038
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/integration.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ jobs:
3333
- name: Test
3434
shell: bash -l {0}
3535
run: |
36-
pip install versioneer[toml]==0.29
3736
pip install . --no-deps --no-build-isolation
3837
./.ci_support/build_integration_notebooks.sh

.github/workflows/pipeline.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ jobs:
5858
- name: Pip check
5959
shell: bash -l {0}
6060
run: |
61-
pip install versioneer[toml]==0.29
6261
pip install . --no-deps --no-build-isolation
6362
pip check
6463
@@ -117,7 +116,6 @@ jobs:
117116
timeout-minutes: 30
118117
run: |
119118
python .ci_support/pyironconfig.py
120-
pip install versioneer[toml]==0.29
121119
pip install . --no-deps --no-build-isolation
122120
python -m unittest discover test_benchmarks
123121
@@ -141,7 +139,6 @@ jobs:
141139
- name: Test
142140
shell: bash -l {0}
143141
run: |
144-
pip install versioneer[toml]==0.29
145142
pip install . --no-deps --no-build-isolation
146143
./.ci_support/build_notebooks.sh
147144
@@ -184,9 +181,8 @@ jobs:
184181
timeout-minutes: 30
185182
run: |
186183
python .ci_support/pyironconfig.py
187-
pip install versioneer[toml]==0.29
188184
pip install . --no-deps --no-build-isolation
189-
coverage run --omit="pyiron_atomistics/_version.py,tests/*" -m unittest discover tests
185+
coverage run
190186
coverage xml
191187
- name: Upload coverage reports to Codecov
192188
if: matrix.label == 'linux-64-py-3-12'
@@ -213,7 +209,6 @@ jobs:
213209
timeout-minutes: 30
214210
run: |
215211
python .ci_support/pyironconfig.py
216-
pip install versioneer[toml]==0.29
217212
pip install . --no-deps --no-build-isolation
218213
python -m unittest discover tests
219214

.readthedocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ build:
1212
jobs:
1313
pre_build:
1414
# Generate the Sphinx configuration for this Jupyter Book so it builds.
15-
- pip install versioneer[toml]==0.29
1615
- pip install . --no-deps --no-build-isolation
1716
- "cp README.md docs"
1817
- "cp notebooks/*.ipynb docs"

binder/environment.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ dependencies:
3535
- sphinxdft-data =0.0.1
3636
- nglview =3.1.2
3737
- seaborn =0.13.2
38+
- hatchling =1.27.0
39+
- hatch-vcs =0.5.0

pyiron_atomistics/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from pyiron_base import JOB_CLASS_DICT, Notebook, install_dialog
22
from pyiron_base import Project as ProjectBase
33

4+
import pyiron_atomistics._version
45
from pyiron_atomistics.atomistics.structure.atoms import (
56
Atoms,
67
ase_to_pyiron,
@@ -57,9 +58,7 @@
5758
}
5859
)
5960

60-
from ._version import get_versions
61-
62-
__version__ = get_versions()["version"]
61+
__version__ = pyiron_atomistics._version.__version__
6362

6463

6564
def install():

0 commit comments

Comments
 (0)