From a155b8cd57c7bec9677275556a1f9a0713f8232f Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 2 Sep 2024 11:37:00 +0100 Subject: [PATCH] moving to github ci again --- .../httomo_backends_pypi_publish.yml | 48 +++++++++---------- pyproject.toml | 15 +++++- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.github/workflows/httomo_backends_pypi_publish.yml b/.github/workflows/httomo_backends_pypi_publish.yml index 75310a1..7b65d7b 100644 --- a/.github/workflows/httomo_backends_pypi_publish.yml +++ b/.github/workflows/httomo_backends_pypi_publish.yml @@ -1,4 +1,4 @@ -name: Upload Python Package to PyPI when a Release is Created +name: Upload Package to PyPI when Release is Created on: push: @@ -9,39 +9,35 @@ on: - main jobs: - iris-gpu-pypi-publish: - runs-on: iris-gpu - container: - image: nvidia/cuda:11.6.2-devel-ubi8 - env: - NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} - - defaults: - run: - shell: bash -l {0} - + pypi-publish: + name: Publish release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/httomo-backends + permissions: + id-token: write steps: - - name: Checkout repository code - uses: actions/checkout@v4 - - - name: Create conda environment - uses: mamba-org/setup-micromamba@v1 + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 with: - environment-file: conda/environment.yml - environment-name: httomo-backends - post-cleanup: 'all' - init-shell: bash - + python-version: "3.10" - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel - micromamba list + $CONDA/bin/conda install conda-forge::tomopy + $CONDA/bin/conda install httomo::httomolib + $CONDA/bin/conda install httomo::httomolibgpu + $CONDA/bin/conda install conda-forge::pyyaml + $CONDA/bin/conda list - name: Generate yaml templates run: | - python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/tomopy/tomopy_modules.yaml -o ./httomo_backends/yaml_templates/tomopy - python ./httomo_backends/scripts/yaml_unsupported_tomopy_remove.py -t ./httomo_backends/yaml_templates/tomopy -l ./httomo_backends/methods_database/backends/tomopy/tomopy.yaml - python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/httomolib/httomolib_modules.yaml -o ./httomo_backends/yaml_templates/httomolib + $CONDA/bin/python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/tomopy/tomopy_modules.yaml -o ./httomo_backends/yaml_templates/tomopy + $CONDA/bin/python ./httomo_backends/scripts/yaml_unsupported_tomopy_remove.py -t ./httomo_backends/yaml_templates/tomopy -l ./httomo_backends/methods_database/backends/tomopy/tomopy.yaml + $CONDA/bin/python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/httomolib/httomolib_modules.yaml -o ./httomo_backends/yaml_templates/httomolib + $CONDA/bin/python ./httomo_backends/scripts/yaml_templates_generator.py -i ./httomo_backends/methods_database/backends/httomolibgpu/httomolibgpu_modules.yaml -o ./httomo_backends/yaml_templates/httomolibgpu - name: Build package run: | python -m pip install build diff --git a/pyproject.toml b/pyproject.toml index 1102e1a..d252299 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,8 +6,6 @@ build-backend = "setuptools.build_meta" include-package-data = true packages = ["httomo_backends", "httomo_backends.scripts", - "httomo_backends.methods_database", - "httomo_backends.yaml_templates", ] [tool.setuptools.package-data] @@ -26,6 +24,19 @@ httomo_backends = [ "yaml_templates/tomopy/tomopy.recon.algorithm/*.yaml", "yaml_templates/tomopy/tomopy.recon.rotation/*.yaml", "yaml_templates/tomopy/tomopy.sim.project/*.yaml", + "yaml_templates/httomolib/httomolib.misc.morph/*.yaml", + "yaml_templates/httomolib/httomolib.misc.images/*.yaml", + "yaml_templates/httomolib/httomolib.misc.segm/*.yaml", + "yaml_templates/httomolib/httomolib.prep.phase/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.misc.corr/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.misc.morph/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.misc.rescale/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.prep.alignment/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.prep.normalize/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.prep.phase/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.prep.stripe/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.recon.algorithm/*.yaml", + "yaml_templates/httomolibgpu/httomolibgpu.recon.rotation/*.yaml", ] [tool.setuptools-git-versioning]