Skip to content

Commit 7cea80a

Browse files
committed
first commit
0 parents  commit 7cea80a

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
__pycache__/
2+
data/
3+
results/
4+
outputs/
5+
checkpoints/
6+
wandb/
7+
tests/
8+
ecgdata/

.isort.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[settings]
2+
length_sort=true
3+
multi_line_output=3
4+
include_trailing_comma=true
5+
force_sort_within_sections=true

.pre-commit-config.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
default_language_version:
2+
python: python3.10
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: check-merge-conflict
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
- id: debug-statements
11+
- id: check-yaml
12+
- id: check-docstring-first
13+
- id: requirements-txt-fixer
14+
- repo: https://github.com/pycqa/flake8
15+
rev: 6.0.0
16+
hooks:
17+
- id: flake8
18+
args: ["--max-line-length=180","--extend-ignore=E203","--per-file-ignores=.github/scripts/bump_version.py:E402"]
19+
- repo: https://github.com/ambv/black
20+
rev: 23.7.0
21+
hooks:
22+
- id: black
23+
args: [--line-length=130]
24+
additional_dependencies: ['click==8.0.4']
25+
- repo: https://github.com/pycqa/isort
26+
rev: 5.12.0
27+
hooks:
28+
- id: isort
29+
name: isort
30+
args: [--line-length=130]

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ecg-gan
2+
3+
### Code Style
4+
5+
This repository uses pre-commit hooks with forced python formatting ([black](https://github.com/psf/black),
6+
[flake8](https://flake8.pycqa.org/en/latest/), and [isort](https://pycqa.github.io/isort/)):
7+
8+
```sh
9+
pip install pre-commit
10+
pre-commit install
11+
```
12+
13+
Whenever you execute `git commit` the files altered / added within the commit will be checked and corrected.
14+
`black` and `isort` can modify files locally - if that happens you have to `git add` them again.
15+
You might also be prompted to introduce some fixes manually.
16+
17+
To run the hooks against all files without running `git commit`:
18+
19+
```sh
20+
pre-commit run --all-files
21+
```

0 commit comments

Comments
 (0)