Skip to content

Commit 0fbed3c

Browse files
authored
3 setup repo with pypi (#4)
* PyPi update * email update * 3.8 compatibility issue on license
1 parent f524100 commit 0fbed3c

3 files changed

Lines changed: 45 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish to PyPI
10+
runs-on: ubuntu-latest
11+
permissions:
12+
# IMPORTANT: this permission is mandatory for trusted publishing
13+
id-token: write
14+
contents: read
15+
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.x"
24+
25+
- name: Install build dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install build
29+
30+
- name: Build distribution
31+
run: python -m build
32+
33+
- name: Publish distribution 📦 to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "aobasis"
7-
version = "0.1.0"
7+
version = "1.0.0"
88
description = "A package for generating AO basis sets (KL, Zernike, Fourier)"
99
readme = "README.md"
10-
authors = [{ name = "User", email = "user@example.com" }]
10+
authors = [{ name = "Jacob Taylor", email = "jtaylor@keck.hawaii.edu" }]
1111
license = { file = "LICENSE" }
1212
classifiers = [
1313
"Programming Language :: Python :: 3",
14-
"License :: OSI Approved :: MIT License",
1514
"Operating System :: OS Independent",
1615
]
1716
dependencies = [
@@ -29,7 +28,8 @@ dev = [
2928
]
3029

3130
[project.urls]
32-
"Homepage" = "https://github.com/example/aobasis"
31+
"Homepage" = "https://github.com/jacotay7/aobasis"
32+
"Bug Tracker" = "https://github.com/jacotay7/aobasis/issues"
3333

3434
[tool.setuptools.packages.find]
3535
where = ["src"]

src/aobasis/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
from importlib.metadata import version, PackageNotFoundError
2+
3+
try:
4+
__version__ = version("aobasis")
5+
except PackageNotFoundError:
6+
__version__ = "unknown"
7+
18
from .base import BasisGenerator
29
from .kl import KLBasisGenerator
310
from .zernike import ZernikeBasisGenerator

0 commit comments

Comments
 (0)