From 814f5e0c7016c0c85059f4b136f37f143b5c5990 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 11 Nov 2019 19:03:40 +0100 Subject: [PATCH 01/32] WIP/CI: Draft of GitHub action for web and docs --- .github/workflows/web_and_docs.yml | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/web_and_docs.yml diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml new file mode 100644 index 0000000000000..2f0e9836a3e2e --- /dev/null +++ b/.github/workflows/web_and_docs.yml @@ -0,0 +1,38 @@ +name: Web and docs + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup environment and build pandas + run: | + sudo apt-get install -y libc6-dev-i386 + ci/setup_env.sh + + - name: Build website + run: | + source activate pandas-dev + python web/pandas_web.py web/pandas --target-path=web/build + + - name: Build documentation + run: | + source activate pandas-dev + # Next we should simply have `doc/make.py --warnings-are-errors`, + # everything else is required because the ipython directive doesn't fail the build on errors + # (https://github.com/ipython/ipython/issues/11547) + doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} + grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) + exit $(( $SPHINX_RET + $IPY_RET )) + + - name: Merge website and docs + run: | + mkdir -p to_deploy/docs + cp -r web/build/* to_deploy/ + cp -r doc/build/html/* to_deploy/docs/ From 7ba98c694f6ffa0a3c3e5115da0f605d09c53296 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 11 Nov 2019 19:33:44 +0100 Subject: [PATCH 02/32] Removing failing apt install, and adding artifacts --- .github/workflows/web_and_docs.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 2f0e9836a3e2e..0b0c8e1075972 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -13,7 +13,7 @@ jobs: - name: Setup environment and build pandas run: | - sudo apt-get install -y libc6-dev-i386 + # sudo apt-get install -y libc6-dev-i386 ci/setup_env.sh - name: Build website @@ -33,6 +33,13 @@ jobs: - name: Merge website and docs run: | - mkdir -p to_deploy/docs - cp -r web/build/* to_deploy/ - cp -r doc/build/html/* to_deploy/docs/ + mkdir -p pandas_web/docs + cp -r web/build/* pandas_web/ + cp -r doc/build/html/* pandas_web/docs/ + + - name: Create artifact + run: | + tar -czvf pandas_web.tar.gz pandas_web + + - name: Upload artifact + uses: actions/upload-artifact@master From 60facf6d9536b774ec2742adf4404b3c61e5542a Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 11 Nov 2019 19:51:15 +0100 Subject: [PATCH 03/32] Setting environemnt variables --- .github/workflows/web_and_docs.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 0b0c8e1075972..77a634d03e716 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -6,8 +6,18 @@ jobs: build: runs-on: ubuntu-latest + env: + ENV_FILE: environment.yml + PATH: $(HOME)/miniconda3/bin:$(PATH) steps: + - name: Print env + run: | + echo "ENV_FILE" + echo $ENV_FILE + echo "PATH" + echo $PATH + - name: Checkout uses: actions/checkout@v1 From 601d13e81980258ed3eac4add68d03942ec06cb2 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 01:25:40 +0100 Subject: [PATCH 04/32] Trying to fix event trigger and env variables --- .github/workflows/web_and_docs.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 77a634d03e716..8e0089765c7f2 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -1,6 +1,10 @@ name: Web and docs -on: [push, pull_request] +on: + push: + branches: master + pull_request: + branches: master jobs: build: @@ -8,7 +12,7 @@ jobs: runs-on: ubuntu-latest env: ENV_FILE: environment.yml - PATH: $(HOME)/miniconda3/bin:$(PATH) + PATH: $HOME/miniconda3/bin:$PATH steps: - name: Print env From 7ccb36660ef0b7339e98cbda85c2c66101569291 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 01:29:12 +0100 Subject: [PATCH 05/32] Fixing PATH env variable manually --- .github/workflows/web_and_docs.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 8e0089765c7f2..24fe38184b1bc 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -12,31 +12,26 @@ jobs: runs-on: ubuntu-latest env: ENV_FILE: environment.yml - PATH: $HOME/miniconda3/bin:$PATH - - steps: - - name: Print env - run: | - echo "ENV_FILE" - echo $ENV_FILE - echo "PATH" - echo $PATH + # PATH: $HOME/miniconda3/bin:$PATH - name: Checkout uses: actions/checkout@v1 - name: Setup environment and build pandas run: | + export PATH=$HOME/miniconda3/bin:$PATH # sudo apt-get install -y libc6-dev-i386 ci/setup_env.sh - name: Build website run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev python web/pandas_web.py web/pandas --target-path=web/build - name: Build documentation run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev # Next we should simply have `doc/make.py --warnings-are-errors`, # everything else is required because the ipython directive doesn't fail the build on errors From 4dc4e4ed0d13bf21d527911050088e5f8b761a9e Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 01:31:16 +0100 Subject: [PATCH 06/32] Fixing typo (steps keyword previously removed by mistake) --- .github/workflows/web_and_docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 24fe38184b1bc..13c3da9219015 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -14,6 +14,7 @@ jobs: ENV_FILE: environment.yml # PATH: $HOME/miniconda3/bin:$PATH + steps: - name: Checkout uses: actions/checkout@v1 From ac1ea2b0e29b9b86750e2147edc8c9e0baec3116 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 02:54:01 +0100 Subject: [PATCH 07/32] Adding checks job, and testing env variables --- .github/workflows/web_and_docs.yml | 100 +++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 6 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 13c3da9219015..1dd866e6387f5 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -1,4 +1,4 @@ -name: Web and docs +name: pandas on: push: @@ -6,15 +6,103 @@ on: pull_request: branches: master -jobs: - build: +env: + ENV_FILE: environment.yml + # PATH: $HOME/miniconda3/bin:$PATH + TEST_ENV: path:${{ env['PATH'] }} +jobs: + checks: + name: Checks runs-on: ubuntu-latest - env: - ENV_FILE: environment.yml - # PATH: $HOME/miniconda3/bin:$PATH + steps: + + - name: Test env + run: echo $TEST_ENV + + - name: Checkout + uses: actions/checkout@v1 + + - name: Looking for unwanted patterns + run: ci/code_checks.sh patterns + if: true + + - name: Setup environment and build pandas + run: | + export PATH=$HOME/miniconda3/bin:$PATH + # sudo apt-get install -y libc6-dev-i386 + ci/setup_env.sh + if: true + + - name: Linting + run: | + source activate pandas-dev + ci/code_checks.sh lint + if: true + + - name: Dependencies consistency + run: | + source activate pandas-dev + ci/code_checks.sh dependencies + if: true + - name: Checks on imported code + run: | + source activate pandas-dev + ci/code_checks.sh code + if: true + + - name: Running doctests + run: | + source activate pandas-dev + ci/code_checks.sh doctests + if: true + + - name: Docstring validation + run: | + source activate pandas-dev + ci/code_checks.sh docstrings + if: true + + - name: Typing validation + run: | + source activate pandas-dev + ci/code_checks.sh docstrings + if: true + + - name: Testing docstring validation script + run: | + source activate pandas-dev + pytest --capture=no --strict scripts + if: true + + - name: Running benchmarks + run: | + source activate pandas-dev + cd asv_bench + asv check -E existing + git remote add upstream https://github.com/pandas-dev/pandas.git + git fetch upstream + if git diff upstream/master --name-only | grep -q "^asv_bench/"; then + asv machine --yes + ASV_OUTPUT="$(asv dev)" + if [[ $(echo "$ASV_OUTPUT" | grep "failed") ]]; then + echo "##vso[task.logissue type=error]Benchmarks run with errors" + echo "$ASV_OUTPUT" + exit 1 + else + echo "Benchmarks run without errors" + fi + else + echo "Benchmarks did not run, no changes detected" + fi + if: true + + web_and_docs: + name: Web and docs + runs-on: ubuntu-latest steps: + - name: Checkout uses: actions/checkout@v1 From 3e1ff9a6d7f1c8deb61eb3a483ac381e7cc1fbd7 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 02:59:51 +0100 Subject: [PATCH 08/32] Testing how env variables work --- .github/workflows/web_and_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 1dd866e6387f5..b82e393d50764 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -9,7 +9,7 @@ on: env: ENV_FILE: environment.yml # PATH: $HOME/miniconda3/bin:$PATH - TEST_ENV: path:${{ env['PATH'] }} + TEST_ENV: path:${{ PATH }} jobs: checks: From d2e3347cb04b911bbbbccbfb8cec724da4666701 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 03:02:09 +0100 Subject: [PATCH 09/32] Testing how env variables work --- .github/workflows/web_and_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index b82e393d50764..accc551896745 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -9,7 +9,7 @@ on: env: ENV_FILE: environment.yml # PATH: $HOME/miniconda3/bin:$PATH - TEST_ENV: path:${{ PATH }} + TEST_ENV: path:{{ env['PATH'] }} jobs: checks: From fcd7282401f91a8f0a93dd31a2ff2a23eb0d4906 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 03:22:05 +0100 Subject: [PATCH 10/32] More env tests, and adding path --- .github/workflows/web_and_docs.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index accc551896745..e66a3b91e792e 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -9,7 +9,7 @@ on: env: ENV_FILE: environment.yml # PATH: $HOME/miniconda3/bin:$PATH - TEST_ENV: path:{{ env['PATH'] }} + TEST_ENV: ${{ env }} jobs: checks: @@ -36,48 +36,56 @@ jobs: - name: Linting run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev ci/code_checks.sh lint if: true - name: Dependencies consistency run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev ci/code_checks.sh dependencies if: true - name: Checks on imported code run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev ci/code_checks.sh code if: true - name: Running doctests run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev ci/code_checks.sh doctests if: true - name: Docstring validation run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev ci/code_checks.sh docstrings if: true - name: Typing validation run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev ci/code_checks.sh docstrings if: true - name: Testing docstring validation script run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev pytest --capture=no --strict scripts if: true - name: Running benchmarks run: | + export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev cd asv_bench asv check -E existing From 6f7a8e2fff802f30015b74407e1fa5ddce2ac3ec Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 03:26:15 +0100 Subject: [PATCH 11/32] More env tests --- .github/workflows/web_and_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index e66a3b91e792e..9fd4dc8b31970 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -9,7 +9,7 @@ on: env: ENV_FILE: environment.yml # PATH: $HOME/miniconda3/bin:$PATH - TEST_ENV: ${{ env }} + TEST_ENV: ${{ GITHUB_ACTOR }} jobs: checks: From 253cdde96bc93b5861096b892d397aa13c7bd1dd Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 03:43:32 +0100 Subject: [PATCH 12/32] Removing env tests --- .github/workflows/web_and_docs.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 9fd4dc8b31970..7c7f9e2198ecb 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -9,7 +9,6 @@ on: env: ENV_FILE: environment.yml # PATH: $HOME/miniconda3/bin:$PATH - TEST_ENV: ${{ GITHUB_ACTOR }} jobs: checks: @@ -17,9 +16,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Test env - run: echo $TEST_ENV - - name: Checkout uses: actions/checkout@v1 From 5f5e0bd658632fcda2dc8dcac9fc140daa845318 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 04:34:39 +0100 Subject: [PATCH 13/32] Adding jobs to test output and requests post --- .github/workflows/web_and_docs.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 7c7f9e2198ecb..e9e5db58b6e06 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -11,6 +11,33 @@ env: # PATH: $HOME/miniconda3/bin:$PATH jobs: + display_error: + name: Show error + steps: + - name: Show errors + run: | + echo "Normal output" + echo "##vso[task.logissue type=error]This is the error, should be highlighted" + echo "More normal output" + exit 1 + + write_comment: + name: Comment + steps: + + - name: Install dependencies + run: pip install requests + + - name: Write the comment + shell: python + run: | + import os + url = 'https://api.github.com/repos/{repo}/issues/comments/{pr_id}' + url = url.format(repo=os.env['GITHUB_REPOSITORY'], pr_id=11) + data = {'body': 'Comment generated from GitHub actions'} + resp = requests.post(url, data=data) + resp.raise_for_status() + checks: name: Checks runs-on: ubuntu-latest From f84e1983d975cf2ef6a48f9c06edf77bc014f5a1 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 04:36:18 +0100 Subject: [PATCH 14/32] Adding missing runs-on properties --- .github/workflows/web_and_docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index e9e5db58b6e06..4b1f1924afac6 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -13,6 +13,7 @@ env: jobs: display_error: name: Show error + runs-on: ubuntu-latest steps: - name: Show errors run: | @@ -23,6 +24,7 @@ jobs: write_comment: name: Comment + runs-on: ubuntu-latest steps: - name: Install dependencies From 5788c14aca07f76eadbdb3873c6d9cf0f14a4c7a Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Tue, 12 Nov 2019 04:42:35 +0100 Subject: [PATCH 15/32] Fixing errors in showing output and requesting url --- .github/workflows/web_and_docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 4b1f1924afac6..be2983545e830 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -18,7 +18,7 @@ jobs: - name: Show errors run: | echo "Normal output" - echo "##vso[task.logissue type=error]This is the error, should be highlighted" + echo "##[error]This is the error, should be highlighted" echo "More normal output" exit 1 @@ -35,7 +35,7 @@ jobs: run: | import os url = 'https://api.github.com/repos/{repo}/issues/comments/{pr_id}' - url = url.format(repo=os.env['GITHUB_REPOSITORY'], pr_id=11) + url = url.format(repo=os.environ['GITHUB_REPOSITORY'], pr_id=11) data = {'body': 'Comment generated from GitHub actions'} resp = requests.post(url, data=data) resp.raise_for_status() From b704bde9a4a658442a09bc103ff3e4844634eefb Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Wed, 13 Nov 2019 23:25:23 +0100 Subject: [PATCH 16/32] Removing tests --- .github/workflows/web_and_docs.yml | 32 +----------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index be2983545e830..d86ee15cde2d2 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -8,38 +8,10 @@ on: env: ENV_FILE: environment.yml + # TODO: remove export PATH=... in each step once this works # PATH: $HOME/miniconda3/bin:$PATH jobs: - display_error: - name: Show error - runs-on: ubuntu-latest - steps: - - name: Show errors - run: | - echo "Normal output" - echo "##[error]This is the error, should be highlighted" - echo "More normal output" - exit 1 - - write_comment: - name: Comment - runs-on: ubuntu-latest - steps: - - - name: Install dependencies - run: pip install requests - - - name: Write the comment - shell: python - run: | - import os - url = 'https://api.github.com/repos/{repo}/issues/comments/{pr_id}' - url = url.format(repo=os.environ['GITHUB_REPOSITORY'], pr_id=11) - data = {'body': 'Comment generated from GitHub actions'} - resp = requests.post(url, data=data) - resp.raise_for_status() - checks: name: Checks runs-on: ubuntu-latest @@ -55,7 +27,6 @@ jobs: - name: Setup environment and build pandas run: | export PATH=$HOME/miniconda3/bin:$PATH - # sudo apt-get install -y libc6-dev-i386 ci/setup_env.sh if: true @@ -142,7 +113,6 @@ jobs: - name: Setup environment and build pandas run: | export PATH=$HOME/miniconda3/bin:$PATH - # sudo apt-get install -y libc6-dev-i386 ci/setup_env.sh - name: Build website From 8ab40749471df68765b4fbef3c35153cd2983b72 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 01:22:17 +0000 Subject: [PATCH 17/32] Adding debug info to see why detected version is 0.15 --- ci/setup_env.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 4d454f9c5041a..f23595dc1c2d1 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -132,6 +132,10 @@ python setup.py build_ext -q -i echo "[Updating pip]" python -m pip install --no-deps -U pip wheel setuptools +echo "[pandas version info]" +python -c "import pandas ; print(pandas.__version__)" +python -c "import pandas ; print(pandas._version.get_versions())" + echo "[Install pandas]" python -m pip install --no-build-isolation -e . From 2a76a858606199d75e297dee3558159aa550e76d Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 02:16:57 +0000 Subject: [PATCH 18/32] Adding lots of traces to identify where the version is coming from --- ci/setup_env.sh | 1 + pandas/_version.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index f23595dc1c2d1..8116da431023c 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -133,6 +133,7 @@ echo "[Updating pip]" python -m pip install --no-deps -U pip wheel setuptools echo "[pandas version info]" +git describe --tags --dirty --always --long python -c "import pandas ; print(pandas.__version__)" python -c "import pandas ; print(pandas._version.get_versions())" diff --git a/pandas/_version.py b/pandas/_version.py index 0cdedf3da3ea7..35ef3f7533a4c 100644 --- a/pandas/_version.py +++ b/pandas/_version.py @@ -177,6 +177,10 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): "full-revisionid": keywords["full"].strip(), "dirty": False, "error": None, + "why": "keywords1", + "r": r, + "ref": ref, + "tags": sorted(tags), } # no suitable tags, so version is "0+unknown", but full hex is still there if verbose: @@ -186,6 +190,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): "full-revisionid": keywords["full"].strip(), "dirty": False, "error": "no suitable tags", + "why": "keywords2", } @@ -408,11 +413,13 @@ def render(pieces, style): "full-revisionid": pieces.get("long"), "dirty": None, "error": pieces["error"], + "why": "render1", } if not style or style == "default": style = "pep440" # the default + print("style", style, pieces) if style == "pep440": rendered = render_pep440(pieces) elif style == "pep440-pre": @@ -448,6 +455,7 @@ def get_versions(): try: return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose) except NotThisMethod: + print('not this method') pass try: @@ -463,6 +471,7 @@ def get_versions(): "full-revisionid": None, "dirty": None, "error": "unable to find root of source tree", + "why": "NameError", } try: From 0703635d78eddcb4bb76d4f96e42a75976c75a5b Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 02:45:23 +0000 Subject: [PATCH 19/32] Reverting version traces --- pandas/_version.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pandas/_version.py b/pandas/_version.py index 35ef3f7533a4c..0cdedf3da3ea7 100644 --- a/pandas/_version.py +++ b/pandas/_version.py @@ -177,10 +177,6 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): "full-revisionid": keywords["full"].strip(), "dirty": False, "error": None, - "why": "keywords1", - "r": r, - "ref": ref, - "tags": sorted(tags), } # no suitable tags, so version is "0+unknown", but full hex is still there if verbose: @@ -190,7 +186,6 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): "full-revisionid": keywords["full"].strip(), "dirty": False, "error": "no suitable tags", - "why": "keywords2", } @@ -413,13 +408,11 @@ def render(pieces, style): "full-revisionid": pieces.get("long"), "dirty": None, "error": pieces["error"], - "why": "render1", } if not style or style == "default": style = "pep440" # the default - print("style", style, pieces) if style == "pep440": rendered = render_pep440(pieces) elif style == "pep440-pre": @@ -455,7 +448,6 @@ def get_versions(): try: return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose) except NotThisMethod: - print('not this method') pass try: @@ -471,7 +463,6 @@ def get_versions(): "full-revisionid": None, "dirty": None, "error": "unable to find root of source tree", - "why": "NameError", } try: From c06e6b66bfd132e236fc709274cedb97a252efe1 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 02:46:48 +0000 Subject: [PATCH 20/32] Showing more git info --- ci/setup_env.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 8116da431023c..0a1c7af2925e0 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -118,6 +118,14 @@ echo echo "conda list pandas" conda list pandas +echo "[git info]" +set -v +git log | head -n 50 +git tag +git describe --tags --dirty --always --long +set +v + + # Make sure any error below is reported as such echo "[Build extensions]" @@ -133,9 +141,10 @@ echo "[Updating pip]" python -m pip install --no-deps -U pip wheel setuptools echo "[pandas version info]" -git describe --tags --dirty --always --long +set -v python -c "import pandas ; print(pandas.__version__)" python -c "import pandas ; print(pandas._version.get_versions())" +set +v echo "[Install pandas]" python -m pip install --no-build-isolation -e . From 55664e8f75ed8b1f3e7073afce0bcde456b31eae Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 03:05:23 +0000 Subject: [PATCH 21/32] Trying to fetch tags after the checkout --- .github/workflows/web_and_docs.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index d86ee15cde2d2..389f05b2ee508 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -110,6 +110,15 @@ jobs: - name: Checkout uses: actions/checkout@v1 + # actions/checkout doesn't fetch all tags, and that breaks pandas.__version__ + - name: Fetch tags + run: | + set -v + git tag + git fetch --tags + git tag + set +v + - name: Setup environment and build pandas run: | export PATH=$HOME/miniconda3/bin:$PATH From 62b21ca47be63f76d87f5a9437a2b8cc727c19f0 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 03:13:20 +0000 Subject: [PATCH 22/32] Removing most of versions/tags info, should work now that tags have been pushed to the fork --- .github/workflows/web_and_docs.yml | 9 --------- ci/setup_env.sh | 11 +---------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 389f05b2ee508..d86ee15cde2d2 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -110,15 +110,6 @@ jobs: - name: Checkout uses: actions/checkout@v1 - # actions/checkout doesn't fetch all tags, and that breaks pandas.__version__ - - name: Fetch tags - run: | - set -v - git tag - git fetch --tags - git tag - set +v - - name: Setup environment and build pandas run: | export PATH=$HOME/miniconda3/bin:$PATH diff --git a/ci/setup_env.sh b/ci/setup_env.sh index 0a1c7af2925e0..defc23a8aa5e3 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -119,11 +119,8 @@ echo "conda list pandas" conda list pandas echo "[git info]" -set -v -git log | head -n 50 -git tag git describe --tags --dirty --always --long -set +v +git tag # Make sure any error below is reported as such @@ -140,12 +137,6 @@ python setup.py build_ext -q -i echo "[Updating pip]" python -m pip install --no-deps -U pip wheel setuptools -echo "[pandas version info]" -set -v -python -c "import pandas ; print(pandas.__version__)" -python -c "import pandas ; print(pandas._version.get_versions())" -set +v - echo "[Install pandas]" python -m pip install --no-build-isolation -e . From 4922b3acfad5c80eebe5d45588060e7b8481ff41 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 03:20:10 +0000 Subject: [PATCH 23/32] Removing all debug info --- ci/setup_env.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ci/setup_env.sh b/ci/setup_env.sh index defc23a8aa5e3..4d454f9c5041a 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -118,11 +118,6 @@ echo echo "conda list pandas" conda list pandas -echo "[git info]" -git describe --tags --dirty --always --long -git tag - - # Make sure any error below is reported as such echo "[Build extensions]" From 0348a246f6b2221f5dd0f5313c823103e143f40e Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Thu, 14 Nov 2019 21:46:00 +0000 Subject: [PATCH 24/32] Adding debug information on exit codes --- .github/workflows/web_and_docs.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index d86ee15cde2d2..e6165e4bea845 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -130,6 +130,11 @@ jobs: # (https://github.com/ipython/ipython/issues/11547) doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) + set -v + echo $SPHINX_RET + echo $IPY_RET + grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log + set +v exit $(( $SPHINX_RET + $IPY_RET )) - name: Merge website and docs From 4b723ed524675203a6e2c789f710c7e766c8526b Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Fri, 15 Nov 2019 00:06:58 +0000 Subject: [PATCH 25/32] Temporary removing failure on ipython code blocks --- .github/workflows/web_and_docs.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index e6165e4bea845..268659dcab01a 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -128,14 +128,7 @@ jobs: # Next we should simply have `doc/make.py --warnings-are-errors`, # everything else is required because the ipython directive doesn't fail the build on errors # (https://github.com/ipython/ipython/issues/11547) - doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} - grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) - set -v - echo $SPHINX_RET - echo $IPY_RET - grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log - set +v - exit $(( $SPHINX_RET + $IPY_RET )) + doc/make.py --warnings-are-errors - name: Merge website and docs run: | From 24ddef62fa32deb2bf48d59907cab56d86c3cfeb Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Fri, 15 Nov 2019 00:56:51 +0000 Subject: [PATCH 26/32] Adding missing params to upload artifact --- .github/workflows/web_and_docs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 268659dcab01a..a06bf08a7e087 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -120,6 +120,7 @@ jobs: export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev python web/pandas_web.py web/pandas --target-path=web/build + # TODO fail build if ipython code blocks fail - name: Build documentation run: | @@ -142,3 +143,6 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@master + with: + name: pandas_web + path: pandas_web.tar.gz From f4ad34b8ddd295190ec73d03c7bd31eb2f216a2a Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sat, 16 Nov 2019 20:53:55 +0000 Subject: [PATCH 27/32] Revert "Temporary removing failure on ipython code blocks" This reverts commit 4b723ed524675203a6e2c789f710c7e766c8526b. --- .github/workflows/web_and_docs.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index a06bf08a7e087..2379aaa5a2a66 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -129,7 +129,14 @@ jobs: # Next we should simply have `doc/make.py --warnings-are-errors`, # everything else is required because the ipython directive doesn't fail the build on errors # (https://github.com/ipython/ipython/issues/11547) - doc/make.py --warnings-are-errors + doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} + grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) + set -v + echo $SPHINX_RET + echo $IPY_RET + grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log + set +v + exit $(( $SPHINX_RET + $IPY_RET )) - name: Merge website and docs run: | From a6c92426fb4fa82c25969de381d4d75375737b89 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sat, 16 Nov 2019 20:59:24 +0000 Subject: [PATCH 28/32] displaying exit status of sphinx and ipython validation separately --- .github/workflows/web_and_docs.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_and_docs.yml index 2379aaa5a2a66..db567ce2a6fb6 100644 --- a/.github/workflows/web_and_docs.yml +++ b/.github/workflows/web_and_docs.yml @@ -1,4 +1,4 @@ -name: pandas +name: Web docs and checks on: push: @@ -120,7 +120,6 @@ jobs: export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev python web/pandas_web.py web/pandas --target-path=web/build - # TODO fail build if ipython code blocks fail - name: Build documentation run: | @@ -130,12 +129,9 @@ jobs: # everything else is required because the ipython directive doesn't fail the build on errors # (https://github.com/ipython/ipython/issues/11547) doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} + echo "Sphinx exit status: $SPHINX_RET" grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) - set -v - echo $SPHINX_RET - echo $IPY_RET - grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log - set +v + echo "Grep to detect IPython code block errors exit: $IPY_RET" exit $(( $SPHINX_RET + $IPY_RET )) - name: Merge website and docs From 0ae8d54ec460209aacb16559e76fc91e285386c7 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sat, 16 Nov 2019 21:00:08 +0000 Subject: [PATCH 29/32] Renaming action name for now --- .github/workflows/{web_and_docs.yml => web_docs_checks.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{web_and_docs.yml => web_docs_checks.yml} (100%) diff --git a/.github/workflows/web_and_docs.yml b/.github/workflows/web_docs_checks.yml similarity index 100% rename from .github/workflows/web_and_docs.yml rename to .github/workflows/web_docs_checks.yml From d0e9319f8a49cafeb5a87cce6dff452d508505d2 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sat, 16 Nov 2019 23:41:45 +0000 Subject: [PATCH 30/32] Renaming, and adding traces to find out the cause of the failure --- .github/workflows/{web_docs_checks.yml => ci.yml} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename .github/workflows/{web_docs_checks.yml => ci.yml} (99%) diff --git a/.github/workflows/web_docs_checks.yml b/.github/workflows/ci.yml similarity index 99% rename from .github/workflows/web_docs_checks.yml rename to .github/workflows/ci.yml index db567ce2a6fb6..7c52653194d20 100644 --- a/.github/workflows/web_docs_checks.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Web docs and checks +name: CI on: push: @@ -130,6 +130,7 @@ jobs: # (https://github.com/ipython/ipython/issues/11547) doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} echo "Sphinx exit status: $SPHINX_RET" + ls grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) echo "Grep to detect IPython code block errors exit: $IPY_RET" exit $(( $SPHINX_RET + $IPY_RET )) From a1cd094bd91c69edc34dd10b73c20ee7a73c04a9 Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sun, 17 Nov 2019 01:04:22 +0000 Subject: [PATCH 31/32] Removing docs build, adding to actions checks build for now --- .github/workflows/ci.yml | 49 ---------------------------------------- 1 file changed, 49 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c52653194d20..f35f11e0a2f70 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,52 +101,3 @@ jobs: echo "Benchmarks did not run, no changes detected" fi if: true - - web_and_docs: - name: Web and docs - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v1 - - - name: Setup environment and build pandas - run: | - export PATH=$HOME/miniconda3/bin:$PATH - ci/setup_env.sh - - - name: Build website - run: | - export PATH=$HOME/miniconda3/bin:$PATH - source activate pandas-dev - python web/pandas_web.py web/pandas --target-path=web/build - - - name: Build documentation - run: | - export PATH=$HOME/miniconda3/bin:$PATH - source activate pandas-dev - # Next we should simply have `doc/make.py --warnings-are-errors`, - # everything else is required because the ipython directive doesn't fail the build on errors - # (https://github.com/ipython/ipython/issues/11547) - doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]} - echo "Sphinx exit status: $SPHINX_RET" - ls - grep -B1 "^<<<-------------------------------------------------------------------------$" sphinx.log ; IPY_RET=$(( $? != 1 )) - echo "Grep to detect IPython code block errors exit: $IPY_RET" - exit $(( $SPHINX_RET + $IPY_RET )) - - - name: Merge website and docs - run: | - mkdir -p pandas_web/docs - cp -r web/build/* pandas_web/ - cp -r doc/build/html/* pandas_web/docs/ - - - name: Create artifact - run: | - tar -czvf pandas_web.tar.gz pandas_web - - - name: Upload artifact - uses: actions/upload-artifact@master - with: - name: pandas_web - path: pandas_web.tar.gz From 980e824ceff3e5bab45e492374619c6c4ac022ad Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Sun, 17 Nov 2019 02:17:03 +0000 Subject: [PATCH 32/32] Fixing typo in typing step, and removing activate action --- .github/workflows/activate.yml | 21 --------------------- .github/workflows/ci.yml | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 .github/workflows/activate.yml diff --git a/.github/workflows/activate.yml b/.github/workflows/activate.yml deleted file mode 100644 index f6aede6289ebf..0000000000000 --- a/.github/workflows/activate.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Simple first task to activate GitHub actions. -# This won't run until is merged, but future actions will -# run on PRs, so we can see we don't break things in more -# complex actions added later, like real builds. -# -# TODO: Remove this once another action exists -name: Activate - -on: - push: - branches: master - pull_request: - branches: master - -jobs: - activate: - name: Activate actions - runs-on: ubuntu-latest - steps: - - name: Activate - run: echo "GitHub actions ok" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f35f11e0a2f70..5aa31e0ed3ab0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: run: | export PATH=$HOME/miniconda3/bin:$PATH source activate pandas-dev - ci/code_checks.sh docstrings + ci/code_checks.sh typing if: true - name: Testing docstring validation script