<commit_before># Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
  build:
    docker:
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      - image: circleci/python:3.6.6

    working_directory: ~/repo

    steps:
      - checkout

      - run:
          name: install dependencies
          command: |
            python3 -m venv venv
            ln -s $(which python3) venv/bin/python3.6
            . venv/bin/activate
            pip install cython sphinx==2.3.1 matplotlib ipython
            sudo apt-get update
            sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra texlive-generic-extra latexmk texlive-xetex

      - run:
          name: build numpy
          command: |
            . venv/bin/activate
            pip install --upgrade pip 'setuptools<49.2.0'
            pip install cython
            pip install .
            pip install scipy
            pip install pandas

      - run:
          name: create release notes
          command: |
            . venv/bin/activate
            pip install git+https://github.com/hawkowl/towncrier.git@master
            VERSION=$(python -c "import setup; print(setup.VERSION)")
            towncrier --version $VERSION --yes
            ./tools/ci/test_all_newsfragments_used.py

      - run:
          name: run doctests on documentation
          command: |
            . venv/bin/activate
            (cd doc ; git submodule update --init)
            python tools/refguide_check.py --rst

      - run:
          name: build devdocs
          command: |
            . venv/bin/activate
            cd doc
            SPHINXOPTS=-q make -e html

      - run:
          name: build neps
          command: |
            . venv/bin/activate
            cd doc/neps
            SPHINXOPTS=-q make -e html

      - store_artifacts:
          path: doc/build/html/


     #  - store_artifacts:
     #      path: doc/neps/_build/html/
     #      destination: neps

      - add_ssh_keys:
          fingerprints:
            - "9f:8c:e5:3f:53:40:0b:ee:c9:c3:0f:fd:0f:3c:cc:55"

      -  run:
          name: deploy devdocs
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              touch doc/build/html/.nojekyll

              ./tools/ci/push_docs_to_repo.py doc/build/html \
                  <EMAIL>:numpy/devdocs.git \
                  --committer "numpy-circleci-bot" \
                  --email "numpy-circleci-bot@nomail" \
                  --message "Docs build of $CIRCLE_SHA1" \
                  --force
            else
              echo "Not on the master branch; skipping deployment"
            fi

      - add_ssh_keys:
          fingerprints:
            - "11:fb:19:69:80:3a:6d:37:9c:d1:ac:20:17:cd:c8:17"

      - run:
          name: select SSH key for neps repo
          command: |
            cat <<\EOF > ~/.ssh/config
            Host github.com
              IdentitiesOnly yes
              IdentityFile /home/circleci/.ssh/id_rsa_11fb1969803a6d379cd1ac2017cdc817
            EOF

      -  run:
          name: deploy neps
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              touch doc/neps/_build/html/.nojekyll

              ./tools/ci/push_docs_to_repo.py doc/neps/_build/html \
                  <EMAIL>:numpy/neps.git \
                  --committer "numpy-circleci-bot" \
                  --email "numpy-circleci-bot@nomail" \
                  --message "Docs build of $CIRCLE_SHA1" \
                  --force
            else
              echo "Not on the master branch; skipping deployment"
            fi
<commit_msg>rework build to invoke doc_requirements.txt<commit_after># Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
  build:
    docker:
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      - image: circleci/python:3.6.6

    working_directory: ~/repo

    steps:
      - checkout

      - run:
          name: create virtual environment, install dependencies
          command: |
            python3 -m venv venv
            ln -s $(which python3) venv/bin/python3.6
            . venv/bin/activate
            sudo apt-get update
            sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra texlive-generic-extra latexmk texlive-xetex

      - run:
          name: build numpy
          command: |
            . venv/bin/activate
            pip install --upgrade pip 'setuptools<49.2.0'
            pip install -r test_requirements.txt
            pip install .
            pip install -r doc_requirements.txt

      - run:
          name: create release notes
          command: |
            . venv/bin/activate
            pip install git+https://github.com/hawkowl/towncrier.git@master
            VERSION=$(python -c "import setup; print(setup.VERSION)")
            towncrier --version $VERSION --yes
            ./tools/ci/test_all_newsfragments_used.py

      - run:
          name: run doctests on documentation
          command: |
            . venv/bin/activate
            (cd doc ; git submodule update --init)
            python tools/refguide_check.py --rst

      - run:
          name: build devdocs
          command: |
            . venv/bin/activate
            cd doc
            SPHINXOPTS=-q make -e html

      - run:
          name: build neps
          command: |
            . venv/bin/activate
            cd doc/neps
            SPHINXOPTS=-q make -e html

      - store_artifacts:
          path: doc/build/html/


     #  - store_artifacts:
     #      path: doc/neps/_build/html/
     #      destination: neps

      - add_ssh_keys:
          fingerprints:
            - "9f:8c:e5:3f:53:40:0b:ee:c9:c3:0f:fd:0f:3c:cc:55"

      -  run:
          name: deploy devdocs
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              touch doc/build/html/.nojekyll

              ./tools/ci/push_docs_to_repo.py doc/build/html \
                  <EMAIL>:numpy/devdocs.git \
                  --committer "numpy-circleci-bot" \
                  --email "numpy-circleci-bot@nomail" \
                  --message "Docs build of $CIRCLE_SHA1" \
                  --force
            else
              echo "Not on the master branch; skipping deployment"
            fi

      - add_ssh_keys:
          fingerprints:
            - "11:fb:19:69:80:3a:6d:37:9c:d1:ac:20:17:cd:c8:17"

      - run:
          name: select SSH key for neps repo
          command: |
            cat <<\EOF > ~/.ssh/config
            Host github.com
              IdentitiesOnly yes
              IdentityFile /home/circleci/.ssh/id_rsa_11fb1969803a6d379cd1ac2017cdc817
            EOF

      -  run:
          name: deploy neps
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              touch doc/neps/_build/html/.nojekyll

              ./tools/ci/push_docs_to_repo.py doc/neps/_build/html \
                  <EMAIL>:numpy/neps.git \
                  --committer "numpy-circleci-bot" \
                  --email "numpy-circleci-bot@nomail" \
                  --message "Docs build of $CIRCLE_SHA1" \
                  --force
            else
              echo "Not on the master branch; skipping deployment"
            fi

{'fraction_non_alphanumeric': 0.09843811523822024, 'fraction_numerical': 0.020868880430502692, 'mean_word_length': 1.39321608040201, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1959234', 'n_tokens_mistral': 2429, 'n_tokens_neox': 2264, 'n_words': 502}