diff --git a/.circleci/config.yml b/.circleci/config.yml index 6ad461b..3e61aa2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,8 @@ version: 2 jobs: build: working_directory: ~/test - machine: true + machine: + image: ubuntu-2004:current steps: - run: # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index d71d6ae..595f8b5 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -24,7 +24,10 @@ export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc < /dev/null +if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then + cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" +fi + if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" diff --git a/LICENSE.txt b/LICENSE.txt index 6ec1401..2ec51d7 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,13 +1,27 @@ -BSD 3-clause license +BSD-3-Clause license Copyright (c) 2015-2022, 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: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/README.md b/README.md index 1c3b65c..ade5600 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -About aiida-core -================ +About aiida +=========== Home: http://aiida.net @@ -31,54 +31,58 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | +| [![Conda Recipe](https://img.shields.io/badge/recipe-aiida-green.svg)](https://anaconda.org/conda-forge/aiida) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/aiida.svg)](https://anaconda.org/conda-forge/aiida) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/aiida.svg)](https://anaconda.org/conda-forge/aiida) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/aiida.svg)](https://anaconda.org/conda-forge/aiida) | | [![Conda Recipe](https://img.shields.io/badge/recipe-aiida--core-green.svg)](https://anaconda.org/conda-forge/aiida-core) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/aiida-core.svg)](https://anaconda.org/conda-forge/aiida-core) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/aiida-core.svg)](https://anaconda.org/conda-forge/aiida-core) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/aiida-core.svg)](https://anaconda.org/conda-forge/aiida-core) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-aiida--core.atomic_tools-green.svg)](https://anaconda.org/conda-forge/aiida-core.atomic_tools) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/aiida-core.atomic_tools.svg)](https://anaconda.org/conda-forge/aiida-core.atomic_tools) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/aiida-core.atomic_tools.svg)](https://anaconda.org/conda-forge/aiida-core.atomic_tools) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/aiida-core.atomic_tools.svg)](https://anaconda.org/conda-forge/aiida-core.atomic_tools) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-aiida--core.notebook-green.svg)](https://anaconda.org/conda-forge/aiida-core.notebook) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/aiida-core.notebook.svg)](https://anaconda.org/conda-forge/aiida-core.notebook) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/aiida-core.notebook.svg)](https://anaconda.org/conda-forge/aiida-core.notebook) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/aiida-core.notebook.svg)](https://anaconda.org/conda-forge/aiida-core.notebook) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-aiida--core.rest-green.svg)](https://anaconda.org/conda-forge/aiida-core.rest) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/aiida-core.rest.svg)](https://anaconda.org/conda-forge/aiida-core.rest) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/aiida-core.rest.svg)](https://anaconda.org/conda-forge/aiida-core.rest) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/aiida-core.rest.svg)](https://anaconda.org/conda-forge/aiida-core.rest) | | [![Conda Recipe](https://img.shields.io/badge/recipe-aiida--core.services-green.svg)](https://anaconda.org/conda-forge/aiida-core.services) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/aiida-core.services.svg)](https://anaconda.org/conda-forge/aiida-core.services) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/aiida-core.services.svg)](https://anaconda.org/conda-forge/aiida-core.services) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/aiida-core.services.svg)](https://anaconda.org/conda-forge/aiida-core.services) | -Installing aiida-core -===================== +Installing aiida +================ -Installing `aiida-core` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: +Installing `aiida` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: ``` conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `aiida-core, aiida-core.services` can be installed with `conda`: +Once the `conda-forge` channel has been enabled, `aiida, aiida-core, aiida-core.atomic_tools, aiida-core.notebook, aiida-core.rest, aiida-core.services` can be installed with `conda`: ``` -conda install aiida-core aiida-core.services +conda install aiida aiida-core aiida-core.atomic_tools aiida-core.notebook aiida-core.rest aiida-core.services ``` or with `mamba`: ``` -mamba install aiida-core aiida-core.services +mamba install aiida aiida-core aiida-core.atomic_tools aiida-core.notebook aiida-core.rest aiida-core.services ``` -It is possible to list all of the versions of `aiida-core` available on your platform with `conda`: +It is possible to list all of the versions of `aiida` available on your platform with `conda`: ``` -conda search aiida-core --channel conda-forge +conda search aiida --channel conda-forge ``` or with `mamba`: ``` -mamba search aiida-core --channel conda-forge +mamba search aiida --channel conda-forge ``` Alternatively, `mamba repoquery` may provide more information: ``` # Search all versions available on your platform: -mamba repoquery search aiida-core --channel conda-forge +mamba repoquery search aiida --channel conda-forge -# List packages depending on `aiida-core`: -mamba repoquery whoneeds aiida-core --channel conda-forge +# List packages depending on `aiida`: +mamba repoquery whoneeds aiida --channel conda-forge -# List dependencies of `aiida-core`: -mamba repoquery depends aiida-core --channel conda-forge +# List dependencies of `aiida`: +mamba repoquery depends aiida --channel conda-forge ``` @@ -123,17 +127,17 @@ Terminology produce the finished article (built conda distributions) -Updating aiida-core-feedstock -============================= +Updating aiida-feedstock +======================== -If you would like to improve the aiida-core recipe or build a new +If you would like to improve the aiida recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the `conda-forge` channel, whereupon the built conda packages will be available for everybody to install and use from the `conda-forge` channel. -Note that all branches in the conda-forge/aiida-core-feedstock are +Note that all branches in the conda-forge/aiida-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions. diff --git a/build-locally.py b/build-locally.py index eec38a0..3f4b7a7 100755 --- a/build-locally.py +++ b/build-locally.py @@ -86,12 +86,19 @@ def main(args=None): verify_config(ns) setup_environment(ns) - if ns.config.startswith("linux") or ( - ns.config.startswith("osx") and platform.system() == "Linux" - ): - run_docker_build(ns) - elif ns.config.startswith("osx"): - run_osx_build(ns) + try: + if ns.config.startswith("linux") or ( + ns.config.startswith("osx") and platform.system() == "Linux" + ): + run_docker_build(ns) + elif ns.config.startswith("osx"): + run_osx_build(ns) + finally: + recipe_license_file = os.path.join( + "recipe", "recipe-scripts-license.txt" + ) + if os.path.exists(recipe_license_file): + os.remove(recipe_license_file) if __name__ == "__main__": diff --git a/recipe/meta.yaml b/recipe/meta.yaml index afbb238..cfb709f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,92 +1,163 @@ -{% set name = "aiida-core" %} -{% set version = "2.0.1" %} +# Set Version and Build-Number +{% set version = "2.0.2" %} +{% set build = 0 %} +# Set names for the AiiDA Meta-Package and accompanying Sub-Packages +{% set aiidameta = "aiida" %} +{% set aiidacore = "aiida-core" %} +{% set aiidaservice = "aiida-core.services" %} +{% set aiida_atomic_tools = "aiida-core.atomic_tools" %} +{% set aiida_notebook = "aiida-core.notebook" %} +{% set aiida_rest = "aiida-core.rest" %} + +# Define the Source and AiiDA Meta-Package package: - name: {{ name|lower }} + name: {{ aiidameta|lower }} version: {{ version }} source: - url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: 7b0a09bc02dee38410f6fc7dd0a679789bb60c0bcc2b75212e9668c727f6e966 + url: https://pypi.io/packages/source/{{ aiidacore[0] }}/{{ aiidacore }}/{{ aiidacore }}-{{ version }}.tar.gz + sha256: afcb159fbacdaa2f8ffa5780ea2cc51c4f16aa3883996b8adeefdd0099b4c41b build: - number: 0 + number: {{ build }} noarch: python - entry_points: - - verdi=aiida.cmdline.commands.cmd_verdi:verdi - script: 'python -m pip install . --no-deps --ignore-installed -vvv ' +# Packages that shall be shipped when installing from the Meta-Package are +# defined here requirements: - host: - - python - - pip - - flit-core run: - - python ~=3.8 - - alembic ~=1.2 - - archive-path ~=0.4.0 - - aio-pika ~=6.6 - - circus ~=0.17.1 - - click-config-file ~=0.6.0 - - click-spinner ~=0.1.8 - - click ~=8.1 - - disk-objectstore ~=0.6.0 - - python-graphviz ~=0.13 - - ipython ~=7.20 - - jinja2 ~=3.0 - - jsonschema ~=3.0 - - kiwipy[rmq] ~=0.7.5 - - importlib-metadata ~=4.3 - - numpy ~=1.19 - - pamqp ~=2.3 - - paramiko ~=2.7,>=2.7.2 - - plumpy ~=0.21.0 - - pgsu ~=0.2.1 - - psutil ~=5.6 - - psycopg2-binary ~=2.8 - - pytz ~=2021.1 - - pyyaml ~=5.4 - - sqlalchemy ~=1.4.22 - - tabulate ~=0.8.5 - - tqdm ~=4.45 - - upf_to_json ~=0.9.2 - - wrapt ~=1.11.1 - run_constrained: - - aiida-core.services =={{ version }} - -test: - requires: - - pip - imports: - - aiida - - aiida.common - - aiida.common.hashing - - aiida.manage - - aiida.restapi - - aiida.schedulers - - aiida.transports - - aiida.tools - - aiida.tools.dbexporters - - aiida.tools.dbimporters - commands: - - verdi --help - - verdi --version - - pip check + - {{ pin_subpackage(aiidacore, exact=True) }} + - {{ pin_subpackage(aiidaservice, exact=True) }} +# Define the available Sub-Packages outputs: - - name: aiida-core - - name: aiida-core.services + - name: {{ aiidacore }} + build: + noarch: python + entry_points: + - verdi=aiida.cmdline.commands.cmd_verdi:verdi + script: 'python -m pip install . --no-deps --ignore-installed -vvv ' + requirements: + host: + - python + - pip + - flit-core + run: + - python ~=3.8 + - alembic ~=1.2 + - archive-path ~=0.4.0 + - aio-pika ~=6.6 + - circus ~=0.17.1 + - click-config-file ~=0.6.0 + - click-spinner ~=0.1.8 + - click ~=8.1 + - disk-objectstore ~=0.6.0 + - python-graphviz ~=0.13 + - ipython ~=7.20 + - jinja2 ~=3.0 + - jsonschema ~=3.0 + - kiwipy[rmq] ~=0.7.5 + - importlib-metadata ~=4.3 + - numpy ~=1.19 + - pamqp ~=2.3 + - paramiko ~=2.7,>=2.7.2 + - plumpy ~=0.21.0 + - pgsu ~=0.2.1 + - psutil ~=5.6 + - psycopg2-binary ~=2.8 + - pytz ~=2021.1 + - pyyaml ~=5.4 + - sqlalchemy ~=1.4.22 + - tabulate ~=0.8.5 + - tqdm ~=4.45 + - upf_to_json ~=0.9.2 + - wrapt ~=1.11.1 + run_constrained: + - {{ pin_subpackage(aiidaservice, exact=True) }} + test: + requires: + - pip + imports: + - aiida + - aiida.common + - aiida.common.hashing + - aiida.manage + - aiida.restapi + - aiida.schedulers + - aiida.transports + - aiida.tools + - aiida.tools.dbexporters + - aiida.tools.dbimporters + commands: + - verdi --help + - verdi --version + - pip check + + - name: {{ aiidaservice }} build: noarch: python requirements: run: - postgresql >=9.6 - - rabbitmq-server >=3.7 + - rabbitmq-server >=3.7,<3.8.15 test: commands: - postgres --help - rabbitmqctl help + - name: {{ aiida_atomic_tools }} + build: + noarch: python + requirements: + run: + - {{ pin_subpackage(aiidacore, exact=True) }} + - ase ~=3.18 + - matplotlib-base ~=3.3,>=3.3.4 + - pycifrw ~=4.4 + - pymatgen >=2019.7.2,<=2022.1.9,!=2019.9.7 + - pymysql ~=0.9.3 + - seekpath ~=1.9,>=1.9.3 + - spglib ~=1.14 + test: + requires: + - pip + commands: + - pip check + + - name: {{ aiida_notebook }} + build: + noarch: python + requirements: + run: + - {{ pin_subpackage(aiidacore, exact=True) }} + - jupyter_client ~=6.1,<6.1.13 + - jupyter ~=1.0 + - notebook ~=6.1,>=6.1.5 + test: + requires: + - pip + commands: + - pip check + + - name: {{ aiida_rest }} + build: + noarch: python + requirements: + run: + - {{ pin_subpackage(aiidacore, exact=True) }} + - flask-cors ~=3.0 + - flask-restful ~=0.3.7 + - flask ~=2.0 + - pyparsing ~=2.4 + - python-memcached ~=1.59 + - seekpath ~=1.9,>=1.9.3 + test: + requires: + - pip + commands: + - pip check + about: home: http://aiida.net license: MIT