diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 40017f0..6002926 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -1,18 +1,48 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + jobs: -- job: linux_64 +- job: linux pool: vmImage: ubuntu-16.04 - timeoutInMinutes: 240 strategy: - maxParallel: 8 matrix: - linux_python3.6: - CONFIG: linux_python3.6 + linux_64_python3.6.____cpython: + CONFIG: linux_64_python3.6.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + linux_64_python3.7.____cpython: + CONFIG: linux_64_python3.7.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + linux_64_python3.8.____cpython: + CONFIG: linux_64_python3.8.____cpython + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + timeoutInMinutes: 360 + steps: - script: | - sudo pip install --upgrade pip - sudo pip install setuptools shyaml - displayName: Install dependencies + rm -rf /opt/ghc + df -h + displayName: Manage disk space - - script: .azure-pipelines/run_docker_build.sh - displayName: Run docker build \ No newline at end of file + # 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 --reset --credential yes + ls /proc/sys/fs/binfmt_misc/ + condition: not(startsWith(variables['CONFIG'], 'linux_64')) + displayName: Configure binfmt_misc + + - script: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/run_docker_build.sh + displayName: Run docker build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/build_steps.sh b/.azure-pipelines/build_steps.sh deleted file mode 100755 index 82832dc..0000000 --- a/.azure-pipelines/build_steps.sh +++ /dev/null @@ -1,38 +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 && 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 ) - -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=" " - - -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 \ - $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/.ci_support/linux_64_python3.6.____cpython.yaml b/.ci_support/linux_64_python3.6.____cpython.yaml new file mode 100644 index 0000000..c255f02 --- /dev/null +++ b/.ci_support/linux_64_python3.6.____cpython.yaml @@ -0,0 +1,23 @@ +c_compiler: +- gcc +c_compiler_version: +- '9' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-comp7 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.6.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cdt_name + - docker_image diff --git a/.ci_support/linux_64_python3.7.____cpython.yaml b/.ci_support/linux_64_python3.7.____cpython.yaml new file mode 100644 index 0000000..6c253b8 --- /dev/null +++ b/.ci_support/linux_64_python3.7.____cpython.yaml @@ -0,0 +1,23 @@ +c_compiler: +- gcc +c_compiler_version: +- '9' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-comp7 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.7.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cdt_name + - docker_image diff --git a/.ci_support/linux_64_python3.8.____cpython.yaml b/.ci_support/linux_64_python3.8.____cpython.yaml new file mode 100644 index 0000000..09653dd --- /dev/null +++ b/.ci_support/linux_64_python3.8.____cpython.yaml @@ -0,0 +1,23 @@ +c_compiler: +- gcc +c_compiler_version: +- '9' +cdt_name: +- cos6 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +docker_image: +- quay.io/condaforge/linux-anvil-comp7 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- 3.8.* *_cpython +target_platform: +- linux-64 +zip_keys: +- - cdt_name + - docker_image diff --git a/.ci_support/linux_python3.6.yaml b/.ci_support/linux_python3.6.yaml deleted file mode 100644 index bc44324..0000000 --- a/.ci_support/linux_python3.6.yaml +++ /dev/null @@ -1,14 +0,0 @@ -c_compiler: -- toolchain_c -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -docker_image: -- condaforge/linux-anvil -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- '3.6' diff --git a/.circleci/build_steps.sh b/.circleci/build_steps.sh deleted file mode 100755 index cc002c4..0000000 --- a/.circleci/build_steps.sh +++ /dev/null @@ -1,42 +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 adf9b63..6ad461b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,24 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + version: 2 jobs: - build_linux_python3.6: + build: working_directory: ~/test machine: true - environment: - - CONFIG: "linux_python3.6" 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 - 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_python3.6 + - 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 8c048ac..0000000 --- a/.circleci/fast_finish_ci_pr_build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -curl https://github.com/raw/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/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 2b3e413..0000000 --- a/.circleci/run_docker_build.sh +++ /dev/null @@ -1,56 +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 ) - -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 " - - -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 \ - $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/.gitattributes b/.gitattributes index 974953e..9060b27 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,21 @@ meta.yaml text eol=lf build.sh text eol=lf bld.bat text eol=crlf + +# github helper pieces to make some files not show up in diffs automatically +.azure-pipelines/* linguist-generated=true +.circleci/* linguist-generated=true +.drone/* linguist-generated=true +.drone.yml linguist-generated=true +.github/* linguist-generated=true +.travis/* linguist-generated=true +.appveyor.yml linguist-generated=true +.gitattributes linguist-generated=true +.gitignore linguist-generated=true +.travis.yml linguist-generated=true +.scripts/* 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 new file mode 100644 index 0000000..2af9604 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @CurtLH @h-vetinari @sodre \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index d87090f..0000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -Thanks for your interest in helping out conda-forge. - -Whether you are brand new or a seasoned maintainer, we always appreciate -feedback from the community about how we can improve conda-forge. If you -are submitting a PR or issue, please fill out the respective template. Should -any questions arise please feel free to ask the maintainer team of the -respective feedstock or reach out to `@conda-forge/core` for more complex -issues. - -In the case of any issues reported, please be sure to demonstrate the relevant -issue (even if it is an absence of a feature). Providing this information will -help busy maintainers understand what it is you hope to accomplish. Also this -will help provide them clues as to what might be going wrong. These examples -can also be reused as tests in the build to ensure further packages meet these -criteria. This is requested to help you get timely and relevant feedback. :) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index fc95334..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,25 +0,0 @@ - -Issue: - -
-Environment (conda list): -
- -``` -$ conda list - -``` -
- -
-Details about conda and system ( conda info ): -
- -``` -$ conda info - -``` -
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 047fdaf..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,18 +0,0 @@ - -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) -* [ ] Ensured the license file is being packaged. - - - - diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh new file mode 100755 index 0000000..aa9727b --- /dev/null +++ b/.scripts/build_steps.sh @@ -0,0 +1,53 @@ +#!/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="${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)" + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +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 + 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 + +if [ -z "${DOCKER_IMAGE}" ]; then + SHYAML_INSTALLED="$(shyaml -h || echo NO)" + if [ "${SHYAML_INSTALLED}" == "NO" ]; then + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" + DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) + if [ "${DOCKER_IMAGE}" = "" ]; then + echo "No docker_image entry found in ${CONFIG}. Falling back to condaforge/linux-anvil-comp7" + DOCKER_IMAGE="condaforge/linux-anvil-comp7" + fi + 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" + +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" +if [ -z "${CI}" ]; then + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" +fi + +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +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 GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ + -e CI \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e BUILD_WITH_CONDA_DEBUG \ + -e BUILD_OUTPUT_ID \ + -e BINSTAR_TOKEN \ + -e FEEDSTOCK_TOKEN \ + -e STAGING_BINSTAR_TOKEN \ + $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/LICENSE.txt b/LICENSE.txt index 72dc8fd..5f30279 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2018, conda-forge +Copyright (c) 2015-2020, conda-forge contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index 926c8f9..3ca7916 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ About allennlp ============== -[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) - Home: https://allennlp.org/ Package license: Apache-2.0 -Feedstock license: BSD 3-Clause +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/allennlp-feedstock/blob/master/LICENSE.txt) Summary: An open-source NLP research library, built on PyTorch. +Development: https://github.com/allenai/allennlp + +Documentation: https://allenai.github.io/allennlp-docs/ + An Apache 2.0 NLP research library, built on PyTorch, for developing state-of-the-art deep learning models on a wide variety of linguistic tasks. @@ -18,9 +20,48 @@ deep learning models on a wide variety of linguistic tasks. Current build status ==================== -[![Linux](https://img.shields.io/circleci/project/github/conda-forge/allennlp-feedstock/master.svg?label=Linux)](https://circleci.com/gh/conda-forge/allennlp-feedstock) -![OSX disabled](https://img.shields.io/badge/OSX-disabled-lightgrey.svg) -![Windows disabled](https://img.shields.io/badge/Windows-disabled-lightgrey.svg) + + + + + + + +
Azure +
+ + + + + + + + + + + + + + + + + + +
VariantStatus
linux_64_python3.6.____cpython + + variant + +
linux_64_python3.7.____cpython + + variant + +
linux_64_python3.8.____cpython + + variant + +
+
+
Current release info ==================== @@ -54,6 +95,8 @@ conda search allennlp --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) + 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 conda-forge GitHub organization. The conda-forge organization contains one repository @@ -63,7 +106,7 @@ A feedstock is made up of a conda recipe (the instructions on what and how to bu the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/) -and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable +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/) channel for Linux, Windows and OSX respectively. @@ -113,5 +156,6 @@ Feedstock Maintainers ===================== * [@CurtLH](https://github.com/CurtLH/) +* [@h-vetinari](https://github.com/h-vetinari/) * [@sodre](https://github.com/sodre/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 41f32ca..ad85a2c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,6 @@ -jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- - \ No newline at end of file +jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py new file mode 100755 index 0000000..3453cfe --- /dev/null +++ b/build-locally.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python3 +# +# 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" + if ns.debug: + os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" + if ns.output_id: + os.environ["BUILD_OUTPUT_ID"] = ns.output_id + + +def run_docker_build(ns): + script = ".scripts/run_docker_build.sh" + 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="?") + p.add_argument( + "--debug", + action="store_true", + help="Setup debug environment using `conda debug`", + ) + p.add_argument( + "--output-id", help="If running debug, specify the output to setup." + ) + + ns = p.parse_args(args=args) + verify_config(ns) + setup_environment(ns) + + run_docker_build(ns) + + +if __name__ == "__main__": + main() diff --git a/recipe/0001-use-entry-points.diff b/recipe/0001-use-entry-points.diff deleted file mode 100644 index 7466d8b..0000000 --- a/recipe/0001-use-entry-points.diff +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/allennlp/run.py b/allennlp/run.py -index ef1ca6c..8b0e44b 100755 ---- a/allennlp/run.py -+++ b/allennlp/run.py -@@ -14,5 +14,8 @@ logging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(message)s - - from allennlp.commands import main # pylint: disable=wrong-import-position - --if __name__ == "__main__": -+def run(): - main(prog="allennlp") -+ -+if __name__ == "__main__": -+ run() -diff --git a/bin/allennlp b/bin/allennlp -deleted file mode 100755 -index c8a2d22..0000000 ---- a/bin/allennlp -+++ /dev/null -@@ -1,2 +0,0 @@ --#!/bin/sh --python -m allennlp.run "$@" -diff --git a/setup.py b/setup.py -index 897b25a..54bf48f 100644 ---- a/setup.py -+++ b/setup.py -@@ -135,7 +135,11 @@ setup(name='allennlp', - 'sqlparse==0.2.4', - 'pytorch-pretrained-bert==0.3.0', - ], -- scripts=["bin/allennlp"], -+ entry_points={ -+ 'console_scripts': [ -+ "allennlp=allennlp.run:run" -+ ] -+ }, - setup_requires=setup_requirements, - tests_require=[ - 'pytest', diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 163ff32..0d6c9f2 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,31 +1,20 @@ -{% set name = "allennlp" %} -{% set version = "0.7.2" %} +{% set version = "1.3.0" %} {% set spacy_model = "en_core_web_sm" %} -{% set spacy_model_version = "2.0.0" %} package: - name: {{ name|lower }} + name: allennlp version: {{ version }} source: - - folder: {{ name }} - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: c51d32598ed0efb0599c15f463e2fe792e06d843964528b6bca9747b0d31be5c - patches: - # Remove when allenai/allennlp#2232 is merged and released. - - 0001-use-entry-points.diff - - # Spacy Model - - folder: {{ spacy_model }} - url: https://github.com/explosion/spacy-models/releases/download/{{ spacy_model }}-{{ spacy_model_version }}/{{ spacy_model }}-{{ spacy_model_version }}.tar.gz - sha256: 9d9d231d7c9cbad82178b566fdb25768e3d5098af23ce11e03ec4f432f4a2298 + - url: https://pypi.io/packages/source/a/allennlp/allennlp-{{ version }}.tar.gz + sha256: 72c35c6996d3981335c10686bc2ff25e0f5b6b60617ab1dd26d5bcf74877137e build: entry_points: - - allennlp=allennlp.run:run + - allennlp=allennlp.__main__:run number: 0 - script: "{{ PYTHON }} -m pip install ./{{ name }} --no-deps -vv" + script: "{{ PYTHON }} -m pip install . --no-deps -vv" skip: True # [not linux or py<36] requirements: @@ -36,110 +25,71 @@ requirements: - pip run: - python - - pytorch >=0.4.1,<0.5.0 - - jsonnet ==0.10.0 - - overrides + - pytorch >=1.6.0,<1.8.0 + - jsonnet >=0.10.0 + - overrides ==3.1.0 - nltk - - msgpack-python >=0.5.6,<0.6.0 - - spacy >=2.0,<2.1 + - spacy >=2.1.0,<2.4 - numpy - - tensorboardx ==1.2 - - cffi 1.11.* - - awscli >=1.11.91 - - boto3 - - moto ==1.3.4 - - flask ==1.0.2 - - flask-cors ==3.0.6 - - gevent ==1.3.6 + - tensorboardx >=1.2 + - boto3 >=1.14,<2.0 - requests >=2.18 - tqdm >=4.19 - - editdistance - h5py - scikit-learn - scipy - - pytz ==2017.3 - - unidecode - - matplotlib ==2.2.3 - pytest - - flaky - - responses >=0.7 - - numpydoc ==0.8.0 - - conllu ==0.11 - - parsimonious ==0.8.0 - - ftfy - - sqlparse ==0.2.4 - - pytorch-pretrained-bert ==0.1.2 + - jsonpickle + - dataclasses # [py<37] + - transformers >=4.0,<4.1 + - filelock >=3.0,<3.1 + - sentencepiece + - jsonpickle test: - source_files: - - {{ spacy_model }} + requires: + - ipykernel + - jupyter + - nltk_data + - spacy-model-{{ spacy_model }} commands: - - python -m spacy link {{ spacy_model }}/{{ spacy_model }} {{ spacy_model }} + - python -m spacy link {{ spacy_model }} {{ spacy_model }} - allennlp test-install imports: - allennlp - allennlp.commands - allennlp.common - allennlp.common.testing - - allennlp.custom_extensions - - allennlp.custom_extensions._ext - - allennlp.custom_extensions._ext.highway_lstm_layer - allennlp.data - allennlp.data.dataset_readers - - allennlp.data.dataset_readers.coreference_resolution - allennlp.data.dataset_readers.dataset_utils - - allennlp.data.dataset_readers.reading_comprehension - - allennlp.data.dataset_readers.semantic_parsing - - allennlp.data.dataset_readers.semantic_parsing.wikitables - allennlp.data.fields - - allennlp.data.iterators + - allennlp.data.samplers - allennlp.data.token_indexers - allennlp.data.tokenizers - allennlp.models - - allennlp.models.coreference_resolution - - allennlp.models.encoder_decoders - - allennlp.models.reading_comprehension - - allennlp.models.semantic_parsing - - allennlp.models.semantic_parsing.atis - - allennlp.models.semantic_parsing.nlvr - - allennlp.models.semantic_parsing.quarel - - allennlp.models.semantic_parsing.wikitables - allennlp.modules - allennlp.modules.attention - allennlp.modules.matrix_attention - allennlp.modules.seq2seq_encoders - allennlp.modules.seq2vec_encoders - - allennlp.modules.similarity_functions - allennlp.modules.span_extractors - allennlp.modules.text_field_embedders - allennlp.modules.token_embedders - allennlp.nn - allennlp.nn.regularizers - allennlp.predictors - - allennlp.semparse - - allennlp.semparse.contexts - - allennlp.semparse.executors - - allennlp.semparse.type_declarations - - allennlp.semparse.worlds - - allennlp.service - - allennlp.service.predictors - - allennlp.state_machines - - allennlp.state_machines.states - - allennlp.state_machines.trainers - - allennlp.state_machines.transition_functions - allennlp.tools - allennlp.training + - allennlp.training.learning_rate_schedulers - allennlp.training.metrics - requires: - - ipykernel <5.0.0 - - jupyter - - nltk_data + - allennlp.training.momentum_schedulers about: home: https://allennlp.org/ license: Apache-2.0 license_family: APACHE - license_file: {{ name }}/LICENSE + license_file: LICENSE summary: An open-source NLP research library, built on PyTorch. description: | An Apache 2.0 NLP research library, built on PyTorch, for developing state-of-the-art @@ -151,3 +101,4 @@ extra: recipe-maintainers: - CurtLH - sodre + - h-vetinari