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

Update documentation and add pre-commit tooling #77

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
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
22 changes: 5 additions & 17 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"files": [
"README.md"
],
"files": ["README.md", "docs/contributing.md"],
"imageSize": 100,
"commit": false,
"commitType": "docs",
Expand All @@ -12,38 +10,28 @@
"name": "Laura Gomez Navarro",
"avatar_url": "https://avatars.githubusercontent.com/u/20359692?v=4",
"profile": "https://github.com/LauraGomezNavarro",
"contributions": [
"code"
]
"contributions": ["code"]
},
{
"login": "jimena-medinarubio",
"name": "Jimena Medina",
"avatar_url": "https://avatars.githubusercontent.com/u/101462540?v=4",
"profile": "https://github.com/jimena-medinarubio",
"contributions": [
"code"
]
"contributions": ["code"]
},
{
"login": "sruehs",
"name": "sruehs",
"avatar_url": "https://avatars.githubusercontent.com/u/33282992?v=4",
"profile": "https://github.com/sruehs",
"contributions": [
"ideas",
"code",
"projectManagement"
]
"contributions": ["ideas", "code", "projectManagement"]
},
{
"login": "dicaearchus",
"name": "Bas Altena",
"avatar_url": "https://avatars.githubusercontent.com/u/64000582?v=4",
"profile": "https://www.uu.nl/staff/BAltena",
"contributions": [
"code"
]
"contributions": ["code"]
}
],
"contributorsPerLine": 7,
Expand Down
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://lagrangian-diags.readthedocs.io/en/latest/contributing/index.html
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Data
Simulations/out-*
docs/_build

# Jupyter Notebook
.ipynb_checkpoints

*.pyc

.DS_Store
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: '.*\.zarr'

- id: check-yaml
- id: check-ast
- id: check-json
types: [text]
files: \.(json|ipynb)$
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.7.0
# hooks:
# - id: ruff
# args: [--fix, --show-fixes]
# types_or: [python]
# - id: ruff
# name: ruff (isort jupyter)
# args: [--select, I, --fix]
# types_or: [jupyter]
# - id: ruff-format
# types_or: [python, jupyter]
- repo: https://github.com/rbubley/mirrors-prettier # Update mirror as official mirror is deprecated
rev: v3.3.3
hooks:
- id: prettier

# Ruff doesn't have full coverage of pydoclint https://github.com/astral-sh/ruff/issues/12434
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
name: pydoclint
files: "none"
# files: parcels/fieldset.py # put here instead of in config file due to https://github.com/pre-commit/pre-commit-hooks/issues/112#issuecomment-215613842
args:
- --select=DOC103 # TODO: Expand coverage to other codes
additional_dependencies:
- pydoclint[flake8]
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ sphinx:
configuration: docs/conf.py

conda:
environment: docs/environment_docs.yml
environment: docs/environment_docs.yml
Loading