Skip to content

Commit

Permalink
feat: add pre-commit
Browse files Browse the repository at this point in the history
Resolves #4
  • Loading branch information
dvdblk committed Oct 23, 2023
1 parent a6e510a commit d6d3882
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [ "--profile", "black" ]
name: isort (python)
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [ "--target-version", "py311", "--config", "pyproject.toml" ]
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

* https://docs.google.com/spreadsheets/d/1pKb_1Je4hD2X8IfYrFXYqBhWfPg5lgPY/edit?usp=sharing&ouid=110500414719598262605&rtpof=true&sd=true

## Conda Environment
## Getting started

### Conda Environment
To run the pipeline (jupyter notebooks) you need to create a conda environment with the required dependencies.

> Requirements: [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html)
Expand All @@ -16,4 +19,9 @@ conda env create -f environment.yml
conda activate hack4good
# to deactivate the environment (when you're done)
conda deactivate
```
```

## Contributing
1. Install [pre-commit](https://pre-commit.com/#installation).
2. `pre-commit install`
3. Add changes, commit and pull request to `main` branch.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.black]
line-length = 100
target-version = ['py311']

0 comments on commit d6d3882

Please sign in to comment.