Skip to content

Commit

Permalink
Add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Meyers committed May 10, 2024
1 parent 9968660 commit 657df89
Show file tree
Hide file tree
Showing 120 changed files with 3,848 additions and 3,405 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Ex. I'm frustrated when [...] happens as documented in issue-XYZ

**Describe the feature request**

> A clear and concise description of your request.
> A clear and concise description of your request.
Ex. I need or want [...]
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
- Links to relevant issues
- Example: issue-XYZ
## Testing
- Provide some proof you've tested your changes
- Provide some proof you've tested your changes
- Example: test results available at ...
- Example: tested on operating system ...
158 changes: 151 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -20,9 +19,12 @@ lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -37,30 +39,172 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
*.cover
*.py,cover
.hypothesis/
venv/
.venv/
.python-version
.pytest_cache
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

#Ipython Notebook
# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

.idea
.idea/

.vscode
.vscode/
28 changes: 28 additions & 0 deletions .markdownlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"default": true,
"MD029": {
"style": "ordered"
},
"MD033": false,
"MD013": false,
"MD002": false,
"MD026": false,
"MD041": false,
"MD005": false,
"MD007": false,
"MD034": false,
"MD024": false,
"MD045": false,
"MD012": false,
"MD031": false,
"MD032": false,
"MD036": false,
"MD055": false,
"MD056": false,
"MD022": false,
"MD042": false,
"MD004": false,
"MD025": false,
"MD001": false,
"MD051": false
}
67 changes: 67 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-added-large-files
args:
- --maxkb=50000
- id: check-json # Checks json files for parsable syntax.
- id: pretty-format-json # Sets a standard for formatting json files.
args:
- --autofix
- id: requirements-txt-fixer # Sorts entries in requirements.txt.
- id: check-ast # Simply checks whether the files parse as valid python.
- id: detect-private-key # Detects the presence of private keys.
- id: detect-aws-credentials # Detects *your* aws credentials from the aws cli credentials file.
args:
- --allow-missing-credentials
- id: check-toml # Checks toml files for parsable syntax.

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: "v0.39.0"
hooks:
- id: markdownlint
args: ["--config", ".markdownlintrc", "--ignore", "CHANGELOG.md"]

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
hooks:
- id: black

# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.2.1
# hooks:
# - id: ruff
# args: [ --fix ]

- repo: https://github.com/PyCQA/bandit
rev: "1.7.7" # you must change this to newest version
hooks:
- id: bandit
args:
[
"--configfile=pyproject.toml",
"--severity-level=high",
"--confidence-level=high",
]
additional_dependencies: [".[toml]"]

- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
- id: hadolint # requires hadolint is installed (brew install hadolint)
args:
- --no-color
- --failure-threshold=error
- --verbose
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [X.Y.Z] - 2022-MM-DD

### Added
### Added

-
-
-
-
6 changes: 2 additions & 4 deletions docs/Bbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bbox** | **List[float]** | |
**crs** | [**Crs**](Crs.md) | | [optional]
**bbox** | **List[float]** | |
**crs** | [**Crs**](Crs.md) | | [optional]

## Example

Expand All @@ -26,5 +26,3 @@ bbox_dict = bbox_instance.to_dict()
bbox_from_dict = Bbox.from_dict(bbox_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


4 changes: 1 addition & 3 deletions docs/ConfClasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**conforms_to** | **List[str]** | |
**conforms_to** | **List[str]** | |

## Example

Expand All @@ -25,5 +25,3 @@ conf_classes_dict = conf_classes_instance.to_dict()
conf_classes_from_dict = ConfClasses.from_dict(conf_classes_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 0 additions & 2 deletions docs/Crs.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ crs_dict = crs_instance.to_dict()
crs_from_dict = Crs.from_dict(crs_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 0 additions & 2 deletions docs/Crs5.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit 657df89

Please sign in to comment.