diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3583f2588d058d96eb66cf6f8747f356518ca451..cd95e57c74ef44db4e85efb8ebe964266db745fa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,17 +7,15 @@ stages: variables: BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/esd/tmp:latest -default: - before_script: - - chmod +x dedal/utils/bootstrap.sh - - ./dedal/utils/bootstrap.sh - - pip install -e .[test] - unit_tests: stage: test tags: - docker-runner image: ubuntu:22.04 + before_script: + - chmod +x dedal/utils/bootstrap.sh + - ./dedal/utils/bootstrap.sh + - pip install -e .[test] script: - coverage run -m pytest -s --tb=short --junitxml=test-results.xml ./dedal/tests/unit_tests - mv .coverage .coverage.unit # Rename to avoid overwriting @@ -37,10 +35,14 @@ integration_tests: tags: - docker-runner image: ubuntu:22.04 + before_script: + - chmod +x dedal/utils/bootstrap.sh + - ./dedal/utils/bootstrap.sh + - pip install -e .[test] script: - coverage run -m pytest -s --tb=short --junitxml=test-results.xml ./dedal/tests/integration_tests - mv .coverage .coverage.integration # Rename to avoid overwriting - needs: [ "unit_tests" ] + needs: ["unit_tests"] artifacts: when: always reports: @@ -57,6 +59,10 @@ merge_coverage: tags: - docker-runner image: ubuntu:22.04 + before_script: + - chmod +x dedal/utils/bootstrap.sh + - ./dedal/utils/bootstrap.sh + - pip install -e .[test] script: - coverage combine .coverage.unit .coverage.integration - coverage report @@ -111,6 +117,21 @@ pypi-release: paths: - dist/*.whl - dist/*.tar.gz + +release-gitlab: + stage: publish + image: registry.gitlab.com/gitlab-org/release-cli:latest + needs: ["pypi-release"] + tags: + - docker-runner + rules: + - if: $CI_COMMIT_TAG + script: + - echo "running release_job" release: tag_name: '$CI_COMMIT_TAG' - description: '$CI_COMMIT_TAG' \ No newline at end of file + description: '$CI_COMMIT_TAG' + artifacts: + paths: + - dist/*.whl + - dist/*.tar.gz \ No newline at end of file diff --git a/MANIFEST.ini b/MANIFEST.ini index e62be46716825eab56feaa6d891b2f5d0bcf314d..142e97207139069ed864dd08abc8acca39d34260 100644 --- a/MANIFEST.ini +++ b/MANIFEST.ini @@ -1,3 +1,3 @@ - +include LICENSE include README.md -recursive-include yashchiki/dedal *.* \ No newline at end of file +recursive-include dedal/dedal *.* \ No newline at end of file diff --git a/README.md b/README.md index eeb6eb50216cb628fa0ff2b8273d50448413fc39..ec44f1a420415c922fb2c5f781014320428b5279 100644 --- a/README.md +++ b/README.md @@ -143,9 +143,9 @@ Installs spack packages present in the spack environment defined in configuratio # Dedal's UML diagram - + -Acknowledgments +# Acknowledgments This project has received funding from the European Union’s Horizon Europe Programme under the Specific Grant Agreement No. 101147319 (EBRAINS 2.0 Project). diff --git a/dedal/docs/resources/dedal_UML.png b/dedal/docs/resources/dedal_UML.png index 4f9df5608e58c865fe13b3f3a9b74e6436023ef9..9fb72646e938a4c68a9991a4af079972f2047774 100644 Binary files a/dedal/docs/resources/dedal_UML.png and b/dedal/docs/resources/dedal_UML.png differ diff --git a/dedal/spack_factory/SpackOperationCreator.py b/dedal/spack_factory/SpackOperationCreator.py index 18ae7c099e001b6746e389183cf798f4a31ea66b..52c5d256393c16a69b8cf5c53c46cccb6ee74e16 100644 --- a/dedal/spack_factory/SpackOperationCreator.py +++ b/dedal/spack_factory/SpackOperationCreator.py @@ -44,9 +44,9 @@ class SpackOperationCreator: return SpackOperation(spack_config) elif spack_config.concretization_dir is None and spack_config.buildcache_dir is None: return SpackOperation(spack_config) - elif (spack_config.concretization_dir and spack_config.buildcache_dir) and not use_cache: + elif (spack_config.concretization_dir or spack_config.buildcache_dir) and not use_cache: return SpackOperationCreateCache(spack_config) - elif (spack_config.concretization_dir and spack_config.buildcache_dir) and use_cache: + elif (spack_config.concretization_dir or spack_config.buildcache_dir) and use_cache: return SpackOperationUseCache(spack_config) else: return SpackOperation(SpackConfig()) diff --git a/pyproject.toml b/pyproject.toml index 4e908edd5a3df336b5d0540513220e1147adc7ac..f6a30a26a1ac14442148e22d1b6d6692dd44a6c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,19 +1,51 @@ +# Dedal library - Wrapper over Spack for building multiple target +# environments: ESD, Virtual Boxes, HPC compatible kernels, etc. + +# (c) Copyright 2025 Dedal developers + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [build-system] requires = ["setuptools>=64", "wheel"] build-backend = "setuptools.build_meta" [project] name = "dedal" -version = "0.1.0" -authors = [ - { name = "Eric Müller", email = "mueller@kip.uni-heidelberg.de" }, - { name = "Adrian Ciu", email = "adrian.ciu@codemart.ro" }, - { name = "Jithu Murugan", email = "j.murugan@fz-juelich.de" } -] +version = "0.9.0" description = "This package includes all the essential tools required to set up an EBRAINS Software Distribution environment." license = { file = "LICENSE" } readme = "README.md" requires-python = ">=3.10" +authors = [ + { name = "Adrian Ciu"}, + { name = "Eleni Mathioulaki"}, + { name = "Eric Müller"}, + { name = "Jithu Murugan"}, + { name = "Lia Domide"}, + { name = "Wouter Klijn"}, +] +maintainers = [ + { name = "Brainiacs", email = "science@codemart.ro" } +] +keywords = [ + "spack", + "package", + "packaging", + "environment", + "cache", + "caching", + "esd", +] dependencies = [ "oras", "spack", @@ -23,11 +55,16 @@ dependencies = [ "pyyaml", ] +[project.urls] +Source = "https://gitlab.ebrains.eu/ri/tech-hub/platform/esd/dedal" + [project.scripts] dedal = "dedal.cli.spack_manager_api:cli" [tool.setuptools.data-files] -"dedal" = ["dedal/logger/logging.conf"] +"dedal" = [ + "dedal/logger/logging.conf", +] [project.optional-dependencies] test = ["pytest", "pytest-mock", "pytest-ordering", "coverage"] \ No newline at end of file