From 5a8281b5387efd49ca3f72379f78729d4783d339 Mon Sep 17 00:00:00 2001 From: Clemens Prescher Date: Tue, 14 Nov 2023 17:03:50 +0100 Subject: [PATCH] check building of packages with adding the poetry dynamic versioning plugin specifically --- .github/workflows/CD.yml | 52 +++++++++++++++++++++------------------- pyproject.toml | 14 +++++++---- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 5552489..0839525 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,11 +1,11 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - +# This workflow installs python, poetry, and builds the package +# It then uploads the wheels to the artifacts and later to PyPI name: CD on: - release: - types: [published] + [push] + # release: + # types: [published] jobs: build_package: @@ -18,6 +18,8 @@ jobs: steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Install Poetry uses: snok/install-poetry@v1 @@ -28,8 +30,8 @@ jobs: python-version: ${{ matrix.python-version }} cache: 'poetry' - - name: Install dependencies - run: poetry install + - name: Add Dynamic Versioning Plugin + run: poetry self add poetry-dynamic-versioning[plugin] - name: Build Package run: poetry build @@ -40,23 +42,23 @@ jobs: name: wheels path: dist/* - pypi-publish: - name: Upload release to PyPI - needs: build_package - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/glassure/ - permissions: - id-token: write - steps: - - uses: actions/download-artifact@v3 - with: - name: wheels - path: dist + # pypi-publish: + # name: Upload release to PyPI + # needs: build_package + # runs-on: ubuntu-latest + # environment: + # name: pypi + # url: https://pypi.org/p/glassure/ + # permissions: + # id-token: write + # steps: + # - uses: actions/download-artifact@v3 + # with: + # name: wheels + # path: dist - - name: check the dist folder - run: ls dist + # - name: check the dist folder + # run: ls dist - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + # - name: Publish to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1c06ab8..98e7f6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,9 +29,15 @@ files = ["glassure/__init__.py"] [tool.poetry.dependencies] -python = "^3.9, <3.12" -numpy = "^1.25.2" -scipy = "^1.11.2" +python = "^3.9, <3.13" +numpy = [ + { version = "^1.24.0", python = "<3.10" }, + { version = "^1.26.0", python = ">=3.10" } +] +scipy = [ + { version = "^1.9.3", python = "<3.10" }, + { version = "^1.11.3", python = ">=3.10" } +] lmfit = "^1.2.0" pandas = "^2.1.0" pyqtgraph = "^0.13.3" @@ -54,4 +60,4 @@ sphinx-rtd-theme = "^1.3.0" [build-system] requires = ["poetry-core", "poetry-dynamic-versioning"] -build-backend = ["poetry.core.masonry.api", "poetry_dynamic_versioning.backend"] +build-backend = "poetry_dynamic_versioning.backend"