From c6aa619bd9668b12a5bab14ff3ca9d9b8b2c4de1 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 10:54:27 -0300 Subject: [PATCH 1/8] Converted to pyproject.toml --- pyproject.toml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..235c073 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[project] +name = "sdf" +version = "0.1" +description = "Generate 3D meshes from signed distance functions." +authors = [{ name = "Michael Fogleman", email = "michael.fogleman@gmail.com" }] +license = { text = "MIT" } +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Natural Language :: English", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", +] +dependencies = [ + "matplotlib", + "meshio", + "numpy", + "scikit-image>=0.17", + "scipy", + "Pillow", +] + +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + + +[tool.setuptools] +packages = ["sdf"] From 21c1220fe7a11e6555e0607596c004aa5eaf509f Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 10:54:32 -0300 Subject: [PATCH 2/8] Removed setup.py --- setup.py | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index 72417e6..0000000 --- a/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -from setuptools import setup - -setup( - name='sdf', - version='0.1', - description='Generate 3D meshes from signed distance functions.', - author='Michael Fogleman', - author_email='michael.fogleman@gmail.com', - packages=['sdf'], - install_requires=[ - 'matplotlib', - 'meshio', - 'numpy', - 'scikit-image>=0.17', - 'scipy', - 'Pillow', - ], - license='MIT', - classifiers=( - 'Development Status :: 3 - Alpha', - 'Intended Audience :: Developers', - 'Natural Language :: English', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - ), -) From 74741ca0290c3e049b8f7c6b20f311564d74cf03 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 11:18:32 -0300 Subject: [PATCH 3/8] Creating workflow --- .github/workflows/publish-pypi.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/publish-pypi.yaml diff --git a/.github/workflows/publish-pypi.yaml b/.github/workflows/publish-pypi.yaml new file mode 100644 index 0000000..5ba2cef --- /dev/null +++ b/.github/workflows/publish-pypi.yaml @@ -0,0 +1,26 @@ +name: publish-pypi + +on: [push, pull_request] + +jobs: + publish-pypi: + name: Publish distribution 📦s to PyPI/TestPyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/sdflab + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install pypa/build + run: python -m pip install build twine --upgrade --user + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + - name: Check with twine + run: twine check dist/* + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 85361fb27561c5eafb177a0eee37f884eff19430 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 11:24:21 -0300 Subject: [PATCH 4/8] Creating workflow --- .github/workflows/publish-pypi.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-pypi.yaml b/.github/workflows/publish-pypi.yaml index 5ba2cef..b7d4fde 100644 --- a/.github/workflows/publish-pypi.yaml +++ b/.github/workflows/publish-pypi.yaml @@ -24,3 +24,5 @@ jobs: run: twine check dist/* - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} From b2e2547c9322d87215687257ab32faa7b553465f Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 11:26:16 -0300 Subject: [PATCH 5/8] Creating workflow --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 235c073..d7d5ee9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "sdf" +name = "sdflab" version = "0.1" description = "Generate 3D meshes from signed distance functions." authors = [{ name = "Michael Fogleman", email = "michael.fogleman@gmail.com" }] From 077df8b0b5ca6c6b39683c9c324592b92cb751fa Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 11:30:49 -0300 Subject: [PATCH 6/8] Added readme --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d7d5ee9..46113e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,10 @@ [project] name = "sdflab" -version = "0.1" +version = "0.1.1" description = "Generate 3D meshes from signed distance functions." authors = [{ name = "Michael Fogleman", email = "michael.fogleman@gmail.com" }] license = { text = "MIT" } +readme = "README.md" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", From 34d841a9011ee2def1a24274bc83c665e1fec41b Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 15:23:52 -0300 Subject: [PATCH 7/8] Publish on push version tag --- .github/workflows/publish-pypi.yaml | 14 +++++++++++--- pyproject.toml | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-pypi.yaml b/.github/workflows/publish-pypi.yaml index b7d4fde..49aa9bd 100644 --- a/.github/workflows/publish-pypi.yaml +++ b/.github/workflows/publish-pypi.yaml @@ -1,27 +1,35 @@ name: publish-pypi -on: [push, pull_request] +on: + push: + tags: + - v* jobs: publish-pypi: - name: Publish distribution 📦s to PyPI/TestPyPI + name: Publish distribution 📦s to PyPI runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/sdflab + url: https://pypi.org/p/sdf permissions: id-token: write steps: - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" + - name: Install pypa/build run: python -m pip install build twine --upgrade --user + - name: Build a binary wheel and a source tarball run: python -m build --sdist --wheel --outdir dist/ . + - name: Check with twine run: twine check dist/* + - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/pyproject.toml b/pyproject.toml index 46113e7..55da188 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] -name = "sdflab" -version = "0.1.1" +name = "sdf" +version = "0.1" description = "Generate 3D meshes from signed distance functions." authors = [{ name = "Michael Fogleman", email = "michael.fogleman@gmail.com" }] license = { text = "MIT" } From edb75469b569bbb20d32b6a733c6f0f3475329b6 Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Fri, 20 Dec 2024 15:38:25 -0300 Subject: [PATCH 8/8] Publish on push version tag --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 55da188..8f11876 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,5 @@ dependencies = [ requires = ["setuptools>=42", "wheel"] build-backend = "setuptools.build_meta" - [tool.setuptools] packages = ["sdf"]