From e1f816ab747a516991a9e2879d89bca0f9f867ca Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Sat, 30 Nov 2024 08:55:08 +0100 Subject: [PATCH] Release 0.1.0-dev0 Add workflow for publishing to pypi using twine Updates minium required python version, description and location of the LICENSE file in pyproject.toml --- .github/workflows/publish-pypi.yml | 34 ++++++++++++++++++++++++++++++ pyproject.toml | 6 +++--- src/scwidgets/__init__.py | 2 +- 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish-pypi.yml diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml new file mode 100644 index 0000000..8dd8270 --- /dev/null +++ b/.github/workflows/publish-pypi.yml @@ -0,0 +1,34 @@ +# This workflow will upload a Python Package using hatch when a release is created + +name: Publish Python Package + +on: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+* + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.12' + - name: Insatll dependencies and build package + run: | + pip install --upgrade pip build twine + python -m build + - name: Publish package + env: + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} + TWINE_USERNAME: __token__ + TWINE_REPOSITORY: testpypi + run: | + python -m twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml index d5a04e0..0c7675b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,10 @@ build-backend = "setuptools.build_meta" [project] name = "scwidgets" -description = "ipywidgets for the creation of interactive code demos and educational notebooks" +description = "A collection of widgets to prepare interactive scientific visualisations, including user code input and validation" readme = "README.rst" -requires-python = ">=3.8" -license = {text = "BSD-3-Clause"} +requires-python = ">=3.9" +license = {file = "LICENSE"} classifiers = [ "Intended Audience :: Science/Research", "Operating System :: POSIX", diff --git a/src/scwidgets/__init__.py b/src/scwidgets/__init__.py index f9a235a..5ffd191 100644 --- a/src/scwidgets/__init__.py +++ b/src/scwidgets/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.0.0-dev" +__version__ = "0.1.0-dev0" __authors__ = "the scicode-widgets developer team" from ._css_style import CssStyle, get_css_style