-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into use-esmf-install-action
# Conflicts: # .github/workflows/bump-version.yml # .github/workflows/gh-pages.yml # .github/workflows/main.yml # .github/workflows/publish-pypi.yml # .github/workflows/tag-testpypi.yml # setup.py # tox.ini
- Loading branch information
Showing
40 changed files
with
720 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[flake8] | ||
exclude = | ||
.eggs, | ||
.git, | ||
build, | ||
docs, | ||
tests | ||
ignore = | ||
AZ100, | ||
AZ200, | ||
AZ300, | ||
C, | ||
D, | ||
E, | ||
F, | ||
W503 | ||
per-file-ignores = | ||
rst-roles = | ||
doc, | ||
mod, | ||
py:attr, | ||
py:attribute, | ||
py:class, | ||
py:const, | ||
py:data, | ||
py:func, | ||
py:meth, | ||
py:mod, | ||
py:obj, | ||
py:ref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: GitHub Actions Version Updater | ||
|
||
on: | ||
schedule: | ||
# 12:00 AM on the first of every month | ||
- cron: '0 0 1 * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
# This requires a personal access token with the privileges to push directly to `main` | ||
token: ${{ secrets.BUMPVERSION_TOKEN }} | ||
persist-credentials: true | ||
- name: Run GitHub Actions Version Updater | ||
uses: saadmk11/[email protected] | ||
with: | ||
token: ${{ secrets.BUMPVERSION_TOKEN }} | ||
committer_email: 'bumpversion[bot]@ouranos.ca' | ||
committer_username: 'update-github-actions[bot]' | ||
pull_request_title: '[bot] Update GitHub Action Versions' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,9 @@ on: | |
branches: | ||
- main | ||
paths-ignore: | ||
- HISTORY.rst | ||
- MANIFEST.in | ||
- CHANGES.rst | ||
- README.rst | ||
- setup.py | ||
- pyproject.toml | ||
- setup.cfg | ||
- xdatasets/__init__.py | ||
pull_request: | ||
|
@@ -18,32 +17,33 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
# Temporarily bypass checks until code passes linting | ||
# black: | ||
# name: Black (Python${{ matrix.python-version }}) | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: | ||
# - "3.8" | ||
# steps: | ||
# - name: Cancel previous runs | ||
# uses: styfle/[email protected] | ||
# with: | ||
# access_token: ${{ secrets.GITHUB_TOKEN }} | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up Python${{ matrix.python-version }} | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Install tox | ||
# run: pip install tox | ||
# - name: Run linting suite | ||
# run: tox -e black | ||
lint: | ||
name: Lint (Python${{ matrix.python-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.x" | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/[email protected] | ||
- name: Set up Python${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install tox | ||
run: | | ||
python -m pip install tox | ||
- name: Run linting suite | ||
run: | | ||
python -m tox -e lint | ||
test: | ||
name: test-${{ matrix.tox-env }} (Python${{ matrix.python-version }}) | ||
# needs: black | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
env: | ||
ESMF_VERSION: "v8.5.0" | ||
|
@@ -59,7 +59,7 @@ jobs: | |
- tox-env: "py311" | ||
python-version: "3.11" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
- name: Install NetCDF | ||
run: | | ||
sudo apt-get -y update | ||
|
@@ -72,23 +72,69 @@ jobs: | |
cache: true | ||
version: ${{ env.ESMF_VERSION }} | ||
- name: Set up Python${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v4.7.1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install tox | ||
run: pip install tox | ||
run: | | ||
pip install tox | ||
- name: Test with tox | ||
run: tox -e ${{ matrix.tox-env }} | ||
run: | | ||
tox -e ${{ matrix.tox-env }} | ||
env: | ||
ESMF_VERSION: ${{ env.ESMF_VERSION }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: run-${{ matrix.tox-env }} | ||
COVERALLS_PARALLEL: true | ||
COVERALLS_SERVICE_NAME: github | ||
|
||
# test-conda: | ||
# name: Test with Python${{ matrix.python-version }} (Anaconda) | ||
# needs: lint | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: ["3.9", "3.10", "3.11"] | ||
# defaults: | ||
# run: | ||
# shell: bash -l {0} | ||
# steps: | ||
# - uses: actions/[email protected] | ||
# - name: Setup Conda (Micromamba) with Python${{ matrix.python-version }} | ||
# uses: mamba-org/setup-micromamba@v1 | ||
# with: | ||
# cache-downloads: true | ||
# environment-file: environment-dev.yml | ||
# create-args: >- | ||
# mamba | ||
# python=${{ matrix.python-version }} | ||
# - name: Conda and Mamba versions | ||
# run: | | ||
# mamba --version | ||
# echo "micromamba $(micromamba --version)" | ||
# - name: Install xdatasets | ||
# run: | | ||
# python -m pip install --no-deps . | ||
# - name: Check versions | ||
# run: | | ||
# conda list | ||
# python -m pip check || true | ||
# - name: Test with pytest | ||
# run: | | ||
# python -m pytest --cov xdatasets | ||
# - name: Report coverage | ||
# run: | | ||
# python -m coveralls | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# COVERALLS_FLAG_NAME: run-Python${{ matrix.python-version }}-conda | ||
# COVERALLS_PARALLEL: true | ||
# COVERALLS_SERVICE_NAME: github | ||
|
||
# finish: | ||
# needs: | ||
# - test | ||
# - test-pypi | ||
# - test-conda | ||
# runs-on: ubuntu-latest | ||
# container: python:3-slim | ||
# steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,20 +9,21 @@ jobs: | |
build-n-publish-pypi: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-latest | ||
environment: production | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4.1.1 | ||
- name: Set up Python3 | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v4.7.1 | ||
with: | ||
python-version: "3.x" | ||
- name: Install packaging libraries | ||
run: | | ||
pip install setuptools wheel | ||
python -m pip install flit | ||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
python -m flit build | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
uses: pypa/[email protected] |
Oops, something went wrong.