Skip to content

Commit

Permalink
Add and apply pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast committed Aug 1, 2023
1 parent e13a319 commit d605274
Show file tree
Hide file tree
Showing 30 changed files with 218 additions and 151 deletions.
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# In case of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = ,
skip = ./.git
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# (default: secrets.GITHUB_TOKEN)
token: ${{ secrets.CLA_ACTION_TOKEN }}
# [required]
# Label to apply to contributor's PR once CLA is singed
# Label to apply to contributor's PR once CLA is signed
label: cla-signed

# [required]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ env

# Directories
docs/_build/
docs/source/_build/
docs/source/_build/
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Apply to all files without commiting:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# standard end of line/end of file cleanup
- id: mixed-line-ending
- id: end-of-file-fixer
- id: trailing-whitespace
# ensure syntaxes are valid
- id: check-yaml
# catch git merge/rebase problems
- id: check-merge-conflict
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args:
- --profile=black
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
args: [--write]
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.23.3
hooks:
- id: check-github-workflows
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Please file issues, comments, and pull requests at the appropriate repo.

### Conda capitalization

The word "conda" should be lowercase, except when starting a sentence or header. Use code formatting when talking about the `conda` command.
The word "conda" should be lowercase, except when starting a sentence or header. Use code formatting when talking about the `conda` command.

For more detailed information on conda capitalization standards, see the [conda contributing guide](https://github.com/conda/conda/blob/main/CONTRIBUTING.md#conda-capitalization-standards).

Expand Down
2 changes: 1 addition & 1 deletion docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"restructuredtext.confPath": "${workspaceFolder}/source"
}
}
4 changes: 2 additions & 2 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/*header 1 text color */
color: #047704;
}

.rst-content .toctree-wrapper p.caption, h2, h3, h4, h5, h6, legend {
/*text color of rst content and subheads*/
color: #414042;
Expand Down Expand Up @@ -80,4 +80,4 @@ h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend {
.wy-nav-top {
/*color of nav at top when the window is narrow*/
background: #43B02A;
}
}
Loading

0 comments on commit d605274

Please sign in to comment.