Skip to content

Commit ac47a08

Browse files
committed
feature: poetry integration + pre-commit integration + basic test added
1 parent 7a22b09 commit ac47a08

12 files changed

Lines changed: 1081 additions & 17 deletions

File tree

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 120
3+
select = C,E,F,W,B,B950
4+
ignore = E203, E231, E501, W503

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
**/target
2-
Cargo.lock
32
*.pyc
43
*.swo
54
*.swp
5+
.mypy_cache/

.pre-commit-config.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
default_stages: [push]
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v2.4.0
5+
hooks:
6+
- id: trailing-whitespace
7+
- id: end-of-file-fixer
8+
- id: check-yaml
9+
- id: check-added-large-files
10+
11+
- repo: local
12+
hooks:
13+
- id: black
14+
name: Black formatter
15+
entry: poetry run black --check
16+
language: system
17+
types: [python]
18+
- id: flake8
19+
name: Flake8 linter
20+
entry: poetry run flake8
21+
language: system
22+
types: [python]
23+
- id: isort
24+
name: isort formatter
25+
entry: poetry run isort -rc -c
26+
language: system
27+
types: [python]
28+
- id: mypy
29+
name: mypy linter
30+
entry: poetry run mypy --config-file mypy.ini
31+
language: system
32+
types: [python]
33+
34+
- repo: https://github.com/doublify/pre-commit-rust
35+
rev: master
36+
hooks:
37+
- id: fmt
38+
- id: cargo-check
39+
- id: clippy

Cargo.lock

Lines changed: 303 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ TODO
1818
('{"users"}[1]', 'carl')
1919
('{"users"}[2]', 'bob')
2020
```
21+
22+
## Developer Docs
23+
24+
## Build
25+
TODO poetry for dev-dependencies pip for install
26+
### Precommit deployment
27+
```bash
28+
poetry run pre-commit install -t pre-push
29+
```

mypy.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[mypy]
2+
python_version = 3.6
3+
strict_optional = True
4+
ignore_missing_imports = True

0 commit comments

Comments
 (0)