Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioning and Automatic Deployment #66

Merged
merged 7 commits into from
Mar 10, 2023
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
autokoopman/_version.py export-subst
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish AutoKoopman

on: [push]

jobs:
publish-whl:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Prepare build requirements
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
11 changes: 10 additions & 1 deletion autokoopman/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@
"Sergiy Bogomolov",
]
__license__ = "GPLv3"
__version__ = "0.21"
__maintainer__ = "Ethan Lew"
__email__ = "ethanlew16@gmail.com"
__status__ = "Prototype"

# we auto-manage versions
from ._version import get_versions

__version__ = get_versions()["version"]
del get_versions

from autokoopman.autokoopman import auto_koopman

from autokoopman.core.system import (
Expand All @@ -30,3 +35,7 @@
UniformTimeTrajectoriesData,
UniformTimeTrajectory,
)

from . import _version

__version__ = _version.get_versions()["version"]
Loading