<commit_before>name: basemap

env:
  PKGDIR: "packages/basemap"

on:
  push:
  workflow_dispatch:

jobs:

  build-geos:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
      max-parallel: 2
      fail-fast: false
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:3.6-debian-4"
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Install CMake 3.6.2
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y libidn11
          pkgvers=3.6.2
          pkgname=cmake
          pkgcode=cmake-${pkgvers}
          case "${{ matrix.arch }}" in
              x86)  pkgfile=${pkgcode}-Linux-i386.tar.gz;;
              *)    pkgfile=${pkgcode}-Linux-x86_64.tar.gz;;
          esac
          wget https://github.com/Kitware/CMake/releases/download/v${pkgvers}/${pkgfile} -P /tmp
          tar -xf /tmp/${pkgfile} --strip-components=1 -C /usr
          rm -rf /tmp/${pkgfile}
          cmake --version
      -
        name: Install GCC toolchain
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y gcc g++ make
          gcc --version
          g++ --version
      -
        name: Build GEOS from source
        run: |
          set -e
          . /etc/profile
          cd ${{ env.PKGDIR }}
          export MAKEFLAGS="-j 16"
          python -c "import utils; utils.GeosLibrary('3.6.5').build('extern')"
      -
        name: Upload GEOS artifacts
        uses: actions/upload-artifact@v1
        with:
          name: artifacts-geos-${{ matrix.arch }}
          path: ${{ env.PKGDIR }}/extern

  build:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
        python-version:
          [
            "2.7",
            "3.5",
            "3.6",
            "3.7",
            "3.8",
            "3.9",
          ]
      max-parallel: 6
      fail-fast: false
    needs: build-geos
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-4"
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Download GEOS artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-geos-${{ matrix.arch }}
          path: ${{ env.PKGDIR }}/extern
      -
        name: Install GCC toolchain
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y gcc g++ make
          gcc --version
          g++ --version
      -
        name: Print environment
        run: |
          set -e
          . /etc/profile
          python -V
      -
        name: Generate NumPy headers
        run: |
          set -e
          . /etc/profile
          case "${{ matrix.python-version }}" in
              2.[67]|3.[01234])  pkgvers=1.11.3;;
              *)                 pkgvers=1.16.6;;
          esac
          pkgname=numpy
          pkgcode=numpy-${pkgvers}
          python -m pip download --no-binary=:all: "numpy == ${pkgvers}"
          tar -xf ${pkgcode}.tar.gz
          rm -f ${pkgcode}.tar.gz
          cd ${pkgcode}
          python setup.py build -j 2
          cp build/src*/numpy/core/include/numpy/*.h numpy/core/include/numpy/
          cd ..
          cp -R ${pkgcode}/numpy/core/include ${{ env.PKGDIR }}/extern
          rm -rf ${pkgcode}
      -
        name: Build wheel
        run: |
          set -e
          . /etc/profile
          cd ${{ env.PKGDIR }}
          export GEOS_DIR=extern
          export NUMPY_INCLUDE_PATH=extern/include
          pip install -r requirements-setup.txt
          python setup.py sdist bdist_wheel
      -
        name: Upload build artifacts
        uses: actions/upload-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist

  repair:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
        python-version:
          [
            "2.7",
            "3.5",
            "3.6",
            "3.7",
            "3.8",
            "3.9",
          ]
      max-parallel: 6
      fail-fast: false
    needs: build
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:3.6-debian-5"
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Download GEOS artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-geos-${{ matrix.arch }}
          path: ${{ env.PKGDIR }}/extern
      -
        name: Download build artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist
      -
        name: Install GCC toolchain
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y gcc g++ make
          gcc --version
          g++ --version
      -
        name: Install unzip
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y unzip
          gcc --version
          g++ --version
      -
        name: Install patchelf from source
        run: |
          set -e
          . /etc/profile
          pkgvers=0.9
          pkgname=patchelf
          pkgcode=${pkgname}-${pkgvers}
          cd /tmp
          wget https://releases.nixos.org/${pkgname}/${pkgcode}/${pkgcode}.tar.gz
          tar -xf ${pkgcode}.tar.gz
          rm -f ${pkgcode}.tar.gz
          cd ${pkgcode}
          ./configure
          make
          make check
          make install
          cd ..
          rm -rf ${pkgcode}
      -
        name: Print environment
        run: |
          set -e
          . /etc/profile
          python -V
      -
        name: Install auditwheel
        run: |
          set -e
          . /etc/profile
          pip install "auditwheel < 4.0"
      -
        name: Repair wheel
        run: |
          set -e
          . /etc/profile
          cd ${{ env.PKGDIR }}
          export LD_LIBRARY_PATH="$(readlink -f extern/lib)"
          auditwheel repair -w dist dist/*.whl
      -
        name: Upload build artifacts
        uses: actions/upload-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist

  upload:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
        python-version:
          [
            "2.7",
            "3.5",
            "3.6",
            "3.7",
            "3.8",
            "3.9",
          ]
      max-parallel: 1
    if: startsWith(github.event.ref, 'refs/tags/v')
    needs: repair
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-5"
    environment: PyPI
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Download build artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist
      -
        name: Print environment
        run: |
          set -e
          . /etc/profile
          python -V
      -
        name: Install requirements
        run: |
          set -e
          . /etc/profile
          pip install --prefer-binary twine
      -
        name: Upload distributables
        env:
          TWINE_USERNAME: __token__
          TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}"
          TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}"
        run: |
          set -e
          . /etc/profile
          python -m twine check                                               \
              ${{ env.PKGDIR }}/dist/*.tar.gz                                 \
              ${{ env.PKGDIR }}/dist/*-manylinux1*.whl
          python -m twine upload --skip-existing                              \
              ${{ env.PKGDIR }}/dist/*.tar.gz                                 \
              ${{ env.PKGDIR }}/dist/*-manylinux1*.whl
<commit_msg>Remove parallel build for numpy headers<commit_after>name: basemap

env:
  PKGDIR: "packages/basemap"

on:
  push:
  workflow_dispatch:

jobs:

  build-geos:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
      max-parallel: 2
      fail-fast: false
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:3.6-debian-4"
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Install CMake 3.6.2
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y libidn11
          pkgvers=3.6.2
          pkgname=cmake
          pkgcode=cmake-${pkgvers}
          case "${{ matrix.arch }}" in
              x86)  pkgfile=${pkgcode}-Linux-i386.tar.gz;;
              *)    pkgfile=${pkgcode}-Linux-x86_64.tar.gz;;
          esac
          wget https://github.com/Kitware/CMake/releases/download/v${pkgvers}/${pkgfile} -P /tmp
          tar -xf /tmp/${pkgfile} --strip-components=1 -C /usr
          rm -rf /tmp/${pkgfile}
          cmake --version
      -
        name: Install GCC toolchain
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y gcc g++ make
          gcc --version
          g++ --version
      -
        name: Build GEOS from source
        run: |
          set -e
          . /etc/profile
          cd ${{ env.PKGDIR }}
          export MAKEFLAGS="-j 16"
          python -c "import utils; utils.GeosLibrary('3.6.5').build('extern')"
      -
        name: Upload GEOS artifacts
        uses: actions/upload-artifact@v1
        with:
          name: artifacts-geos-${{ matrix.arch }}
          path: ${{ env.PKGDIR }}/extern

  build:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
        python-version:
          [
            "2.7",
            "3.5",
            "3.6",
            "3.7",
            "3.8",
            "3.9",
          ]
      max-parallel: 6
      fail-fast: false
    needs: build-geos
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-4"
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Download GEOS artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-geos-${{ matrix.arch }}
          path: ${{ env.PKGDIR }}/extern
      -
        name: Install GCC toolchain
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y gcc g++ make
          gcc --version
          g++ --version
      -
        name: Print environment
        run: |
          set -e
          . /etc/profile
          python -V
      -
        name: Generate NumPy headers
        run: |
          set -e
          . /etc/profile
          case "${{ matrix.python-version }}" in
              2.[67]|3.[01234])  pkgvers=1.11.3;;
              *)                 pkgvers=1.16.6;;
          esac
          pkgname=numpy
          pkgcode=numpy-${pkgvers}
          python -m pip download --no-binary=:all: "numpy == ${pkgvers}"
          tar -xf ${pkgcode}.tar.gz
          rm -f ${pkgcode}.tar.gz
          cd ${pkgcode}
          python setup.py build
          cp build/src*/numpy/core/include/numpy/*.h numpy/core/include/numpy/
          cd ..
          cp -R ${pkgcode}/numpy/core/include ${{ env.PKGDIR }}/extern
          rm -rf ${pkgcode}
      -
        name: Build wheel
        run: |
          set -e
          . /etc/profile
          cd ${{ env.PKGDIR }}
          export GEOS_DIR=extern
          export NUMPY_INCLUDE_PATH=extern/include
          pip install -r requirements-setup.txt
          python setup.py sdist bdist_wheel
      -
        name: Upload build artifacts
        uses: actions/upload-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist

  repair:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
        python-version:
          [
            "2.7",
            "3.5",
            "3.6",
            "3.7",
            "3.8",
            "3.9",
          ]
      max-parallel: 6
      fail-fast: false
    needs: build
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:3.6-debian-5"
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Download GEOS artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-geos-${{ matrix.arch }}
          path: ${{ env.PKGDIR }}/extern
      -
        name: Download build artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist
      -
        name: Install GCC toolchain
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y gcc g++ make
          gcc --version
          g++ --version
      -
        name: Install unzip
        run: |
          set -e
          . /etc/profile
          apt-get update
          apt-get install -y unzip
          gcc --version
          g++ --version
      -
        name: Install patchelf from source
        run: |
          set -e
          . /etc/profile
          pkgvers=0.9
          pkgname=patchelf
          pkgcode=${pkgname}-${pkgvers}
          cd /tmp
          wget https://releases.nixos.org/${pkgname}/${pkgcode}/${pkgcode}.tar.gz
          tar -xf ${pkgcode}.tar.gz
          rm -f ${pkgcode}.tar.gz
          cd ${pkgcode}
          ./configure
          make
          make check
          make install
          cd ..
          rm -rf ${pkgcode}
      -
        name: Print environment
        run: |
          set -e
          . /etc/profile
          python -V
      -
        name: Install auditwheel
        run: |
          set -e
          . /etc/profile
          pip install "auditwheel < 4.0"
      -
        name: Repair wheel
        run: |
          set -e
          . /etc/profile
          cd ${{ env.PKGDIR }}
          export LD_LIBRARY_PATH="$(readlink -f extern/lib)"
          auditwheel repair -w dist dist/*.whl
      -
        name: Upload build artifacts
        uses: actions/upload-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist

  upload:
    strategy:
      matrix:
        arch:
          [
            "x64",
            "x86",
          ]
        python-version:
          [
            "2.7",
            "3.5",
            "3.6",
            "3.7",
            "3.8",
            "3.9",
          ]
      max-parallel: 1
    if: startsWith(github.event.ref, 'refs/tags/v')
    needs: repair
    runs-on: ubuntu-latest
    container: "pylegacy/${{ matrix.arch }}-python:${{ matrix.python-version }}-debian-5"
    environment: PyPI
    steps:
      -
        name: Checkout
        uses: actions/checkout@v1
      -
        name: Download build artifacts
        uses: actions/download-artifact@v1
        with:
          name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
          path: ${{ env.PKGDIR }}/dist
      -
        name: Print environment
        run: |
          set -e
          . /etc/profile
          python -V
      -
        name: Install requirements
        run: |
          set -e
          . /etc/profile
          pip install --prefer-binary twine
      -
        name: Upload distributables
        env:
          TWINE_USERNAME: __token__
          TWINE_PASSWORD: <PASSWORD> }}"
          TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}"
        run: |
          set -e
          . /etc/profile
          python -m twine check                                               \
              ${{ env.PKGDIR }}/dist/*.tar.gz                                 \
              ${{ env.PKGDIR }}/dist/*-manylinux1*.whl
          python -m twine upload --skip-existing                              \
              ${{ env.PKGDIR }}/dist/*.tar.gz                                 \
              ${{ env.PKGDIR }}/dist/*-manylinux1*.whl

{'fraction_non_alphanumeric': 0.12277771149027562, 'fraction_numerical': 0.014497076721154993, 'mean_word_length': 1.1416890251692857, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4712353', 'n_tokens_mistral': 5260, 'n_tokens_neox': 5001, 'n_words': 1121}