diff --git a/.github/scripts/make-package b/.github/scripts/conda-package-build similarity index 100% rename from .github/scripts/make-package rename to .github/scripts/conda-package-build diff --git a/.github/scripts/release b/.github/scripts/conda-package-release similarity index 100% rename from .github/scripts/release rename to .github/scripts/conda-package-release diff --git a/.github/scripts/install-conda b/.github/scripts/install-conda index 196bd3e..20e9e94 100755 --- a/.github/scripts/install-conda +++ b/.github/scripts/install-conda @@ -1,11 +1,11 @@ #!/bin/bash -eux -url=https://github.com/conda-forge/miniforge/releases/download/23.1.0-4/Miniforge3-23.1.0-4-Linux-x86_64.sh +url=https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Miniforge3-23.11.0-0-Linux-x86_64.sh wget --no-verbose $url bash $(basename $url) -bfp conda ( set -e +ux source conda/etc/profile.d/conda.sh conda activate - conda install -q -y -c maddenp --repodata-fn repodata.json anaconda-client condev + conda install -q -y -c maddenp --repodata-fn repodata.json anaconda-client build condev twine ) diff --git a/.github/scripts/pypi-package-build b/.github/scripts/pypi-package-build new file mode 100755 index 0000000..fbb9714 --- /dev/null +++ b/.github/scripts/pypi-package-build @@ -0,0 +1,7 @@ +#!/bin/bash -eux + +set +ux +source conda/etc/profile.d/conda.sh +conda activate +set -ux +python -m build --no-isolation src diff --git a/.github/scripts/pypi-package-release b/.github/scripts/pypi-package-release new file mode 100755 index 0000000..b89eba8 --- /dev/null +++ b/.github/scripts/pypi-package-release @@ -0,0 +1,7 @@ +#!/bin/bash -eux + +set +ux +source conda/etc/profile.d/conda.sh +conda activate +set -ux +twine upload --repository pypi --username __token__ --password $PYPI_TOKEN src/dist/*.whl diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca734b8..13651b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,19 +6,26 @@ on: push: branches: - main + workflow_dispatch: + branches: + - '**' jobs: ci: - name: CI + name: ci runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install conda - run: .github/scripts/install-conda - - name: Make package - run: .github/scripts/make-package - name: Check tag run: .github/scripts/tag-check - - name: Release - run: .github/scripts/release + - name: Install conda + run: .github/scripts/install-conda + - name: Build conda package + run: .github/scripts/conda-package-build + - name: Publish conda package + run: .github/scripts/conda-package-release + - name: Build PyPI package + run: .github/scripts/pypy-package-build + - name: Release PyPI package + run: .github/scripts/pypy-package-release - name: Tag run: .github/scripts/tag-create diff --git a/README.md b/README.md index 524bace..044db34 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **It's One Thing After Another** -A tiny workflow manager with semantics similar to those of [Luigi](https://github.com/spotify/luigi), but with tasks defined as decorated Python functions (or methods, but "functions" will be used in this document). `iotaa` is pure Python, relies on no third-party packages, and is contained in a single module. +A simple workflow engine with semantics inspired by [Luigi](https://github.com/spotify/luigi) and tasks expressed as decorated Python functions (or methods, but "functions" will be used in this document). `iotaa` is pure Python, relies on no third-party packages, and is contained in a single module. ## Workflows diff --git a/src/LICENSE b/src/LICENSE new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/src/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/src/README.md b/src/README.md new file mode 120000 index 0000000..32d46ee --- /dev/null +++ b/src/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/src/meta.json b/src/meta.json new file mode 120000 index 0000000..747e970 --- /dev/null +++ b/src/meta.json @@ -0,0 +1 @@ +../recipe/meta.json \ No newline at end of file diff --git a/src/setup.py b/src/setup.py index cde0519..b53dc5b 100644 --- a/src/setup.py +++ b/src/setup.py @@ -10,15 +10,26 @@ if os.environ.get("CONDA_BUILD"): meta = {x: os.environ["PKG_%s" % x.upper()] for x in ("name", "version")} else: - with open("../recipe/meta.json", "r", encoding="utf-8") as f: + with open("meta.json", "r", encoding="utf-8") as f: meta = json.load(f) name_conda = meta["name"] name_py = name_conda.replace("-", "_") setup( + author="Paul Madden", + author_email="maddenp@colorado.edu", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + ], + data_files=[(".", ["meta.json"])], + description="A simple workflow engine", entry_points={"console_scripts": ["iotaa = %s:main" % name_py]}, + long_description="A simple workflow engine with semantics inspired by Luigi and tasks expressed as decorated Python functions", name=name_conda, packages=find_packages(include=[name_py, "%s.*" % name_py]), + url="https://github.com/maddenp/iotaa", version=meta["version"], )