diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c80fa315..a5b5ba9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,6 @@ name: CI +# by not building all branches on push, we avoid the duplicated builds in PRs on: push: branches: diff --git a/.github/workflows/deploy-ghcr.yml b/.github/workflows/deploy-ghcr.yml index dc2990dc..059dd3f5 100644 --- a/.github/workflows/deploy-ghcr.yml +++ b/.github/workflows/deploy-ghcr.yml @@ -59,7 +59,10 @@ jobs: # Assign the release tag to container on release if: github.event_name == 'release' run: | - apptainer push ${{ env.container }}.sif oras://${{ env.registry }}/${{ github.repository }}:${{ github.ref_name }} + fullversionname=${{ github.ref_name }} + # Remove the leading "v" character + versionname=${fullversionname:1} + apptainer push ${{ env.container }}.sif oras://${{ env.registry }}/${{ github.repository }}:${versionname} - name: Deploy ${{ env.container }} container ${{ matrix.deffiles[1] }} # Otherwise, the container tag is "latest" by default. diff --git a/pyproject.toml b/pyproject.toml index a4449d58..fabb1c81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,6 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "nectarchain" description = "Analysis chain for the CTA MSTN NectarCAM prototype" +readme = "README.md" authors = [{name = "NectarCAM collaboration"}] license = {text = "BSD-3-Clause"} classifiers = [ @@ -27,24 +28,28 @@ dependencies = [ "zodb", "zeo", ] -dynamic = ["version"] -[project.readme] -file = "README.md" -content-type = "text/markdown; charset=UTF-8" +# needed for setuptools_scm, we don't define a static version +dynamic = ["version"] [project.urls] "Bug Tracker" = "https://github.com/cta-observatory/nectarchain/issues" "Source Code" = "https://github.com/cta-observatory/nectarchain" [project.optional-dependencies] -tests = ["pytest"] -dev = ["setuptools_scm"] -all = [ +test = [ "pytest", + "pytest-cov", +] +dev = [ "setuptools_scm", ] +# we can use self-references to simplify all +all = [ + "nectarchain[test,dev]", +] + [tool.setuptools.packages.find] where = ["src"] exclude = ["nectarchain._dev_version"]