Skip to content

Commit

Permalink
Continuous integration and project setup (#104)
Browse files Browse the repository at this point in the history
* Follow template from repository https://github.com/cta-observatory/project-template-python-pure

* Follow template from repository https://github.com/cta-observatory/project-template-python-pure

* Remove the leading "v" character to tag apptainer image versions on release

---------

Co-authored-by: Jean-Philippe Lenain <[email protected]>
  • Loading branch information
jlenain and jlenain authored Feb 2, 2024
1 parent 8cb6ff9 commit 8ac49f2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: CI

# by not building all branches on push, we avoid the duplicated builds in PRs
on:
push:
branches:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deploy-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 12 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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"]
Expand Down

0 comments on commit 8ac49f2

Please sign in to comment.