Skip to content

Commit 30a3f14

Browse files
goanpecavfdev-5
andauthored
Update to use pyproject.toml only (#3413)
* Update to use pyproject.toml only * Update unit test wokflow triggers * Add version from importlib * autopep8 fix * Test hatchling * Replace use of python setup.py install * Resore sed cmd for nightly builds * Remove commented test code on pyproject * Update conda recipe and install command * Add netlify config file * Fix contribute guidelines * Add workflow dispatch to nightly release workflow * Update conda recipe * Update build and release commands * Update git blame ignore with PR#3418 that corrected code style * Update version string on conda build recipe for nightly and stable releases * Update .gitignore --------- Co-authored-by: vfdev-5 <vfdev-5@users.noreply.github.com> Co-authored-by: vfdev <vfdev.5@gmail.com>
1 parent f1f1ce5 commit 30a3f14

15 files changed

+77
-73
lines changed

.github/workflows/binaries-nightly-release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
run: |
2323
sed -i "s/__version__ = \"\(.*\)\"/__version__ = \"\1.dev$(date -u +%Y%m%d)\"/g" ignite/__init__.py
2424
cat ignite/__init__.py
25+
sed -i "s/__version__ = \"\(.*\)\"/__version__ = \"\1.dev$(date -u +%Y%m%d)\"/g" conda.recipe/meta.yaml
26+
cat conda.recipe/meta.yaml
2527
2628
- name: Install dependencies
2729
shell: bash -l {0}
@@ -35,6 +37,7 @@ jobs:
3537
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
3638
UPLOAD_USER: "pytorch-nightly"
3739
run: |
40+
# Update version
3841
chmod +x ./conda.recipe/build_and_upload.sh
3942
./conda.recipe/build_and_upload.sh
4043
@@ -43,8 +46,8 @@ jobs:
4346
run: |
4447
# workaround to fix https://github.com/pytorch/ignite/issues/2373
4548
pip uninstall -y twine pkginfo
46-
pip install --upgrade --no-cache-dir twine 'pkginfo>=1.8.2'
47-
python setup.py sdist bdist_wheel
49+
pip install --upgrade --no-cache-dir hatch twine 'pkginfo>=1.8.2'
50+
hatch build
4851
twine --version
4952
twine check dist/*
5053
TWINE_USERNAME="${{ secrets.PYPI_USER }}" TWINE_PASSWORD="${{ secrets.PYPI_TOKEN }}" twine upload --verbose dist/*

.github/workflows/hvd-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
python -c "import horovod.torch as hvd; hvd.mpi_ops.Sum"
7979
8080
# Install ignite
81-
python setup.py install
81+
pip install .
8282
8383
# Download MNIST: https://github.com/pytorch/ignite/issues/1737
8484
# to "/tmp" for cpu tests

.github/workflows/pytorch-version-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
fi
7979
8080
pip install -r requirements-dev.txt
81-
python setup.py install
81+
pip install .
8282
8383
# pytorch>=1.9.0,<1.11.0 is using "from setuptools import distutils; distutils.version.LooseVersion" anti-pattern
8484
# which raises the error: AttributeError: module 'distutils' has no attribute 'version' for setuptools>59

.github/workflows/stable-release-anaconda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
shell: bash -l {0}
2121
run: |
2222
conda install -y pytorch torchvision cpuonly -c pytorch
23-
python setup.py install
23+
pip install .
2424
2525
- name: Build and Publish Conda binaries
2626
shell: bash -l {0}

.github/workflows/stable-release-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
run: |
2828
# workaround to fix https://github.com/pytorch/ignite/issues/2373
2929
pip uninstall -y twine pkginfo
30-
pip install --upgrade --no-cache-dir twine 'pkginfo>=1.8.2'
31-
python setup.py sdist bdist_wheel
30+
pip install --upgrade --no-cache-dir hatch twine 'pkginfo>=1.8.2'
31+
hatch build
3232
twine --version
3333
twine check dist/*
3434
TWINE_USERNAME="${{ secrets.PYPI_USER }}" TWINE_PASSWORD="${{ secrets.PYPI_TOKEN }}" twine upload --verbose dist/*

.github/workflows/tpu-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
7979
## Install test deps and Ignite
8080
pip install -r requirements-dev.txt
81-
python setup.py install
81+
pip install .
8282
8383
# Download MNIST: https://github.com/pytorch/ignite/issues/1737
8484
# to "/tmp" for tpu tests

.github/workflows/unit-tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@ on:
55
- master
66
- "*.*.*"
77
paths:
8+
- "examples/**.py"
89
- "ignite/**"
10+
- "pyproject.toml"
911
- "tests/ignite/**"
10-
- "tests/run_cpu_tests.sh"
1112
- "tests/run_code_style.sh"
12-
- "examples/**.py"
13+
- "tests/run_cpu_tests.sh"
1314
- "requirements-dev.txt"
1415
- ".github/workflows/unit-tests.yml"
1516
pull_request:
1617
paths:
18+
- "examples/**.py"
1719
- "ignite/**"
20+
- "pyproject.toml"
1821
- "tests/ignite/**"
19-
- "tests/run_cpu_tests.sh"
2022
- "tests/run_code_style.sh"
21-
- "examples/**.py"
23+
- "tests/run_cpu_tests.sh"
2224
- "requirements-dev.txt"
2325
- ".github/workflows/unit-tests.yml"
2426
workflow_dispatch:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ coverage.xml
4444
# Virtualenv
4545
.venv/
4646
.python-version
47+
conda_build/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ upstream https://github.com/pytorch/ignite (push)
102102

103103
```bash
104104
git pull upstream master
105-
python setup.py develop
105+
pip install -e .
106106
pip install -r requirements-dev.txt
107107
bash ./tests/run_code_style.sh install
108108
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- ![Ignite Logo](assets/logo/ignite_logo_mixed.svg) -->
44

5-
<img src="assets/logo/ignite_logo_mixed.svg" width=512>
5+
<img src="https://raw.githubusercontent.com/pytorch/ignite/master/assets/logo/ignite_logo_mixed.svg" width=512>
66

77
<!-- [![image](https://travis-ci.com/pytorch/ignite.svg?branch=master)](https://travis-ci.com/pytorch/ignite) -->
88

@@ -23,7 +23,7 @@ Ignite is a high-level library to help with training and evaluating neural netwo
2323

2424
<a href="https://colab.research.google.com/github/pytorch/ignite/blob/master/assets/tldr/teaser.ipynb">
2525
<img alt="PyTorch-Ignite teaser"
26-
src="assets/tldr/pytorch-ignite-teaser.gif"
26+
src="https://raw.githubusercontent.com/pytorch/ignite/master/assets/tldr/pytorch-ignite-teaser.gif"
2727
width=532>
2828
</a>
2929

0 commit comments

Comments
 (0)