diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 8c73f96..89af458 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -6,28 +6,26 @@ jobs: - job: linux pool: vmImage: ubuntu-16.04 - timeoutInMinutes: 240 + timeoutInMinutes: 360 strategy: maxParallel: 8 matrix: linux_: CONFIG: linux_ - UPLOAD_PACKAGES: False + UPLOAD_PACKAGES: True + DOCKER_IMAGE: condaforge/linux-anvil-comp7 steps: - - script: | - sudo pip install --upgrade pip - sudo pip install setuptools shyaml - displayName: Install dependencies - - # configure qemu binfmt-misc running. This allows us to run docker containers + # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | - docker run --rm --privileged multiarch/qemu-user-static:register + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes ls /proc/sys/fs/binfmt_misc/ condition: not(startsWith(variables['CONFIG'], 'linux_64')) displayName: Configure binfmt_misc - - script: .azure-pipelines/run_docker_build.sh + - script: | + export CI=azure + .azure-pipelines/run_docker_build.sh displayName: Run docker build env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/build_steps.sh b/.azure-pipelines/build_steps.sh index 779d52b..8a4af44 100755 --- a/.azure-pipelines/build_steps.sh +++ b/.azure-pipelines/build_steps.sh @@ -7,15 +7,15 @@ set -xeuo pipefail export PYTHONUNBUFFERED=1 -export FEEDSTOCK_ROOT=/home/conda/feedstock_root -export RECIPE_ROOT=/home/conda/recipe_root -export CI_SUPPORT=/home/conda/feedstock_root/.ci_support +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc </dev/null && pwd )" PROVIDER_DIR="$(basename $THISDIR)" @@ -28,18 +28,33 @@ fi ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" if [ -z "$CONFIG" ]; then - echo "Need to set CONFIG env variable" + set +x + FILES=`ls .ci_support/linux_*` + CONFIGS="" + for file in $FILES; do + CONFIGS="${CONFIGS}'${file:12:-5}' or "; + done + echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" exit 1 fi -pip install shyaml -DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 ) +if [ -z "${DOCKER_IMAGE}" ]; then + SHYAML_INSTALLED="$(shyaml --version || echo NO)" + if [ "${SHYAML_INSTALLED}" == "NO" ]; then + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7" + DOCKER_IMAGE="condaforge/linux-anvil-comp7" + else + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" + fi +fi mkdir -p "$ARTIFACTS" DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" rm -f "$DONE_CANARY" -# Not all providers run with a real tty. Disable using one -DOCKER_RUN_ARGS=" " + +if [ -z "${CI}" ]; then + DOCKER_RUN_ARGS="-it " +fi export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ @@ -49,6 +64,7 @@ docker run ${DOCKER_RUN_ARGS} \ -e BINSTAR_TOKEN \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ + -e CI \ $DOCKER_IMAGE \ bash \ /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh diff --git a/.ci_support/linux_.yaml b/.ci_support/linux_.yaml index 4fa4af2..627331f 100644 --- a/.ci_support/linux_.yaml +++ b/.ci_support/linux_.yaml @@ -1,5 +1,3 @@ -build_number_decrement: -- '0' channel_sources: - conda-forge,defaults channel_targets: diff --git a/.circleci/build_steps.sh b/.circleci/build_steps.sh deleted file mode 100755 index 1301eb6..0000000 --- a/.circleci/build_steps.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -set -xeuo pipefail -export PYTHONUNBUFFERED=1 -export FEEDSTOCK_ROOT=/home/conda/feedstock_root -export RECIPE_ROOT=/home/conda/recipe_root -export CI_SUPPORT=/home/conda/feedstock_root/.ci_support -export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -cat >~/.condarc < /dev/null -fi diff --git a/.circleci/config.yml b/.circleci/config.yml index ac959fd..6ad461b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,26 +5,20 @@ version: 2 jobs: - build_linux_: + build: working_directory: ~/test machine: true - environment: - - CONFIG: "linux_" steps: - - checkout - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil-comp7 - - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh + # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. + command: exit 0 workflows: version: 2 build_and_test: jobs: - - build_linux_ + - build: + filters: + branches: + ignore: + - /.*/ diff --git a/.circleci/fast_finish_ci_pr_build.sh b/.circleci/fast_finish_ci_pr_build.sh deleted file mode 100755 index 4c0b560..0000000 --- a/.circleci/fast_finish_ci_pr_build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -curl https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/master/recipe/conda_forge_ci_setup/ff_ci_pr_build.py | \ - python - -v --ci "circle" "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" "${CIRCLE_BUILD_NUM}" "${CIRCLE_PR_NUMBER}" diff --git a/.circleci/run_docker_build.sh b/.circleci/run_docker_build.sh deleted file mode 100755 index 8bb0bda..0000000 --- a/.circleci/run_docker_build.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -set -xeuo pipefail - -THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" - -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) -RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" - -docker info - -# In order for the conda-build process in the container to write to the mounted -# volumes, we need to run with the same id as the host machine, which is -# normally the owner of the mounted volumes, or at least has write permission -export HOST_USER_ID=$(id -u) -# Check if docker-machine is being used (normally on OSX) and get the uid from -# the VM -if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then - export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) -fi - -ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" - -if [ -z "$CONFIG" ]; then - echo "Need to set CONFIG env variable" - exit 1 -fi - -pip install shyaml -DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 ) - -mkdir -p "$ARTIFACTS" -DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" -rm -f "$DONE_CANARY" -# Enable running in interactive mode attached to a tty -DOCKER_RUN_ARGS=" -it " - -export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" -docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \ - -e CONFIG \ - -e BINSTAR_TOKEN \ - -e HOST_USER_ID \ - -e UPLOAD_PACKAGES \ - $DOCKER_IMAGE \ - bash \ - /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh - -# verify that the end of the script was reached -test -f "$DONE_CANARY" \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..e120bde --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +* @rasbt +* @souravsingh diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 047fdaf..ba618a2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,7 +6,7 @@ Checklist * [ ] Used a fork of the feedstock to propose changes * [ ] Bumped the build number (if the version is unchanged) * [ ] Reset the build number to `0` (if the version changed) -* [ ] [Re-rendered]( https://conda-forge.org/docs/conda_smithy.html#how-to-re-render ) with the latest `conda-smithy` (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering) +* [ ] [Re-rendered]( https://conda-forge.org/docs/maintainer/updating_pkgs.html#rerendering-feedstocks ) with the latest `conda-smithy` (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering) * [ ] Ensured the license file is being packaged. - About biopandas =============== @@ -20,8 +16,15 @@ written in Python 2.7 and Python 3.6. Current build status ==================== -All platforms: -[![noarch](https://img.shields.io/circleci/project/github/conda-forge/biopandas-feedstock/master.svg?label=noarch)](https://circleci.com/gh/conda-forge/biopandas-feedstock) + + + + +
All platforms: + + + +
Current release info ==================== diff --git a/build-locally.py b/build-locally.py new file mode 100755 index 0000000..a7d9c2d --- /dev/null +++ b/build-locally.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python +# +# This file has been generated by conda-smithy in order to build the recipe +# locally. +# +import os +import glob +import subprocess +from argparse import ArgumentParser + + +def setup_environment(ns): + os.environ["CONFIG"] = ns.config + os.environ["UPLOAD_PACKAGES"] = "False" + + +def run_docker_build(ns): + script = glob.glob(".*/run_docker_build.sh")[0] + subprocess.check_call(script) + +def verify_config(ns): + valid_configs = {os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml")} + print(f"valid configs are {valid_configs}") + if ns.config in valid_configs: + print("Using " + ns.config + " configuration") + return + elif len(valid_configs) == 1: + ns.config = valid_configs.pop() + print("Found " + ns.config + " configuration") + elif ns.config is None: + print("config not selected, please choose from the following:\n") + selections = list(enumerate(sorted(valid_configs), 1)) + for i, c in selections: + print(f"{i}. {c}") + s = input("\n> ") + idx = int(s) - 1 + ns.config = selections[idx][1] + print(f"selected {ns.config}") + else: + raise ValueError("config " + ns.config + " is not valid") + # Remove the following, as implemented + if not ns.config.startswith('linux'): + raise ValueError(f"only Linux configs currently supported, got {ns.config}") + + +def main(args=None): + p = ArgumentParser("build-locally") + p.add_argument("config", default=None, nargs="?") + + ns = p.parse_args(args=args) + verify_config(ns) + setup_environment(ns) + + run_docker_build(ns) + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index afe8e32..c4665c9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ {% set name = "biopandas" %} -{% set version = "0.2.4" %} -{% set sha256 = "75b44658070eb1473c2e24f91940f7ec8b9c7b2678b8ae0df71f39a519452985" %} +{% set version = "0.2.5" %} +{% set sha256 = "0c3f770dabf27a4b405ed7606ce90f62e47f3d85d7385b13b8a7ae9964ac8bec" %} package: name: {{ name|lower }}