-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve tooling for maintenance (#79)
* Fix for issue with new pandas version (#77) * new version of pandas has new option which contains max_rows, need to specify full option path to make sure no ambivalence is possible * Version to 0.10.2-alpha Co-authored-by: Ashley Smith <ashley.smith@magneticearth.org> * Move source file locations * Move to flit build system * Fix docs build * Configure linting with pre-commit * Apply linting * Configure linting & tests in GitHub Actions Co-authored-by: Daniel Santillan <daniel.santillan@eox.at>
- Loading branch information
1 parent
c96cca8
commit fca309f
Showing
61 changed files
with
1,896 additions
and
1,388 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[flake8] | ||
extend-ignore = E203, E501, E722, B950, T001 | ||
select = C,E,F,W,T,B,B9,I | ||
per-file-ignores = | ||
tests/*: T | ||
noxfile.py: T | ||
__init__.py:F401 |
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,25 +1,41 @@ | ||
name: CI | ||
|
||
|
||
on: | ||
push: | ||
branches: [ staging ] | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [ staging ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ${{ matrix.operating-system }} | ||
pre-commit: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v2 | ||
- uses: pre-commit/action@v2.0.3 | ||
with: | ||
extra_args: --hook-stage manual --all-files | ||
|
||
checks: | ||
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macOS-latest | ||
python-version: ["3.6", "3.10"] | ||
runs-on: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Nox | ||
uses: excitedleigh/setup-nox@v2.0.0 | ||
- name: Run Nox | ||
run: nox | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install package | ||
run: python -m pip install .[test] | ||
- name: Configure token access | ||
run: | | ||
viresclient set_token "https://vires.services/ows" ${{ secrets.VIRES_TOKEN_SWARM }} | ||
viresclient set_default_server https://vires.services/ows | ||
- name: Test package | ||
run: python -m pytest -ra |
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 |
---|---|---|
|
@@ -34,4 +34,4 @@ MANIFEST | |
docs/_build/ | ||
|
||
# nox | ||
.nox | ||
.nox |
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,94 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black-jupyter | ||
|
||
- repo: https://github.com/kynan/nbstripout | ||
rev: "0.5.0" | ||
hooks: | ||
- id: nbstripout | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.9.0 | ||
hooks: | ||
- id: python-check-blanket-noqa | ||
# - id: python-check-blanket-type-ignore | ||
- id: python-no-eval | ||
- id: python-use-type-annotations | ||
- id: rst-backticks | ||
- id: rst-directive-colons | ||
- id: rst-inline-touching-normal | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
# args: ["-a", "from __future__ import annotations"] # Python 3.7+ | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: ["--py37-plus"] | ||
|
||
# - repo: https://github.com/hadialqattan/pycln | ||
# rev: v1.1.0 | ||
# hooks: | ||
# - id: pycln | ||
# args: [--config=pyproject.toml] | ||
|
||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.3.0 | ||
hooks: | ||
- id: yesqa | ||
exclude: docs/conf.py | ||
additional_dependencies: &flake8_dependencies | ||
- flake8-bugbear | ||
- flake8-print | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
exclude: docs/conf.py | ||
additional_dependencies: *flake8_dependencies | ||
|
||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v0.930 | ||
# hooks: | ||
# - id: mypy | ||
# files: src | ||
# args: [--show-error-codes] | ||
|
||
# - repo: https://github.com/codespell-project/codespell | ||
# rev: v2.1.0 | ||
# hooks: | ||
# - id: codespell | ||
|
||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.8.0.4 | ||
hooks: | ||
- id: shellcheck | ||
|
||
- repo: local | ||
hooks: | ||
- id: disallow-caps | ||
name: Disallow improper capitalization | ||
language: pygrep | ||
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest | ||
exclude: .pre-commit-config.yaml |
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,21 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Include PDF and ePub | ||
formats: all | ||
|
||
python: | ||
version: 3.8 | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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
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
Oops, something went wrong.