From eab12dd764a69609bca2516bc6bd00900324e444 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Wed, 22 Jan 2025 13:45:23 -0500 Subject: [PATCH 1/3] [DEVOPS-635] Convert conda to rattler recipe --- meta.yaml => recipe.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) rename meta.yaml => recipe.yaml (82%) diff --git a/meta.yaml b/recipe.yaml similarity index 82% rename from meta.yaml rename to recipe.yaml index dfb3e8c2..7dc02cb3 100644 --- a/meta.yaml +++ b/recipe.yaml @@ -1,17 +1,20 @@ -{% set name = "simpeg-drivers" %} -{% set version = "0.2.0b4" %} +schema_version: 1 + +context: + name: simpeg-drivers + version: 0.2.0b4 package: - name: {{ name|lower }} - version: {{ version }} + name: ${{ name|lower }} + version: ${{ version }} source: - path: ../{{ name }} + path: ../${{ name }} build: - noarch: python - script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation number: 0 + noarch: python + script: ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation requirements: host: @@ -44,7 +47,7 @@ requirements: - scikit-learn >=1.4.0,<1.5.0 - tqdm >=4.66.1,<5.0.0 - zarr >=2.14.2,<2.15.0 - run_constrained: + run_constraints: - tbb 2021.12.* - python-tzdata 2023.4.* - __glibc >=2.17 @@ -58,3 +61,4 @@ extra: recipe-maintainers: - SophieCurinier - sebhmg + From 512fc2def841cd6c772944b59801cadb26452e5b Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Thu, 30 Jan 2025 10:35:12 -0500 Subject: [PATCH 2/3] [DEVOPS-635] Use reusable-python-publish_rattler_package.yml@main --- .github/workflows/python_deploy_dev.yml | 5 +++-- .pre-commit-config.yaml | 2 +- recipe.yaml | 1 - tests/version_test.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python_deploy_dev.yml b/.github/workflows/python_deploy_dev.yml index e27f17e7..8c8d1a27 100644 --- a/.github/workflows/python_deploy_dev.yml +++ b/.github/workflows/python_deploy_dev.yml @@ -12,11 +12,12 @@ concurrency: jobs: call-workflow-conda-publish: name: Publish development conda package on JFrog Artifactory - uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_conda_package.yml@main + uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_rattler_package.yml@main with: package-name: 'simpeg-drivers' python-version: '3.10' - virtual-repo-names: '["public-conda-dev"]' + source-repo-names: '["public-conda-dev-local", "conda-forge-dev-remote"]' + publish-repo-names: '["public-conda-dev"]' secrets: JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }} JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b7068d0..94331a42 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -73,7 +73,7 @@ repos: exclude_types: [jupyter] - id: check-toml - id: check-yaml - exclude: ^meta.yaml$ + exclude: ^recipe.yaml$ - id: check-added-large-files - id: check-case-conflict - id: check-merge-conflict diff --git a/recipe.yaml b/recipe.yaml index 7dc02cb3..2ad8579f 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -61,4 +61,3 @@ extra: recipe-maintainers: - SophieCurinier - sebhmg - diff --git a/tests/version_test.py b/tests/version_test.py index cec71bf6..4d3d4846 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -58,7 +58,7 @@ def get_conda_recipe_version(): recipe = yaml.safe_load(rendered_yaml) - return recipe["package"]["version"] + return recipe["context"]["version"] def test_version_is_consistent(): From d51746665e35f515396c5f7565b9414b1081810b Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Thu, 30 Jan 2025 11:00:54 -0500 Subject: [PATCH 3/3] [DEVOPS-635] Correct get_conda_recipe_version --- tests/version_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/version_test.py b/tests/version_test.py index 86d69b76..8e07084b 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -32,7 +32,7 @@ def get_pyproject_version(): def get_conda_recipe_version(): - path = Path(__file__).resolve().parents[1] / "meta.yaml" + path = Path(__file__).resolve().parents[1] / "recipe.yaml" with open(str(path), encoding="utf-8") as file: content = file.read()