Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" }]
authors = [{ name = "Jacob Taylor", email = "[email protected]" }]
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
Expand All @@ -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"]
7 changes: 7 additions & 0 deletions src/aobasis/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down