From 2f4518a0111f28d6ed752a84483791ee5c1454af Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Wed, 22 Jan 2025 13:43:42 -0500 Subject: [PATCH 1/4] [DEVOPS-635] Convert conda to rattler recipe --- meta.yaml => recipe.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) rename meta.yaml => recipe.yaml (81%) diff --git a/meta.yaml b/recipe.yaml similarity index 81% rename from meta.yaml rename to recipe.yaml index 3e4b548..fbc1ee3 100644 --- a/meta.yaml +++ b/recipe.yaml @@ -1,17 +1,20 @@ -{% set name = "plate-simulation" %} -{% set version = "0.1.0b5" %} +schema_version: 1 + +context: + name: plate-simulation + version: 0.1.0b5 package: - name: {{ name|lower }} - version: {{ version }} + name: ${{ name|lower }} + version: ${{ version }} source: - path: ../{{ name }} # Used to build the package from the source code + 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: @@ -51,7 +54,7 @@ requirements: - zarr >=2.14.2,<2.15.0 - tbb 2021.12.* - python-tzdata 2023.4.* - run_constrained: + run_constraints: - __glibc >=2.17 about: @@ -62,3 +65,4 @@ extra: recipe-maintainers: - SophieCurinier - sebhmg + From cef5bd836faaaa8c5a6b0d86b88d67a1acc402d2 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Wed, 29 Jan 2025 16:05:40 -0500 Subject: [PATCH 2/4] [DEVOPS-635] Correct .pre-commit-config and test/version_test to use rattler instead of conda --- .github/workflows/python_deploy_dev.yml | 3 ++- .pre-commit-config.yaml | 2 +- tests/version_test.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_deploy_dev.yml b/.github/workflows/python_deploy_dev.yml index fd93e23..abf4fb3 100644 --- a/.github/workflows/python_deploy_dev.yml +++ b/.github/workflows/python_deploy_dev.yml @@ -12,10 +12,11 @@ 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@DEVOPS-635 with: package-name: 'plate-simulation' python-version: '3.10' + local-repo-names: '["public-conda-dev-local"]' virtual-repo-names: '["public-conda-dev"]' secrets: JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72dfe6f..5922198 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: exclude: \.mdj$ - 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/tests/version_test.py b/tests/version_test.py index 420d7a0..5b9591c 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -30,7 +30,7 @@ def get_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() @@ -40,7 +40,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 c87d02b41bff3f455ef5fd4419f46892aa268c30 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Thu, 30 Jan 2025 10:24:49 -0500 Subject: [PATCH 3/4] [DEVOPS-635] Use reusable-python-publish_rattler_package.yml@main --- .github/workflows/python_deploy_dev.yml | 6 +++--- recipe.yaml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_deploy_dev.yml b/.github/workflows/python_deploy_dev.yml index abf4fb3..a99d00b 100644 --- a/.github/workflows/python_deploy_dev.yml +++ b/.github/workflows/python_deploy_dev.yml @@ -12,12 +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_rattler_package.yml@DEVOPS-635 + uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_rattler_package.yml@main with: package-name: 'plate-simulation' python-version: '3.10' - local-repo-names: '["public-conda-dev-local"]' - 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/recipe.yaml b/recipe.yaml index fbc1ee3..173000a 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -65,4 +65,3 @@ extra: recipe-maintainers: - SophieCurinier - sebhmg - From 83a202f4f1abdff74307e9f75fe7455d8b47faa6 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Thu, 30 Jan 2025 14:16:57 -0500 Subject: [PATCH 4/4] [DEVOPS-635] Add homepage, repository, documentation and summary inside recipe.yaml --- recipe.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe.yaml b/recipe.yaml index 553966a..d606656 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -58,8 +58,12 @@ requirements: - __glibc >=2.17 about: + summary: Create a specialized mesh, model and simulation for a particular parameterization of the halfspace + overburden and plate geological setting. license: MIT license_file: LICENSE + homepage: https://www.mirageoscience.com/mining-industry-software/geoscience-analyst/python-integration/ + repository: https://github.com/MiraGeoscience/plate-simulation + documentation: https://mirageoscience-plate-simulation.readthedocs-hosted.com/en/release-0.1.0/ extra: recipe-maintainers: