diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 974e878..875d996 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -13,13 +13,9 @@ jobs: UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 + variables: {} steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | @@ -30,6 +26,9 @@ jobs: - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 6c59082..82f2873 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,5 +1,5 @@ cdt_name: -- cos6 +- cos7 channel_sources: - conda-forge channel_targets: diff --git a/.gitattributes b/.gitattributes index 7f32763..18f114a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -20,8 +20,8 @@ bld.bat text eol=crlf .travis.yml linguist-generated=true .scripts/* linguist-generated=true .woodpecker.yml linguist-generated=true -LICENSE.txt linguist-generated=true -README.md linguist-generated=true +/LICENSE.txt linguist-generated=true +/README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true shippable.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d9d6f9e..cfbb790 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @marie59 \ No newline at end of file +* @jfpiolle @marie59 \ No newline at end of file diff --git a/.gitignore b/.gitignore index c89ecb7..179afe5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,24 @@ -*.pyc +# User content belongs under recipe/. +# Feedstock configuration goes in `conda-forge.yml` +# Everything else is managed by the conda-smithy rerender process. +# Please do not modify + +# Ignore all files and folders in root +* +!/conda-forge.yml + +# Don't ignore any files/folders if the parent folder is 'un-ignored' +# This also avoids warnings when adding an already-checked file with an ignored parent. +!/**/ +# Don't ignore any files/folders recursively in the following folders +!/recipe/** +!/.ci_support/** -build_artifacts +# Since we ignore files/folders recursively, any folders inside +# build_artifacts gets ignored which trips some build systems. +# To avoid that we 'un-ignore' all files/folders recursively +# and only ignore the root build_artifacts folder. +!/build_artifacts/** +/build_artifacts + +*.pyc diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 71a4242..af0b9ac 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,20 +28,23 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 - -mamba install --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" +mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -64,9 +67,16 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ + --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + ( startgroup "Inspecting artifacts" ) 2> /dev/null + + # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0 + command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0" + + ( endgroup "Inspecting artifacts" ) 2> /dev/null ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c..aff009f 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..00f377a 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -21,6 +21,12 @@ if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) fi +if [[ "${sha:-}" == "" ]]; then + pushd "${FEEDSTOCK_ROOT}" + sha=$(git rev-parse HEAD) + popd +fi + docker info # In order for the conda-build process in the container to write to the mounted @@ -91,6 +97,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ diff --git a/README.md b/README.md index f68f33a..172967b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,15 @@ -About cerbere -============= - -Home: https://gitlab.ifremer.fr/cerbere/cerbere - -Package license: GPL-3.0-or-later +About cerbere-feedstock +======================= Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/cerbere-feedstock/blob/main/LICENSE.txt) -Summary: cerbere provides a unified python API to manipulate any type of spatio-temporal observations +Home: https://gitlab.ifremer.fr/cerbere/cerbere/ + +Package license: GPL-3.0-or-later -cerbere provides a unified python API to manipulate any type of spatio-temporal observations, -which can be read from many existing storage formats using the same set of functions. -It also provides classes for specific types of observation features. +Summary: A python API to manipulate spatial and temporal observations, compatible with many existing formats, normalizing and typing the representation of these observations, following Climate and Forecast (CF) convention and data model. +Documentation: https://cerbere.readthedocs.io/en/latest/ Current build status ==================== @@ -100,7 +97,7 @@ available continuous integration services. Thanks to the awesome service provide [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), [Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the -[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +[conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) channel for Linux, Windows and OSX respectively. To manage the continuous integration and simplify feedstock maintenance @@ -148,5 +145,6 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@jfpiolle](https://github.com/jfpiolle/) * [@marie59](https://github.com/marie59/) diff --git a/build-locally.py b/build-locally.py index 3f4b7a7..6788aea 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,13 +1,16 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally. # -import os +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob +import os +import platform import subprocess from argparse import ArgumentParser -import platform def setup_environment(ns): @@ -64,8 +67,9 @@ def verify_config(ns): elif ns.config.startswith("osx"): if "OSX_SDK_DIR" not in os.environ: raise RuntimeError( - "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " - "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 6196eca..b6f4d60 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,50 +1,51 @@ {% set name = "cerbere" %} -{% set version = "2.1.1" %} +{% set version = "3.0.0.post39" %} package: name: {{ name|lower }} version: {{ version }} source: - url: https://gitlab.ifremer.fr/cerbere/cerbere/-/archive/V{{ version }}/cerbere-V{{ version }}.tar.gz - sha256: f127d699086596c7434a8ab5b5562bd8f02973395d3e2d730e9dab01dbcfae51 + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/cerbere-{{ version }}.tar.gz + sha256: 7aaf6b60d4d954fd0a4952bf3a5d92be6fa9eb982c64a0194aa429b799b221f0 build: - number: 0 noarch: python - script_env: - - POETRY_DYNAMIC_VERSIONING_BYPASS={{ version }} - script: - - {{ PYTHON }} -m pip install . -vv + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + number: 0 requirements: host: - - python >=3.8 - - pip + - python >=3.10,<4.0 - poetry-core >=1.0.0 - - poetry-dynamic-versioning + - poetry-dynamic-versioning >=1.0.0,<2.0.0 + - pip run: - - python >=3.8 - - pyyaml >=5.3 - - netcdf4 >=1.5 - - scipy >=1.5 - - shapely >=1.7 - - xarray >=2022.3.0 + - python >=3.10.0,<4.0.0 + - xarray <=2024.1.1 + - shapely >=2.0.6,<3.0.0 + - pyyaml >=6.0.2,<7.0.0 + - scipy >=1.14.1,<2.0.0 + - h5netcdf >=1.3.0,<2.0.0 + - dask-core >=2024.8.2,<2025.0.0 + - cftime >=1.6.4,<2.0.0 test: imports: - cerbere + commands: + - pip check + requires: + - pip about: - home: https://gitlab.ifremer.fr/cerbere/cerbere + summary: A python API to manipulate spatial and temporal observations, compatible with many existing formats, normalizing and typing the representation of these observations, following Climate and Forecast (CF) convention and data model. license: GPL-3.0-or-later license_file: LICENSE.txt - summary: cerbere provides a unified python API to manipulate any type of spatio-temporal observations - description: | - cerbere provides a unified python API to manipulate any type of spatio-temporal observations, - which can be read from many existing storage formats using the same set of functions. - It also provides classes for specific types of observation features. + home: https://gitlab.ifremer.fr/cerbere/cerbere/ + doc_url: https://cerbere.readthedocs.io/en/latest/ extra: recipe-maintainers: + - jfpiolle - marie59