From d44ab9f38d503cb11afaadb09ab618b26da1bbb5 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Wed, 22 Jan 2025 13:50:02 -0500 Subject: [PATCH 1/5] [DEVOPS-635] Convert conda to rattler recipe --- meta.yaml => recipe.yaml | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) rename meta.yaml => recipe.yaml (63%) diff --git a/meta.yaml b/recipe.yaml similarity index 63% rename from meta.yaml rename to recipe.yaml index 8ce4a3d..8d82240 100644 --- a/meta.yaml +++ b/recipe.yaml @@ -1,17 +1,20 @@ -{% set name = "surface-apps" %} -{% set version = "0.1.0b1" %} +schema_version: 1 + +context: + name: surface-apps + version: 0.1.0b1 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: @@ -31,14 +34,15 @@ requirements: - scikit-image >=0.24.0,<0.25.0 - tqdm >=4.66.1,<4.67.0 - -test: - imports: - - surface_apps - commands: - - pip check - requires: - - pip +tests: + - python: + imports: + - surface_apps + - requirements: + run: + - pip + script: + - pip check about: license: MIT @@ -48,3 +52,4 @@ extra: recipe-maintainers: - SophieCurinier - sebhmg + From ee926c62f0cd1d338741e8a9967856b15d824930 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Wed, 29 Jan 2025 16:08:00 -0500 Subject: [PATCH 2/5] [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 fdb0c00..9cddb66 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: 'surface-apps' 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 b81073c..776beb4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -75,7 +75,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 ed1ed64..22fa1f0 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -29,7 +29,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() @@ -39,7 +39,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 03e0a7962e0e9aec50c400c6dd7bbc8b7daefc2d Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Thu, 30 Jan 2025 10:27:22 -0500 Subject: [PATCH 3/5] [DEVOPS-635] 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 9cddb66..850009a 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: 'surface-apps' 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 8d82240..0ef5c89 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -52,4 +52,3 @@ extra: recipe-maintainers: - SophieCurinier - sebhmg - From f7e281fa135208a7069c50849f9077e16c390ed8 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:28:34 +0000 Subject: [PATCH 4/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 554c8b8..4fba56e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -54,4 +54,4 @@ def get_copyright_notice(): rst_epilog = f""" .. |copyright_notice| replace:: {get_copyright_notice()}. -""" \ No newline at end of file +""" From 7ff55ecd4cbe8aea57f8ba6ad576c6c4b43e9248 Mon Sep 17 00:00:00 2001 From: SophieCurinier Date: Thu, 30 Jan 2025 14:28:22 -0500 Subject: [PATCH 5/5] [DEVOPS-635] Add homepage, repository and summary inside recipe.yaml --- recipe.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe.yaml b/recipe.yaml index 600617f..7dfaecb 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -45,8 +45,11 @@ tests: - pip check about: + summary: Surface detection within geoscientific data. license: MIT license_file: LICENSE + homepage: https://www.mirageoscience.com/mining-industry-software/python-integration/ + repository: https://github.com/MiraGeoscience/surface-apps extra: recipe-maintainers: