diff --git a/.github/workflows/actions/entrypoint.sh b/.github/workflows/actions/entrypoint.sh index c89edc5..c819409 100755 --- a/.github/workflows/actions/entrypoint.sh +++ b/.github/workflows/actions/entrypoint.sh @@ -6,7 +6,7 @@ PYTHONS=("cp38-cp38" "cp39-cp39" "cp310-cp310") for PYTHON in ${PYTHONS[@]}; do - /opt/python/${PYTHON}/bin/pip install --upgrade pip wheel setuptools setuptools_scm pep517 twine auditwheel + /opt/python/${PYTHON}/bin/pip install --upgrade pip wheel setuptools setuptools_scm build twine auditwheel /opt/python/${PYTHON}/bin/pip install oldest-supported-numpy /opt/python/${PYTHON}/bin/python -m build --sdist --wheel . --outdir /github/workspace/wheelhouse/ done diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml index c25f09e..c1a4159 100644 --- a/.github/workflows/build_mac.yml +++ b/.github/workflows/build_mac.yml @@ -28,12 +28,12 @@ jobs: - name: Install build tools run: | - python -m pip install --upgrade pip wheel setuptools setuptools_scm pep517 twine + python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine python -m pip install oldest-supported-numpy shell: bash - name: Build binary wheel - run: python -m pep517.build --binary . --out-dir dist + run: python -m build --wheel . --outdir dist - name: CheckFiles run: | diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml index 73c5f30..716af1f 100644 --- a/.github/workflows/build_win.yml +++ b/.github/workflows/build_win.yml @@ -28,12 +28,12 @@ jobs: - name: Install build tools run: | - python -m pip install --upgrade pip wheel setuptools setuptools_scm pep517 twine + python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine python -m pip install oldest-supported-numpy shell: bash - name: Build binary wheel - run: python -m pep517.build --binary . --out-dir dist + run: python -m build --wheel . --outdir dist - name: CheckFiles run: | diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..3a3debb --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,43 @@ +name: Build and Deploy docs + +on: + pull_request: + push: + branches: [master] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Conda + uses: s-weigand/setup-conda@v1 + with: + activate-conda: false + conda-channels: conda-forge + + - name: Create environment + shell: bash -l {0} + run: | + conda create --name TEST python=3 python-build numpy --file requirements-dev.txt + source activate TEST + pip install -e . --no-deps --force-reinstall + conda info --all + conda list + + - name: Build documentation + shell: bash -l {0} + run: | + source activate TEST + set -e + pushd docs + make clean html linkcheck + popd + + - name: GitHub Pages action + if: github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3.6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_build/html diff --git a/.github/workflows/tarball-tests.yml b/.github/workflows/tarball-tests.yml index 9d77c5b..d6f84d8 100644 --- a/.github/workflows/tarball-tests.yml +++ b/.github/workflows/tarball-tests.yml @@ -20,7 +20,7 @@ jobs: - name: Create environment shell: bash -l {0} run: | - conda create --name TEST python=3 python-build cython numpy --file requirements-dev.txt + conda create --name TEST python=3 python-build numpy --file requirements-dev.txt source activate TEST conda info --all conda list diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b552adb..a00aa89 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,7 @@ jobs: - name: Python ${{ matrix.python-version }} numpy ${{ matrix.numpy-version }} shell: bash -l {0} run: | - conda create --name TEST python=${{ matrix.python-version }} python-build cython numpy=${{ matrix.numpy-version }} --file requirements-dev.txt + conda create --name TEST python=${{ matrix.python-version }} python-build numpy=${{ matrix.numpy-version }} --file requirements-dev.txt source activate TEST pip install -e . --no-deps --force-reinstall conda info --all diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a193960..0000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -language: minimal - -sudo: false - -env: - global: - - secure: "i/Uj39kBUz9zrzUY86OUkAe8zrKlKijuVzADqdlV8YCgiCuuP/d7ZUlS13SSXRXeiSlDAUSta4wqFkmLL/EfdIiLRRAooM12D1xMEozL/suoi3wS8B2WTZ0J4On5u5na6sCtI/9YqjlZ3RzKfPl3j11ye0VldLR6Rdf/VQpW80+QpqCeiEmBzbUeRHWOiOTT7Joo4dGwgnBlUtYWmTC4nAydrMuko0cznueKf7x2dGBpcBoFF9ylZP08V1vH2Y7OC6Nd/oEKS8MoKstXUNk0QamVEXeZejjska/7odyCt9uWOCdCN594H6G7ECbQz5UvlUiOWL/jb9UsIhosvKMLGt5lg50LAMZphMq/FARU/oA+gIf3m5EvOODFNvDK7/3OJXrVkD07fkFDhe99mo4/hgiadkQVx0RIXIRcG2vO9LbyOBux2ASjYR7clv0q7Rj6zckt3L/knU8tXOQbW2VSx2czQFFNIC1EFP6h5ydK0s/bRMWO23xOToxdRlyFYn5HVwYpxPGFvFywjyWm4lkCBvb1s4UuriWe4ikVTyNdukchpwLaP9Uz02I5pVPkKdkiv3SGS+jjCoQdGSnOmk13ruqszUxgfb5BSkD0ACrGos4O0NG/8TDXuxf8nKS1bwATIIwAp0cCYgIxolODFU79YS6hSOHr2RJxdlwl9bQVykk=" - -matrix: - fast_finish: true - include: - - name: "docs" - env: NUMPY=1 PY=3 - -before_install: - # Install miniconda and create TEST env. - - | - set -e - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - conda config --set always_yes yes --set changeps1 no --set show_channel_urls true - conda update conda --quiet - conda config --add channels conda-forge --force - conda config --set channel_priority strict - conda create --name TEST python=$PY --file requirements-dev.txt --quiet - source activate TEST - # Install after to ensure it will be downgraded when testing an older version. - conda install numpy=$NUMPY xarray dask - conda info --all - -# Test source distribution. -install: - - pip install -e . --no-deps --force-reinstall - -script: - - | - if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then - pushd docs - make clean html linkcheck - popd - if [[ -z "$TRAVIS_TAG" ]]; then - python -m doctr deploy --build-tags --key-path github_deploy_key.enc --built-docs docs/_build/html dev - else - python -m doctr deploy --build-tags --key-path github_deploy_key.enc --built-docs docs/_build/html "version-$TRAVIS_TAG" - python -m doctr deploy --build-tags --key-path github_deploy_key.enc --built-docs docs/_build/html . - fi - fi diff --git a/pyproject.toml b/pyproject.toml index 95051bd..820e39e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["pip >9.0.1", "setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "cython", "oldest-supported-numpy", "build"] +requires = ["pip >9.0.1", "setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4", "oldest-supported-numpy", "build"] build-backend = "setuptools.build_meta"