From 91f6a1c6ec70bfaea13143fd7c210ef023a2dfa5 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 30 Jan 2025 16:09:04 +0100 Subject: [PATCH 1/3] :art: add dynamic versioning of python pkg --- pyproject.toml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 91f93b3..60f6103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,14 @@ -[tool.poetry] +[project] name = "vuegen" -version = "0.1.0" +dynamic = ["version"] + +[tool.poetry] description = "Module to generate automatic web interface reports with visualizations" authors = ["MoNA group"] license = "MIT" readme = "README.md" repository = "https://github.com/Multiomics-Analytics-Group/vuegen" +version = "0.1.0" [tool.poetry.dependencies] python = ">=3.9,<3.9.7 || >3.9.7,<4.0" @@ -39,9 +42,16 @@ quarto-cli = "*" [tool.poetry.group.dev.dependencies] ipykernel = {version="^6.29.5", optional=true} +[tool.poetry.requires-plugins] +poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] } + + +[tool.poetry-dynamic-versioning] +enable = true + [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] +build-backend = "poetry_dynamic_versioning.backend" # https://stackoverflow.com/a/60990574/9684872 [tool.poetry.extras] From 24646c2627c0ba33b56c67dee51128c099347656 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Thu, 30 Jan 2025 17:17:25 +0100 Subject: [PATCH 2/3] :zap: do not save docs --- .github/workflows/docs.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7ff7221..a06a658 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,8 +35,8 @@ jobs: run: | cd docs sphinx-build -n --keep-going -b html ./ ./_build/ - - name: save artifacts - uses: actions/upload-artifact@v4 - with: - name: Sphinx_${{ matrix.python-version }} - path: docs/_build/ + # - name: save artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: Sphinx_${{ matrix.python-version }} + # path: docs/_build/ From e8f9908edcd6cae45714e9926b23248070efc92a Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Fri, 31 Jan 2025 13:48:25 +0100 Subject: [PATCH 3/3] :zap: automate publishing of Python package --- .github/workflows/cdci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 4731261..9fd742c 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -95,3 +95,26 @@ jobs: cd docs vuegen -dir example_data/Earth_microbiome_vuegen_demo_notebook -rt jupyter vuegen -c example_data/Earth_microbiome_vuegen_demo_notebook/Earth_microbiome_vuegen_demo_notebook_config.yaml -rt jupyter + + publish: + name: Publish package to PyPI + if: startsWith(github.ref, 'refs/tags') + permissions: + id-token: write + needs: + - test + - other-reports + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install twine and build + run: python -m pip install --upgrade twine build + - name: Build + run: python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1