Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the failing actions #4

Merged
merged 4 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@ name: CI
on:
push:
branches:
- "main"
- 'main'
pull_request:
branches:
- "*"
- '*'
schedule:
- cron: "0 0 * * *" # Daily “At 00:00”
- cron: '0 0 * * *' # Daily “At 00:00”
workflow_dispatch: # allows you to trigger manually

jobs:
build:
name: Build (${{ matrix.python-version }}, ${{ matrix.os }})
if: github.repository == 'openradar/cmweather'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.7", "3.8", "3.9"]
os: ['ubuntu-latest']
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -40,22 +41,14 @@ jobs:
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{
hashFiles('ci/requirements/**.yml') }}
- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/setup-micromamba@v1
with:
channels: conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: sandbox-devel
auto-update-conda: false
environment-file: ci/environment.yml
activate-environment: cmweather-dev
cache-downloads: true
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Install conda dependencies
run: |
mamba env update -f $CONDA_ENV_FILE

- name: Set up conda environment
shell: bash -l {0}
Expand Down Expand Up @@ -86,7 +79,7 @@ jobs:
- name: set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.8

- name: Install package
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
linting:
name: "pre-commit hooks"
name: 'pre-commit hooks'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
68 changes: 31 additions & 37 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: double-quote-string-fixer
ci:
autoupdate_schedule: monthly

- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: double-quote-string-fixer
- id: debug-statements
- id: mixed-line-ending

- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: blackdoc
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.270'
hooks:
- id: ruff
args: ['--fix']

- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black-jupyter

- repo: https://github.com/prettier/prettier
rev: 3.0.0
hooks:
- id: prettier
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: blackdoc

- repo: https://github.com/deathbeds/prenotebook
rev: f5bdb72a400f1a56fe88109936c83aa12cc349fa
hooks:
- id: prenotebook
args:
[
'--keep-output',
'--keep-metadata',
'--keep-execution-count',
'--keep-empty',
]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: prettier
6 changes: 3 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: '3.11'

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
Expand All @@ -21,4 +21,4 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements-docs.txt
- requirements: docs/requirements-docs.txt
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# cmweather

A library of useful colormaps for the weather and climate community, with numerous color vision deficiency friendly options.
2 changes: 1 addition & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: sandbox-devel
name: cmweather-dev
channels:
- conda-forge
dependencies:
Expand Down
1 change: 1 addition & 0 deletions cmweather/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import xarray as xr


def my_mean_func(data):
"""
Computes mean of an xarray object.
Expand Down
Loading
Loading