From 94e88fc29861cad135f5378bd09fc335ca4add2c Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Wed, 28 Feb 2018 21:50:33 +0100 Subject: [PATCH 1/4] MAINT update to circleci 2 --- .circleci/config.yml | 37 ++++++++++++++++++++++++++++++ circle.yml | 54 -------------------------------------------- 2 files changed, 37 insertions(+), 54 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..ab6141d9e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,37 @@ +version: 2 + +jobs: + python3: + docker: + - image: circleci/python:3.6.1 + environment: + - USERNAME: "scikit-learn-contrib" + - DOC_REPO: "imbalanced-learn" + - DOC_URL: "" + - EMAIL: "g.lemaitre58@gmail.com" + - MINICONDA_PATH: $HOME/miniconda + - CONDA_ENV_NAME: testenv + - PYTHON_VERSION: 3 + steps: + - checkout + - run: ./build_tools/circle/checkout_merge_commit.sh + - run: ./build_tools/circle/build_doc.sh + - store_artifacts: + path: doc/_build/html/stable + destination: doc + - store_artifacts: + path: ~/log.txt + - deploy: + command: | + if [[ "${CIRCLE_BRANCH}" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]]; then + bash build_tools/circle/push_doc.sh doc/_build/html/stable + fi + filters: + branches: + ignore: gh-pages + +workflows: + version: 2 + build-doc-and-deploy: + jobs: + - python3 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 7e10634b3..000000000 --- a/circle.yml +++ /dev/null @@ -1,54 +0,0 @@ -checkout: - post: - - ./build_tools/circle/checkout_merge_commit.sh - -machine: - environment: - # The github organization or username of the repository which hosts the - # project and documentation. - USERNAME: "scikit-learn-contrib" - - # The repository where the documentation will be hosted - DOC_REPO: "imbalanced-learn" - - # The base URL for the Github page where the documentation will be hosted - DOC_URL: "" - - # The email is to be used for commits in the Github Page - EMAIL: "g.lemaitre58@gmail.com" - - MINICONDA_PATH: $HOME/miniconda - CONDA_ENV_NAME: testenv - -dependencies: - # Check whether the doc build is required, install build dependencies and - # run sphinx to build the doc. - override: - - ./build_tools/circle/build_doc.sh: - timeout: 3600 # seconds - -test: - # Grep error on the documentation - override: - - cat ~/log.txt && if grep -q "Traceback (most recent call last):" ~/log.txt; then false; else true; fi - -deployment: - push: - branch: /^master$|^[0-9]+\.[0-9]+\.X$/ - commands: - - bash build_tools/circle/push_doc.sh -general: - # Open the doc to the API - artifacts: - - "doc/_build/html" - - "~/log.txt" - - # Restric the build to the branch master only - branches: - ignore: - - gh-pages -notify: - webhooks: - # A list of hook hashes, containing the url field - # gitter hook - - url: https://webhooks.gitter.im/e/c8d33a274b2b8f44819f From 310b0627564d43fef37b3c49bbccc0137f85f3e3 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Wed, 28 Feb 2018 21:52:44 +0100 Subject: [PATCH 2/4] fix path --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab6141d9e..f989a86b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,8 +14,8 @@ jobs: - PYTHON_VERSION: 3 steps: - checkout - - run: ./build_tools/circle/checkout_merge_commit.sh - - run: ./build_tools/circle/build_doc.sh + - run: ../build_tools/circle/checkout_merge_commit.sh + - run: ../build_tools/circle/build_doc.sh - store_artifacts: path: doc/_build/html/stable destination: doc @@ -24,7 +24,7 @@ jobs: - deploy: command: | if [[ "${CIRCLE_BRANCH}" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]]; then - bash build_tools/circle/push_doc.sh doc/_build/html/stable + bash ../build_tools/circle/push_doc.sh fi filters: branches: From 428bfdd3fb6c321ef907912ab8645c90bd297239 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Wed, 28 Feb 2018 21:57:47 +0100 Subject: [PATCH 3/4] MAINT udpate path --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f989a86b0..9c8fa1a79 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,13 +9,13 @@ jobs: - DOC_REPO: "imbalanced-learn" - DOC_URL: "" - EMAIL: "g.lemaitre58@gmail.com" - - MINICONDA_PATH: $HOME/miniconda + - MINICONDA_PATH: ~/miniconda - CONDA_ENV_NAME: testenv - PYTHON_VERSION: 3 steps: - checkout - - run: ../build_tools/circle/checkout_merge_commit.sh - - run: ../build_tools/circle/build_doc.sh + - run: ./build_tools/circle/checkout_merge_commit.sh + - run: ./build_tools/circle/build_doc.sh - store_artifacts: path: doc/_build/html/stable destination: doc @@ -24,7 +24,7 @@ jobs: - deploy: command: | if [[ "${CIRCLE_BRANCH}" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]]; then - bash ../build_tools/circle/push_doc.sh + bash ./build_tools/circle/push_doc.sh fi filters: branches: From 8f8660f6f37926db3f0476354edcc08a056ca0df Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Wed, 28 Feb 2018 22:04:13 +0100 Subject: [PATCH 4/4] avoid to move --- build_tools/circle/build_doc.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index e12ba245f..e49088ae6 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -96,9 +96,8 @@ conda install --yes pip numpy scipy scikit-learn pillow matplotlib sphinx \ pip install -U git+https://github.com/sphinx-gallery/sphinx-gallery.git # Build and install imbalanced-learn in dev mode -cd "$HOME/$CIRCLE_PROJECT_REPONAME" ls -l -python setup.py develop +pip install -e . # The pipefail is requested to propagate exit code set -o pipefail && cd doc && make $MAKE_TARGET 2>&1 | tee ~/log.txt