From 0c4fe4f37c0b16fca446049a31f4569638a98535 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Wed, 22 Jan 2025 13:37:41 -0500 Subject: [PATCH 1/4] [DEVOPS-635] Convert conda to rattler recipe --- meta.yaml => recipe.yaml | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) rename meta.yaml => recipe.yaml (56%) diff --git a/meta.yaml b/recipe.yaml similarity index 56% rename from meta.yaml rename to recipe.yaml index 1d6fb60..3311fba 100644 --- a/meta.yaml +++ b/recipe.yaml @@ -1,19 +1,22 @@ -{% set name = "param-sweeps" %} -{% set version = "0.2.0b1" %} +schema_version: 1 + +context: + name: param-sweeps + version: 0.2.0b1 package: - name: {{ name|lower }} - version: {{ version }} + name: ${{ name|lower }} + version: ${{ version }} source: # url: https://github.com/MiraGeoscience/{{ name }}/archive/v{{ version }}.tar.gz # sha256: 51e51c36d20fab27e3bb4a91c0a53bcbb0568f3fbf79fb9cf967db5bf665371d - 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: @@ -26,26 +29,29 @@ requirements: - numpy >=1.26.0,<1.27.0 - geoh5py >=0.10.0a1,<0.11.0a0.dev0 -test: - imports: - - param_sweeps - commands: - - pip check - requires: - - pip +tests: + - python: + imports: + - param_sweeps + - requirements: + run: + - pip + script: + - pip check about: - home: https://www.mirageoscience.com/mining-industry-software/python-integration/ - summary: 'A Parameter sweeper for applications driven by ui.json files.' + summary: A Parameter sweeper for applications driven by ui.json files. description: | The param-sweeps library contains two main modules. One is for generating sweep files, and the other is to run a sweep over some number of parameters in a driver application. license: MIT license_file: - LICENSE - dev_url: https://github.com/MiraGeoscience/param-sweeps + homepage: https://www.mirageoscience.com/mining-industry-software/python-integration/ + repository: https://github.com/MiraGeoscience/param-sweeps extra: recipe-maintainers: - SophieCurinier - sebhmg + From d796261b2aff8ced09dfee25c87ef8ebf402f83d Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Wed, 29 Jan 2025 16:04:27 -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 5e0e63e..0323716 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: 'param-sweeps' 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 c542e7b..fcec276 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,7 +78,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/tests/version_test.py b/tests/version_test.py index 596b83b..b116041 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -28,7 +28,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() @@ -38,7 +38,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 2d1085237f2ba7721702396395cf7cf5add8c093 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Thu, 30 Jan 2025 10:15:24 -0500 Subject: [PATCH 3/4] [DEVOPS-635] Use reusable-python-publish_rattler_package.yml@main --- .github/workflows/python_deploy_dev.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python_deploy_dev.yml b/.github/workflows/python_deploy_dev.yml index 0323716..00491c7 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: 'param-sweeps' 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 }} From ca73dffd822c2887daf7487e7bf30073c9d31d72 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 15:16:21 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- recipe.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe.yaml b/recipe.yaml index ac3afe9..43d4301 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -54,4 +54,3 @@ extra: recipe-maintainers: - SophieCurinier - sebhmg -