forked from xarray-contrib/xeofs
-
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.
- Loading branch information
Showing
216 changed files
with
4,698 additions
and
7,790 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
fetch-depth: 0 | ||
- uses: BobAnkh/[email protected] | ||
with: | ||
REPO_NAME: 'nicrie/xeofs' | ||
REPO_NAME: 'xarray-contrib/xeofs' | ||
ACCESS_TOKEN: ${{ secrets.CHANGELOG_TOKEN }} | ||
PATH: 'CHANGELOG.md' | ||
COMMIT_MESSAGE: 'docs(CHANGELOG): update release notes' | ||
|
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 |
---|---|---|
|
@@ -8,51 +8,40 @@ on: | |
types: [opened, synchronize, reopened, edited] | ||
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | ||
|
||
jobs: | ||
|
||
Code_Quality_Check: | ||
|
||
jobs: | ||
test: | ||
name: py${{ matrix.versions.python-version }} ${{ matrix.versions.resolution }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.10', 3.11] | ||
versions: | ||
- python-version: '3.10' | ||
resolution: lowest-direct | ||
- python-version: '3.11' | ||
resolution: highest | ||
- python-version: '3.12' | ||
resolution: highest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Poetry | ||
uses: abatilo/actions[email protected] | ||
- name: Setup Python ${{ matrix.versions.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
poetry-version: 1.5.1 | ||
python-version: ${{ matrix.versions.python-version }} | ||
|
||
- name: Configure Poetry Settings | ||
shell: bash | ||
run: python -m poetry config virtualenvs.in-project true | ||
|
||
- name: Verify Poetry Version | ||
run: poetry --version | ||
|
||
- name: Install Project Dependencies | ||
run: python -m poetry install --with dev | ||
|
||
- name: Lint Codebase with flake8 | ||
- name: Install dependencies | ||
run: | | ||
python -m poetry run flake8 . --exclude .venv --count --select=E9,F63,F7,F82 --show-source --statistics | ||
python -m poetry run flake8 . --exclude .venv --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics | ||
pip install uv | ||
uv pip install . -r pyproject.toml --system --extra dev --resolution ${{ matrix.versions.resolution }} | ||
- name: Execute Tests with pytest and Coverage | ||
- name: Execute Tests | ||
run: | | ||
python -m poetry run coverage run -m pytest | ||
python -m poetry run coverage report -m | ||
python -m poetry run coverage xml | ||
coverage run -m pytest -n auto --doctest-glob="README.md" | ||
coverage report -m | ||
coverage xml | ||
- name: Upload Coverage Report to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./coverage.xml | ||
|
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,27 @@ | ||
name: Formatting | ||
|
||
on: | ||
pull_request: | ||
branches: [main, develop] | ||
types: [opened, synchronize, reopened, edited] | ||
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | ||
|
||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
# Update output format to enable automatic inline annotations. | ||
- name: Run Ruff | ||
run: | | ||
ruff check | ||
ruff format --check |
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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
repos: | ||
|
||
# - repo: ... | ||
|
||
# Conventional Commits | ||
- repo: https://github.com/compilerla/conventional-pre-commit | ||
rev: v1.2.0 | ||
hooks: | ||
- id: conventional-pre-commit | ||
stages: [commit-msg] | ||
args: [] # optional: list of Conventional Commits types to allow | ||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
# Lint and format with ruff | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.4 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format | ||
# Strip output from Jupyter Notebooks | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.6.1 | ||
hooks: | ||
- id: black | ||
# It is recommended to specify the latest version of Python | ||
# supported by your project here, or alternatively use | ||
# pre-commit's default_language_version, see | ||
# https://pre-commit.com/#top_level-default_language_version | ||
language_version: python3.11 | ||
- id: nbstripout |
Oops, something went wrong.