From fdbaa7da1a39e6c147762a8dbccd0f8c57ab5c5a Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Tue, 29 Aug 2017 13:31:14 +0200 Subject: [PATCH 1/7] Switch to molmod bot for testing and releases --- .appveyor.yml | 42 ++++---- .travis.yml | 237 +++++++++++++++++++++++---------------------- README.rst | 14 ++- doc/ug_install.rst | 2 +- 4 files changed, 155 insertions(+), 140 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0c23216a..e1fc0181 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,13 +5,13 @@ environment: # See: http://stackoverflow.com/a/13751649/163740 CMD_IN_ENV: 'cmd /E:ON /V:ON /C .\tools\appveyor\run_with_env.cmd' ANACONDA_TOKEN: - secure: UMSXPRCnP38rwuIS4dAq/ukkO7MNo513Qn8XwLPrtGtbGA0QGEDx8aWUQMsLrlaK + secure: hkjyENhlvGf1C+qeTYgkU+ggPCmHAdAh8FCGJpdnEw8kmUJlqqDXfRWt94qE6W3Y PYPKG: yaff GITHUB_REPO_NAME: molmod/yaff matrix: - - PYTHON_VERSION: 3.5 - CONDA: C:\Miniconda35 + - PYTHON_VERSION: 2.7 + CONDA: C:\Miniconda - PYTHON_VERSION: 3.6 CONDA: C:\Miniconda36 @@ -19,12 +19,9 @@ environment: version: '{build}' image: Visual Studio 2015 -# For testing only... -#skip_non_tags: true - platform: -- x86 -- x64 + - x86 + - x64 branches: only: @@ -44,7 +41,7 @@ install: # Load the conda root environment, configure and install some packages - '"%CONDA%\Scripts\activate.bat"' - conda config --set always_yes yes --set changeps1 no - - conda config --add channels tovrstra + - conda config --add channels molmod - conda update -q conda - conda install conda-build anaconda-client numpy cython # Install codecov tool for uploading coverage reports @@ -67,7 +64,9 @@ test_script: - 'echo "backend:agg" > "%HOME%\.matplotlib\matplotlibrc"' # Run the tests outside the source tree. - - pushd %HOMEPATH% && (nosetests %PYPKG% -v --detailed-errors --with-coverage --cover-package=%PYPKG% --cover-tests --cover-erase --cover-inclusive --cover-branches --cover-xml & popd) + - pushd "%HOMEPATH%" && (nosetests %PYPKG% -v --detailed-errors --with-coverage + --cover-package=%PYPKG% --cover-tests --cover-erase --cover-inclusive + --cover-branches --cover-xml & popd) after_test: # Copy the conda build to the home dir, such that it can be registerd as an artifact @@ -80,21 +79,26 @@ artifacts: - path: 'conda-bld\win-*\*.tar.bz2' on_success: - # This is virtually impossible with a normal dos batch script... # Upload to anaconda, with the correct label derived from the version tag. + # This is virtually impossible with a normal dos batch script... + # It also contains an incredibly clunky way to avoid build failure when anaconda writes + # something harmless to stderr. The normal way does not work! + # & anaconda $parameters 2>&1 + # Powershell should be called Powerhell! - ps: if (($Env:APPVEYOR_REPO_TAG -eq "true") -and ($Env:APPVEYOR_REPO_NAME -eq ${Env:GITHUB_REPO_NAME})) { $tar_glob = ".\conda-bld\win-*\${Env:PYPKG}-${Env:APPVEYOR_REPO_TAG_NAME}-*.tar.bz2"; - Write-Host $tar_glob; + Write-Host "tar_glob $tar_glob"; if ($Env:APPVEYOR_REPO_TAG_NAME -like "*a*") { - Start-Process -FilePath anaconda -ArgumentList "-t $Env:ANACONDA_TOKEN upload - $tar_glob --no-progress -l alpha" -Wait -Passthru + $anaconda_label = "alpha" } elseif ($Env:APPVEYOR_REPO_TAG_NAME -like "*b*") { - Start-Process -FilePath anaconda -ArgumentList "-t $Env:ANACONDA_TOKEN upload - $tar_glob --no-progress -l beta" -Wait -Passthru + $anaconda_label = "beta" } else { - Start-Process -FilePath anaconda -ArgumentList "-t $Env:ANACONDA_TOKEN upload - $tar_glob --no-progress" -Wait -Passthru - } + $anaconda_label = "main" + }; + Write-Host "anaconda_label $anaconda_label"; + $parameters = '-t', "$Env:ANACONDA_TOKEN", 'upload', "$tar_glob", '-l', + "$anaconda_label", '--force', '--no-progress'; + & cmd /c 'anaconda 2>&1' $parameters; } diff --git a/.travis.yml b/.travis.yml index f72acf9f..383064fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,14 @@ env: matrix: - - MYCONDAPY=2.7 - - MYCONDAPY=3.5 - - MYCONDAPY=3.6 + - MYCONDAPY=2.7 + - MYCONDAPY=3.6 global: # ANACONDA_TOKEN encrypted - - secure: "Qekvnk/wtRQyPxmNJC3aMcyiBdXW1K+oSK5d1X2+XggYxA2k28iwq2e08Tfym+jVpPybtvmK65rMJ40Zrgp67RCbpqDlcwkjN7k1DkyF3kIV9t9HOVRdXyaKqWfOYvZqmljeoywj4UlJnXBfZnlUdcaGIe0dnIN8P8GKxzjSeoo=" + - secure: "Pgu8yuDay2kG1a+dnsgl3lBlGBDb6ifhMRzE1DqcRbCqplpCCgfxNL3Njt+sLtTWZ4jPPC4w0ZZrrqnOg62G4CeZCfp7cznJvN82mwYtW4ThlszIdXRfR+QfS35xKkvfWCvMYX3qBJ8xx3ih+g2GXx5roTE/qq7GfzPuOa43jsw=" # GITHUB_TOKEN - - secure: "JNNWmIAoY7ysYoGylugSYce3w02ZwQVsFQkb4Nr40ZBiuZBkPKxQfmeyi6ReKieY6Q3za5Lz8vwaDodl1cHB3OQNkJR49l7m3AlXzBWAKzJTDl6N20el6gKQdgM3W0VaniomK6i/laOMIaNDU/f4nVehL8SwuSFooi69YGyuvrQ=" + - secure: "Pjb4QTTTd1L0ssl5YGrFP/bQwGYOMICZVJJAndlv1o9VmR4o81Mddv2IgxELmFA0K0lO0tFPOcw8O69Oa/qnXsRKGF+05fMUKzb+If8yGoupVaa/FAGfha6/WNw+jnDqHUfXCI+nXySIRSk9kRfl0gH9LW0clSUF8dMMKC95+wg=" # PYPI_PASSWD - - secure: "X/3siVpfbJrMPQ0j5ky8nUKR/GQ5jY3R7vY1Fr7C2es5k+OZdZpdzgjto9eUDoTpm18EVYxu8b4xS98ws/FyhWaeRWwmqjpngQAJfM2YPCmsmSiGVbYo/w+3TDTMY2papj+fND0b8SYvW1lWjGB7VzXh9hNIbGWwD6TKmTQNyD8=" + - secure: "fcr/ruryZctvHipyllH8rnGDpd8WH//zUo2dAzI0heqEqucx3BLZ9HbutPt0QmYirPNM/ywNfvRX93IhnyX5vGDsDfrcU7a69nsqHXapTEU04BcYH8MOPFvakf/s8k7biMeZCqZ4C3ycw8mkp3B9/L4C0pf/fnprvnyDNWwA2yE=" - PYPKG=yaff - GITHUB_REPO_NAME=molmod/yaff @@ -18,7 +17,7 @@ language: generic os: - linux - osx -osx_image: xcode8.3 +osx_image: xcode6.4 dist: trusty sudo: false @@ -28,126 +27,132 @@ branches: - /^[0-9]+\.[0-9]+(\.[0-9]+)?([ab][0-9]+)?$/ install: -# Get miniconda. Take the right version, so re-installing python is only needed for 3.5. -- if [[ "$MYCONDAPY" == "2.7" ]]; then - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; + # Get miniconda. Take the right version, so re-installing python is only needed for 3.5. + - if [[ "$MYCONDAPY" == "2.7" ]]; then + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; + else + wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; + fi; else - wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; - fi; - else - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - else - wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; - fi; - fi -- bash miniconda.sh -b -p $HOME/miniconda -- export PATH="$HOME/miniconda/bin:$PATH" -- hash -r - -# Configure conda and get a few essentials -- conda config --set always_yes yes --set changeps1 no -- conda config --add channels tovrstra -- conda update -q conda -# Get the right python version for building. This only does something for 3.5. -# Install extra package needed to make things work. Most things can be listed as -# dependencies on metal.yaml and setup.py, unless setup.py already imports them. -# Install conda tools for packaging and uploading -- conda install python=${MYCONDAPY} numpy cython sphinx conda-build anaconda-client -# Install more recent stuff with pip -- pip install codecov coverage -# Show conda info for debugging -- conda info -a - -# No visual backend for matplotlib. -- export MATPLOTLIBRC=$PWD; echo backend:agg > ${MATPLOTLIBRC}/matplotlibrc + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; + else + wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; + fi; + fi + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH" + - hash -r + + # Configure conda and get a few essentials + - conda config --set always_yes yes + - conda config --add channels molmod + - conda update -q conda + # Get the right python version for building. This only does something for 3.5. + # Install extra package needed to make things work. Most things can be listed as + # dependencies on metal.yaml and setup.py, unless setup.py already imports them. + # Install conda tools for packaging and uploading + - conda install python=${MYCONDAPY} numpy cython sphinx conda-build anaconda-client + # Install more recent stuff with pip + - pip install codecov coverage + # Show conda info for debugging + - conda info -a + + # No visual backend for matplotlib. + - export MATPLOTLIBRC=$PWD; echo backend:agg > ${MATPLOTLIBRC}/matplotlibrc script: -# Check if code is normalized properly, whitespace etc -- wget https://raw.githubusercontent.com/tovrstra/devscripts/master/scripts/ds-normalize-code -O ds-normalize-code; - chmod +x ds-normalize-code; - ./ds-normalize-code; + # Check if code is normalized properly, whitespace etc + - wget https://raw.githubusercontent.com/tovrstra/devscripts/master/scripts/ds-normalize-code -O ds-normalize-code; + chmod +x ds-normalize-code; + ./ds-normalize-code; -# Build the conda package -- git fetch origin --tags -- conda build -q tools/conda.recipe + # Build the conda package + - git fetch origin --tags + - conda build -q tools/conda.recipe -# Build source package, should work too and needed for deployment to Github and -# PyPI. -- python setup.py sdist + # Build source package, should work too and needed for deployment to Github and + # PyPI. + - python setup.py sdist -# Install Conda package -- conda install --use-local $PYPKG + # Install Conda package + - conda install --use-local $PYPKG -# Compile documentation -- (cd doc; make html) + # Compile documentation + - (cd doc; make html) -# Run tests out of source tree, to make sure that installed version is tested. -- (cd; nosetests $PYPKG -v --detailed-errors --with-coverage --cover-package=$PYPKG --cover-tests --cover-erase --cover-inclusive --cover-branches --cover-xml) + # Run tests out of source tree, to make sure that installed version is tested. + - (cd; nosetests $PYPKG -v --detailed-errors --with-coverage --cover-package=$PYPKG --cover-tests --cover-erase --cover-inclusive --cover-branches --cover-xml) -## Run the optimizer test DISABLED UNTIL TAMKIN IS PORTED TO PYTHON 3 -#- (cd; yaff-opttest) + ## Run the optimizer test DISABLED UNTIL TAMKIN IS PORTED TO PYTHON 3 + #- (cd; yaff-opttest) after_success: -# Upload the coverage analysis -- codecov -f ~/coverage.xml + # Upload the coverage analysis + - codecov -f ~/coverage.xml # In deployment, the env var TRAVIS_TAG contains the name of the current tag, if any. deploy: -- provider: releases - skip_cleanup: true - api_key: ${GITHUB_TOKEN} - file: dist/${PYPKG}-${TRAVIS_TAG}.tar.gz - on: - repo: ${GITHUB_REPO_NAME} - tags: true - condition: "$TRAVIS_TAG != *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" - prerelease: false -- provider: releases - skip_cleanup: true - api_key: ${GITHUB_TOKEN} - file: dist/${PYPKG}-${TRAVIS_TAG}.tar.gz - on: - repo: ${GITHUB_REPO_NAME} - tags: true - condition: "$TRAVIS_TAG == *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" - prerelease: true -- provider: script - skip_cleanup: true - script: anaconda -t $ANACONDA_TOKEN upload -l alpha ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 - on: - repo: ${GITHUB_REPO_NAME} - tags: true - condition: "$TRAVIS_TAG == *a*" -- provider: script - skip_cleanup: true - script: anaconda -t $ANACONDA_TOKEN upload -l beta ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 - on: - repo: ${GITHUB_REPO_NAME} - tags: true - condition: "$TRAVIS_TAG == *b*" -- provider: script - skip_cleanup: true - script: anaconda -t $ANACONDA_TOKEN upload -l main ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 - on: - repo: ${GITHUB_REPO_NAME} - tags: true - condition: "$TRAVIS_TAG != *[ab]*" -- provider: pypi - skip_cleanup: true - user: tovrstra - password: ${PYPI_PASSWD} - on: - repo: ${GITHUB_REPO_NAME} - tags: true - condition: "$TRAVIS_TAG != *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" -- provider: pages - skip_cleanup: true - github_token: ${GITHUB_TOKEN} - project_name: ${PYPKG} - local_dir: doc/_build/html - on: - repo: ${GITHUB_REPO_NAME} - condition: "$TRAVIS_TAG != *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" - tags: true + - provider: releases + skip_cleanup: true + api_key: ${GITHUB_TOKEN} + file: dist/${PYPKG}-${TRAVIS_TAG}.tar.gz + on: + repo: ${GITHUB_REPO_NAME} + tags: true + condition: "$TRAVIS_TAG != *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" + prerelease: false + + - provider: releases + skip_cleanup: true + api_key: ${GITHUB_TOKEN} + file: dist/${PYPKG}-${TRAVIS_TAG}.tar.gz + on: + repo: ${GITHUB_REPO_NAME} + tags: true + condition: "$TRAVIS_TAG == *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" + prerelease: true + + - provider: script + skip_cleanup: true + script: anaconda -t $ANACONDA_TOKEN upload --force -l alpha ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 + on: + repo: ${GITHUB_REPO_NAME} + tags: true + condition: "$TRAVIS_TAG == *a*" + + - provider: script + skip_cleanup: true + script: anaconda -t $ANACONDA_TOKEN upload --force -l beta ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 + on: + repo: ${GITHUB_REPO_NAME} + tags: true + condition: "$TRAVIS_TAG == *b*" + + - provider: script + skip_cleanup: true + script: anaconda -t $ANACONDA_TOKEN upload --force -l main ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 + on: + repo: ${GITHUB_REPO_NAME} + tags: true + condition: "$TRAVIS_TAG != *[ab]*" + + - provider: pypi + skip_cleanup: true + user: molmod + password: ${PYPI_PASSWD} + on: + repo: ${GITHUB_REPO_NAME} + tags: true + condition: "$TRAVIS_TAG != *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" + + - provider: pages + skip_cleanup: true + github_token: ${GITHUB_TOKEN} + project_name: ${PYPKG} + local_dir: doc/_build/html + on: + repo: ${GITHUB_REPO_NAME} + condition: "$TRAVIS_TAG != *[ab]* && $MYCONDAPY == 2.7 && $TRAVIS_OS_NAME == linux" + tags: true diff --git a/README.rst b/README.rst index d29446fc..71f87d42 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,9 @@ .. image:: https://travis-ci.org/molmod/yaff.svg?branch=master :target: https://travis-ci.org/molmod/yaff -.. image:: https://ci.appveyor.com/api/projects/status/gorylv5v5y6pu6w2/branch/master?svg=true - :target: https://ci.appveyor.com/project/tovrstra/yaff -.. image:: https://anaconda.org/tovrstra/yaff/badges/version.svg - :target: https://anaconda.org/tovrstra/yaff +.. image:: https://ci.appveyor.com/api/projects/status/bwgl6x2wslkv09so/branch/master?svg=true + :target: https://ci.appveyor.com/project/molmod-bot/yaff +.. image:: https://anaconda.org/molmod/yaff/badges/version.svg + :target: https://anaconda.org/molmod/yaff .. image:: https://codecov.io/gh/molmod/yaff/branch/master/graph/badge.svg :target: https://codecov.io/gh/molmod/yaff @@ -39,6 +39,12 @@ Alternatively, you can install Yaff in your home directory: pip install numpy Cython --user pip install yaff --user +Lastly, you can also install MolMod with conda. (See +https://www.continuum.io/downloads) + +.. code:: bash + + conda install -c molmod yaff Testing ======= diff --git a/doc/ug_install.rst b/doc/ug_install.rst index b74c32a7..cabdff23 100644 --- a/doc/ug_install.rst +++ b/doc/ug_install.rst @@ -98,7 +98,7 @@ Alternatively, you can also install yaff with conda. See https://www.continuum.i .. code:: bash - conda install -c tovrstra yaff + conda install -c molmod yaff Test your installation From 8528f7cfdd11cbd597781b41b86da367f2aa72f8 Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Tue, 29 Aug 2017 13:32:12 +0200 Subject: [PATCH 2/7] Rename licencse file back to COPYING --- LICENSE.txt => COPYING | 0 tools/conda.recipe/meta.yaml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename LICENSE.txt => COPYING (100%) diff --git a/LICENSE.txt b/COPYING similarity index 100% rename from LICENSE.txt rename to COPYING diff --git a/tools/conda.recipe/meta.yaml b/tools/conda.recipe/meta.yaml index c5cde764..2e0f665d 100644 --- a/tools/conda.recipe/meta.yaml +++ b/tools/conda.recipe/meta.yaml @@ -36,7 +36,7 @@ about: license_family: GPL3 summary: YAFF is yet another force-field code home: http://molmod.github.io/yaff - license_file: LICENSE.txt + license_file: COPYING doc_url: http://molmod.github.io/yaff extra: From 90b08b4722cab8e1d9498bf7d8e020cf4753241b Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Tue, 29 Aug 2017 13:32:48 +0200 Subject: [PATCH 3/7] yamllint config --- .yamllint | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .yamllint diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..a92a3b60 --- /dev/null +++ b/.yamllint @@ -0,0 +1,6 @@ +extends: default + +rules: + document-start: disable + line-length: + max: 100 From e5620eace8d86ce51ade35a8912a9a59f82d649e Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Tue, 29 Aug 2017 13:55:34 +0200 Subject: [PATCH 4/7] Cleanups --- .travis.yml | 37 ++++++++++++++++++++++++------------- .yamllint | 1 + 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 383064fb..981c258c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,17 @@ env: - MYCONDAPY=3.6 global: # ANACONDA_TOKEN encrypted - - secure: "Pgu8yuDay2kG1a+dnsgl3lBlGBDb6ifhMRzE1DqcRbCqplpCCgfxNL3Njt+sLtTWZ4jPPC4w0ZZrrqnOg62G4CeZCfp7cznJvN82mwYtW4ThlszIdXRfR+QfS35xKkvfWCvMYX3qBJ8xx3ih+g2GXx5roTE/qq7GfzPuOa43jsw=" + - secure: "Pgu8yuDay2kG1a+dnsgl3lBlGBDb6ifhMRzE1DqcRbCqplpCCgfxNL3Njt+sLtTWZ4jPPC4w0Z\ +ZrrqnOg62G4CeZCfp7cznJvN82mwYtW4ThlszIdXRfR+QfS35xKkvfWCvMYX3qBJ8xx3ih+g2GXx5roTE/qq7GfzP\ +uOa43jsw=" # GITHUB_TOKEN - - secure: "Pjb4QTTTd1L0ssl5YGrFP/bQwGYOMICZVJJAndlv1o9VmR4o81Mddv2IgxELmFA0K0lO0tFPOcw8O69Oa/qnXsRKGF+05fMUKzb+If8yGoupVaa/FAGfha6/WNw+jnDqHUfXCI+nXySIRSk9kRfl0gH9LW0clSUF8dMMKC95+wg=" + - secure: "Pjb4QTTTd1L0ssl5YGrFP/bQwGYOMICZVJJAndlv1o9VmR4o81Mddv2IgxELmFA0K0lO0tFPOc\ +w8O69Oa/qnXsRKGF+05fMUKzb+If8yGoupVaa/FAGfha6/WNw+jnDqHUfXCI+nXySIRSk9kRfl0gH9LW0clSUF8dM\ +MKC95+wg=" # PYPI_PASSWD - - secure: "fcr/ruryZctvHipyllH8rnGDpd8WH//zUo2dAzI0heqEqucx3BLZ9HbutPt0QmYirPNM/ywNfvRX93IhnyX5vGDsDfrcU7a69nsqHXapTEU04BcYH8MOPFvakf/s8k7biMeZCqZ4C3ycw8mkp3B9/L4C0pf/fnprvnyDNWwA2yE=" + - secure: "fcr/ruryZctvHipyllH8rnGDpd8WH//zUo2dAzI0heqEqucx3BLZ9HbutPt0QmYirPNM/ywNfv\ +RX93IhnyX5vGDsDfrcU7a69nsqHXapTEU04BcYH8MOPFvakf/s8k7biMeZCqZ4C3ycw8mkp3B9/L4C0pf/fnprvny\ +DNWwA2yE=" - PYPKG=yaff - GITHUB_REPO_NAME=molmod/yaff @@ -30,17 +36,18 @@ install: # Get miniconda. Take the right version, so re-installing python is only needed for 3.5. - if [[ "$MYCONDAPY" == "2.7" ]]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; + URL="https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh"; else - wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; + URL="https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh"; fi; else if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; + URL="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"; else - wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; + URL="https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"; fi; - fi + fi; + wget ${URL} -O miniconda.sh - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r @@ -83,10 +90,11 @@ script: - (cd doc; make html) # Run tests out of source tree, to make sure that installed version is tested. - - (cd; nosetests $PYPKG -v --detailed-errors --with-coverage --cover-package=$PYPKG --cover-tests --cover-erase --cover-inclusive --cover-branches --cover-xml) + - (cd; nosetests $PYPKG -v --detailed-errors --with-coverage --cover-package=$PYPKG + --cover-tests --cover-erase --cover-inclusive --cover-branches --cover-xml) ## Run the optimizer test DISABLED UNTIL TAMKIN IS PORTED TO PYTHON 3 - #- (cd; yaff-opttest) + # - (cd; yaff-opttest) after_success: # Upload the coverage analysis @@ -116,7 +124,8 @@ deploy: - provider: script skip_cleanup: true - script: anaconda -t $ANACONDA_TOKEN upload --force -l alpha ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 + script: anaconda -t ${ANACONDA_TOKEN} upload --force -l alpha + ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 on: repo: ${GITHUB_REPO_NAME} tags: true @@ -124,7 +133,8 @@ deploy: - provider: script skip_cleanup: true - script: anaconda -t $ANACONDA_TOKEN upload --force -l beta ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 + script: anaconda -t ${ANACONDA_TOKEN} upload --force -l beta + ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 on: repo: ${GITHUB_REPO_NAME} tags: true @@ -132,7 +142,8 @@ deploy: - provider: script skip_cleanup: true - script: anaconda -t $ANACONDA_TOKEN upload --force -l main ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 + script: anaconda -t ${ANACONDA_TOKEN} upload --force -l main + ${HOME}/miniconda/conda-bld/*/${PYPKG}-*.tar.bz2 on: repo: ${GITHUB_REPO_NAME} tags: true diff --git a/.yamllint b/.yamllint index a92a3b60..fe8f4d16 100644 --- a/.yamllint +++ b/.yamllint @@ -4,3 +4,4 @@ rules: document-start: disable line-length: max: 100 + truthy: disable From 612d71c050a085a8b63aa86a5f08bfe375477de4 Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Tue, 29 Aug 2017 15:02:58 +0200 Subject: [PATCH 5/7] Also take run_with_env from molmod --- tools/appveyor/run_with_env.cmd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/appveyor/run_with_env.cmd b/tools/appveyor/run_with_env.cmd index 1c24878f..26b8c793 100644 --- a/tools/appveyor/run_with_env.cmd +++ b/tools/appveyor/run_with_env.cmd @@ -32,18 +32,16 @@ IF %MAJOR_PYTHON_VERSION% == "2" ( EXIT 1 ) -IF "%PLATFORM%"=="x64" ( +IF "%PLATFORM%"=="X64" ( ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture SET DISTUTILS_USE_SDK=1 SET MSSdk=1 "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - CALL "C:\Program Files\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 ECHO Executing: %COMMAND_TO_RUN% call %COMMAND_TO_RUN% || EXIT 1 ) ELSE ( - ECHO Using MSVC 14.0 for 32 bit architecture - CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 + ECHO Using default MSVC build environment for 32 bit architecture ECHO Executing: %COMMAND_TO_RUN% call %COMMAND_TO_RUN% || EXIT 1 ) From fb4b0143b4de202163416892756bed4c2a407145 Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Tue, 29 Aug 2017 15:19:54 +0200 Subject: [PATCH 6/7] Fix typo in apt-get line. Thanks Sven. --- doc/ug_install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ug_install.rst b/doc/ug_install.rst index cabdff23..38125bef 100644 --- a/doc/ug_install.rst +++ b/doc/ug_install.rst @@ -62,7 +62,7 @@ command. .. code:: bash - sudo apt-get install gcc g++ python-devel python-numpy cython python-h5py python-matplotlib python-nose python-scipy + sudo apt-get install gcc g++ python-dev python-numpy cython python-h5py python-matplotlib python-nose python-scipy * **Fedora pre 22** From 9cf327b5661bb7bc95d2bb4a0e1b44ebd3ca0058 Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Tue, 29 Aug 2017 15:25:51 +0200 Subject: [PATCH 7/7] Not trying to use old visual compiler --- .appveyor.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index e1fc0181..746b48e8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,8 +10,11 @@ environment: GITHUB_REPO_NAME: molmod/yaff matrix: - - PYTHON_VERSION: 2.7 - CONDA: C:\Miniconda +# It is not possible to compile the Yaff extension on Windows for Python 2.7 because +# Python 2.7 on Windows is built with an old visual compiler, which does not even support +# C99! The C99 standard is extensively used in the Yaff extension. +# - PYTHON_VERSION: 2.7 +# CONDA: C:\Miniconda - PYTHON_VERSION: 3.6 CONDA: C:\Miniconda36