From 59d46e94e58816d6a746749f28f21cb54d0ba764 Mon Sep 17 00:00:00 2001 From: jacotay7 Date: Thu, 20 Nov 2025 09:38:58 -1000 Subject: [PATCH 1/3] PyPi update --- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ pyproject.toml | 10 +++++----- src/aobasis/__init__.py | 7 +++++++ 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e6043f0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +jobs: + build-n-publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + contents: read + + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build distribution + run: python -m build + + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index f987c5f..de95b82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,14 +4,13 @@ build-backend = "setuptools.build_meta" [project] name = "aobasis" -version = "0.1.0" +version = "1.0.0" description = "A package for generating AO basis sets (KL, Zernike, Fourier)" readme = "README.md" -authors = [{ name = "User", email = "user@example.com" }] -license = { file = "LICENSE" } +authors = [{ name = "Jacob Taylor", email = "jacotay7@example.com" }] +license = "MIT" classifiers = [ "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ] dependencies = [ @@ -29,7 +28,8 @@ dev = [ ] [project.urls] -"Homepage" = "https://github.com/example/aobasis" +"Homepage" = "https://github.com/jacotay7/aobasis" +"Bug Tracker" = "https://github.com/jacotay7/aobasis/issues" [tool.setuptools.packages.find] where = ["src"] diff --git a/src/aobasis/__init__.py b/src/aobasis/__init__.py index 6aceda1..e7874db 100644 --- a/src/aobasis/__init__.py +++ b/src/aobasis/__init__.py @@ -1,3 +1,10 @@ +from importlib.metadata import version, PackageNotFoundError + +try: + __version__ = version("aobasis") +except PackageNotFoundError: + __version__ = "unknown" + from .base import BasisGenerator from .kl import KLBasisGenerator from .zernike import ZernikeBasisGenerator From d487b115f83d3b8696a6cc206cea575549d078b7 Mon Sep 17 00:00:00 2001 From: jacotay7 Date: Thu, 20 Nov 2025 09:46:10 -1000 Subject: [PATCH 2/3] email update --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index de95b82..27615c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "aobasis" version = "1.0.0" description = "A package for generating AO basis sets (KL, Zernike, Fourier)" readme = "README.md" -authors = [{ name = "Jacob Taylor", email = "jacotay7@example.com" }] +authors = [{ name = "Jacob Taylor", email = "jtaylor@keck.hawaii.edu" }] license = "MIT" classifiers = [ "Programming Language :: Python :: 3", From bb17fbac7da71f43a0bd1afa309d1084dfc29d13 Mon Sep 17 00:00:00 2001 From: jacotay7 Date: Thu, 20 Nov 2025 09:50:13 -1000 Subject: [PATCH 3/3] 3.8 compatibility issue on license --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 27615c1..3bda75c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = "1.0.0" description = "A package for generating AO basis sets (KL, Zernike, Fourier)" readme = "README.md" authors = [{ name = "Jacob Taylor", email = "jtaylor@keck.hawaii.edu" }] -license = "MIT" +license = { file = "LICENSE" } classifiers = [ "Programming Language :: Python :: 3", "Operating System :: OS Independent",