Skip to content

Commit

Permalink
Merge pull request #1379 from Sage-Bionetworks/develop-black-pre-comm…
Browse files Browse the repository at this point in the history
…it-FDS-323

Add pre commit hook for `black`
  • Loading branch information
GiaJordan authored Mar 7, 2024
2 parents 26f71aa + 71e891c commit 0662b0a
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
# This is recommended by psf/black: https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.10
files: schematic/
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ Most Google sheet functionality could be authenticated with service account. How
requires token-based authentication. As browser support that requires the token-based authentication diminishes, we are hoping to deprecate
token-based authentication and keep only service account authentication in the future.

8. Set up pre-commit hooks

This repository is configured to utilize pre-commit hooks as part of the development process. To enable these hooks, please run the following command and look for the following success message:
```
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
```

### Development process instruction

Expand Down
107 changes: 105 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ pytest-mock = "^3.5.1"
pytest-rerunfailures = "^12.0"
flake8 = "^6.0.0"
python-dotenv = "^0.21.0"
black = "^23.7.0"
black = "^23.7.0" #If the version spec of black is changed here, the version specified in .pre-commit-config.yaml should be updated to match
mypy = "^1.4.1"
pylint = "^2.16.1"
pytest-xdist = "^3.5.0"
pre-commit = "^3.6.2"

[tool.poetry.group.aws]
optional = true
Expand Down

0 comments on commit 0662b0a

Please sign in to comment.