Skip to content

Commit

Permalink
Add pre-commit package, config, and docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Nov 7, 2023
1 parent 885f682 commit f8dd602
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# pre-commit config, per https://pre-commit.com/
#
# These hooks only use local commands.
repos:
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
require_serial: true
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ deactivate

# Development

## Cloning and setup

* Clone as usual
* set up your virtual environment, install all dev dependencies from requirements.txt, activate it
* Install the git pre-commit hooks: `pre-commit install`

## Commit hooks

Pre-commit hooks are installed with the `pre-commit install` step, and are run on every commit.

Skipping a step: `SKIP=pylint git commit -m "Some non-lint-compliant commit."`

## Using invoke for tasks

Lute3 uses [Invoke](https://docs.pyinvoke.org/en/stable/index.html) to run tasks. Tasks are in `tasks.py`.
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ dev = [
"pipdeptree>=2.13.0,<3",
"pylint>=2.17.5,<3",
"pytest-bdd>=7.0.0,<8",
"pytest-splinter>=3.3.2,<4"
"pytest-splinter>=3.3.2,<4",
"pre-commit>=3.5.0,<4"
]

[project.urls]
Expand Down
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ beautifulsoup4==4.12.2
blinker==1.6.2
certifi==2023.7.22
cffi==1.16.0
cfgv==3.4.0
charset-normalizer==3.3.1
click==8.1.7
coverage==7.3.1
dill==0.3.7
distlib==0.3.7
docutils==0.20.1
exceptiongroup==1.1.3
filelock==3.13.1
Flask==2.3.3
Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.1
flit==3.9.0
flit_core==3.9.0
h11==0.14.0
identify==2.5.31
idna==3.4
importlib-metadata==6.8.0
iniconfig==2.0.0
Expand All @@ -28,13 +32,15 @@ Mako==1.2.4
MarkupSafe==2.1.3
mccabe==0.7.0
natto-py==1.0.1
nodeenv==1.8.0
outcome==1.3.0.post0
packaging==23.1
parse==1.19.1
parse-type==0.6.2
pipdeptree==2.13.0
platformdirs==3.10.0
pluggy==1.3.0
pre-commit==3.5.0
pycparser==2.21
pylint==2.17.5
PySocks==1.7.1
Expand All @@ -58,6 +64,7 @@ trio==0.22.2
trio-websocket==0.11.1
typing_extensions==4.8.0
urllib3==1.26.18
virtualenv==20.24.6
waitress==2.1.2
Werkzeug==2.3.7
wrapt==1.15.0
Expand Down

0 comments on commit f8dd602

Please sign in to comment.