Skip to content

Commit

Permalink
Merge pull request #28 from ocefpaf/modernize_pkg
Browse files Browse the repository at this point in the history
Modernize pkg
  • Loading branch information
ocefpaf authored May 24, 2022
2 parents c7ac3ae + 5f18c71 commit 1370610
Show file tree
Hide file tree
Showing 20 changed files with 345 additions and 3,318 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on:
pull_request:
push:
branches: [main]

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: false

- name: Python ${{ matrix.python-version }}
shell: bash -l {0}
run: |
micromamba create --name TEST python=${{ matrix.python-version }} --file requirements.txt --file requirements-dev.txt --channel conda-forge
micromamba activate TEST
python -m pip install -e . --no-deps --force-reinstall
- name: Tests
shell: bash -l {0}
run: |
micromamba activate TEST
python -m pytest -rxs tests
91 changes: 91 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: check-ast
- id: debug-statements
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-added-large-files
exclude_types: [yaml]
- id: requirements-txt-fixer
- id: file-contents-sorter
files: requirements-dev.txt

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
exclude: docs/source/conf.py
args: [--max-line-length=105]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
additional_dependencies: [toml]
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/keewis/blackdoc
rev: v0.3.4
hooks:
- id: blackdoc

- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
exclude: ^(docs|setup.py|tests)
args: [--config=pyproject.toml]

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
exclude: >
(?x)^(
.*\.yaml
)$
args:
- --quiet-level=2

- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
hooks:
- id: pyupgrade
args:
- --py36-plus

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.2.3
hooks:
- id: add-trailing-comma

- repo: https://github.com/deathbeds/prenotebook
rev: f5bdb72a400f1a56fe88109936c83aa12cc349fa
hooks:
- id: prenotebook

- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
exclude: ^(docs|setup.py)

ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: monthly
skip: []
submodules: false
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
odvc
------

.. image:: https://travis-ci.org/ioos/odvc.svg?branch=master
:target: https://travis-ci.org/ioos/odvc
# odvc

Ocean Dimensionless Vertical Coordinates

Expand Down
Loading

0 comments on commit 1370610

Please sign in to comment.