diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index f04e699..8d62612 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -32,6 +32,11 @@ jobs: export CI=azure export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi .scripts/run_docker_build.sh displayName: Run docker build env: diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 0d956e2..46ddcff 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,11 +1,8 @@ cdt_name: - cos6 channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main docker_image: - quay.io/condaforge/linux-anvil-comp7 -zip_keys: -- - cdt_name - - docker_image diff --git a/.gitattributes b/.gitattributes index 9060b27..ce52713 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,6 +18,7 @@ bld.bat text eol=crlf .gitignore linguist-generated=true .travis.yml linguist-generated=true .scripts/* linguist-generated=true +.woodpecker.yml linguist-generated=true LICENSE.txt linguist-generated=true README.md linguist-generated=true azure-pipelines.yml linguist-generated=true diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 71a0686..a85ae38 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -25,7 +25,8 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC -BUILD_CMD=build +GET_BOA=boa +BUILD_CMD=mambabuild conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge @@ -38,6 +39,7 @@ source run_conda_forge_build_setup make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + ( endgroup "Configuring conda" ) 2> /dev/null if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then @@ -62,7 +64,7 @@ else ( startgroup "Uploading packages" ) 2> /dev/null - if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" fi diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 244ccd1..0c6515f 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -75,12 +75,15 @@ fi ( startgroup "Start Docker" ) 2> /dev/null export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +export IS_PR_BUILD="${IS_PR_BUILD:-False}" +docker pull "${DOCKER_IMAGE}" docker run ${DOCKER_RUN_ARGS} \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ -e CONFIG \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ + -e IS_PR_BUILD \ -e GIT_BRANCH \ -e UPLOAD_ON_BRANCH \ -e CI \ @@ -91,9 +94,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ - $DOCKER_IMAGE \ + "${DOCKER_IMAGE}" \ bash \ - /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh + "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" # verify that the end of the script was reached test -f "$DONE_CANARY" diff --git a/README.md b/README.md index 8678fb4..41b5fee 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,8 @@ conda search pyglotaran --channel conda-forge About conda-forge ================= -[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) +[![Powered by +NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org) conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the diff --git a/build-locally.py b/build-locally.py index 00eeb34..8b74348 100755 --- a/build-locally.py +++ b/build-locally.py @@ -13,6 +13,7 @@ def setup_environment(ns): os.environ["CONFIG"] = ns.config os.environ["UPLOAD_PACKAGES"] = "False" + os.environ["IS_PR_BUILD"] = "True" if ns.debug: os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" if ns.output_id: @@ -21,6 +22,10 @@ def setup_environment(ns): os.environ["MINIFORGE_HOME"] = os.path.join( os.path.dirname(__file__), "miniforge3" ) + if "OSX_SDK_DIR" not in os.environ: + os.environ["OSX_SDK_DIR"] = os.path.join( + os.path.dirname(__file__), "SDKs" + ) def run_docker_build(ns): diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3c7b956..c85be6d 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "pyglotaran" %} -{% set version = "0.4.1" %} +{% set version = "0.5.0" %} {% set download_name = "pyglotaran" %} package: @@ -8,13 +8,13 @@ package: source: url: https://pypi.io/packages/source/{{ download_name[0] }}/{{ download_name }}/{{ download_name }}-{{ version }}.tar.gz - sha256: 5e70f99a6b808bc31b1f9b069bdbf98447a5e2417bce12c89cc5a86c200de1f3 + sha256: 4cc8e1ada048d92551f92566cf810ac6f4545eb27183dca6c096023e1588cead build: number: 0 noarch: python entry_points: - - glotaran=glotaran.cli.main:glotaran + - glotaran=glotaran.cli.main:main script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv requirements: @@ -27,14 +27,15 @@ requirements: - click >=7.0 - netcdf4 >=1.5.3 - numba >=0.52 - - numpy >=1.20.0 + - numpy >=1.20.0,<1.21 - pandas >=0.25.2 - - pyyaml >=5.2 + - rich >=10.9.0 + - ruamel.yaml >=0.17.17 - scipy >=1.3.2 - sdtfile >=2020.8.3 - setuptools >=41.2 - tabulate >=0.8.8 - - xarray >=0.16.2 + - xarray !=0.20.0,!=0.20.1,>=0.16.2 test: imports: @@ -43,7 +44,7 @@ test: - glotaran commands: - glotaran --help - - pytest -k "not IrfDispersion" glotaran + - pytest glotaran requires: - pytest - ipython