From 971822e423493c4400073771583cb79baeadceed Mon Sep 17 00:00:00 2001 From: Tomas Kontrimas Date: Mon, 9 Jan 2023 16:02:05 +0100 Subject: [PATCH] Inital setup for publishing releases to PyPI --- .github/workflows/python_publish.yml | 29 ++++++++++++++++++++++++++++ pyproject.toml | 3 +++ setup.cfg | 11 ++++++----- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/python_publish.yml create mode 100644 pyproject.toml diff --git a/.github/workflows/python_publish.yml b/.github/workflows/python_publish.yml new file mode 100644 index 0000000000..20c3632236 --- /dev/null +++ b/.github/workflows/python_publish.yml @@ -0,0 +1,29 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish package + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..872ce1cc09 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel", "versioneer"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index f75b2312b1..c5423d6cdf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,12 +1,12 @@ [metadata] name = skyllh -description =The SkyLLH framework is an open-source Python3-based package licensed under the GPLv3 license. It provides a modular framework for implementing custom likelihood functions and executing log-likelihood ratio hypothesis tests. The idea is to provide a class structure tied to the mathematical objects of the likelihood functions, rather than to entire abstract likelihood models. +description = The SkyLLH framework is an open-source Python3-based package licensed under the GPLv3 license. It provides a modular framework for implementing custom likelihood functions and executing log-likelihood ratio hypothesis tests. The idea is to provide a class structure tied to the mathematical objects of the likelihood functions. long_description = file:README.md long_description_content_type = text/markdown url = https://github.com/icecube/skyllh -author_email = XXXXXXX -author = XXXXX -requires_python = >=3.8.0 +author_email = martin.wolf@icecube.wisc.edu +author = Martin Wolf +requires_python = >=3.6.0 license = GPL-3+ classifiers = @@ -15,11 +15,12 @@ classifiers = Intended Audience :: Science/Research License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) Operating System :: POSIX - Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.6 Topic :: Scientific/Engineering :: Physics project_urls = Bug Tracker = https://github.com/icecube/skyllh/issues + Documentation = https://icecube.github.io/skyllh Source Code = https://github.com/icecube/skyllh