From 1e21a80e010b5a73a22b0a3ee7637e53eeb3c71f Mon Sep 17 00:00:00 2001 From: Leonardo Uieda Date: Thu, 17 Oct 2019 14:11:55 +0100 Subject: [PATCH] Update CI scripts and fix linting errors Pylint 2.4.2 generates some new error reports, mostly due to imports not being at the top. Update CI scripts to 1.2.0 to fix failing TravisCI builds. Take control of the conda path on Mac Azure builds to avoid conda errors. --- .azure-pipelines.yml | 12 +++++++++--- .travis.yml | 2 +- rockhound/__init__.py | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 64c97b46..a8b844b3 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -34,7 +34,7 @@ jobs: displayName: Add conda to PATH # Get the Fatiando CI scripts - - bash: git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git + - bash: git clone --branch=1.2.0 --depth=1 https://github.com/fatiando/continuous-integration.git displayName: Fetch the Fatiando CI scripts # Setup dependencies and build a conda environment @@ -92,8 +92,14 @@ jobs: - bash: echo "##vso[task.prependpath]$CONDA/bin" displayName: Add conda to PATH + # On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation + # directory We need to take ownership if we want to update conda or install packages + # globally + - bash: sudo chown -R $USER $CONDA + displayName: Take ownership of conda installation + # Get the Fatiando CI scripts - - bash: git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git + - bash: git clone --branch=1.2.0 --depth=1 https://github.com/fatiando/continuous-integration.git displayName: Fetch the Fatiando CI scripts # Setup dependencies and build a conda environment @@ -177,7 +183,7 @@ jobs: displayName: Add conda to PATH # Get the Fatiando CI scripts - - script: git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git + - script: git clone --branch=1.2.0 --depth=1 https://github.com/fatiando/continuous-integration.git displayName: Fetch the Fatiando CI scripts # Setup dependencies and build a conda environment diff --git a/.travis.yml b/.travis.yml index 3ed54514..43b6fd93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,7 +54,7 @@ matrix: before_install: # Copy sample data to the verde data dir to avoid downloading all the time # Get the Fatiando CI scripts - - git clone --branch=1.1.1 --depth=1 https://github.com/fatiando/continuous-integration.git + - git clone --branch=1.2.0 --depth=1 https://github.com/fatiando/continuous-integration.git # Download and install miniconda and setup dependencies # Need to source the script to set the PATH variable globaly - source continuous-integration/travis/setup-miniconda.sh diff --git a/rockhound/__init__.py b/rockhound/__init__.py index 27ce0391..bf782df2 100644 --- a/rockhound/__init__.py +++ b/rockhound/__init__.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-docstring +# pylint: disable=missing-docstring,import-outside-toplevel # Import functions/classes to make the public API from . import version from .registry import data_location