poetry integrated and dev scripts setup
This commit is contained in:
parent
0679592216
commit
dfff6b3a70
10
.gitignore
vendored
10
.gitignore
vendored
@ -3,5 +3,13 @@ env/
|
||||
__pycache__
|
||||
.mypy_cache
|
||||
|
||||
*.swp
|
||||
# vim temp
|
||||
*.sw?
|
||||
.*.sw?
|
||||
|
||||
# pytest cache
|
||||
.pytest_cache/
|
||||
|
||||
# coverage
|
||||
htmlcov
|
||||
.coverage*
|
||||
|
@ -1 +0,0 @@
|
||||
3.9.4
|
1636
poetry.lock
generated
Normal file
1636
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
64
pyproject.toml
Normal file
64
pyproject.toml
Normal file
@ -0,0 +1,64 @@
|
||||
[tool.poetry]
|
||||
name = "mev_inspect"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["Your Name <you@example.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
web3 = "^5.21.0"
|
||||
pydantic = "^1.8.2"
|
||||
hexbytes = "^0.2.1"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
pre-commit = "^2.13.0"
|
||||
pylint = "^2.9.5"
|
||||
mypy = "^0.910"
|
||||
black = "^21.7b0"
|
||||
isort = "^5.9.2"
|
||||
pytest = "^6.2.4"
|
||||
pytest-sugar = "^0.9.4"
|
||||
pytest-cov = "^2.12.1"
|
||||
coverage = "^5.5"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
lint = 'scripts.dev_tools:lint'
|
||||
test = 'scripts.dev_tools:test'
|
||||
isort = 'scripts.dev_tools:isort'
|
||||
isortcheck = 'scripts.dev_tools:isortcheck'
|
||||
mypy = 'scripts.dev_tools:mypy'
|
||||
black = 'scripts.dev_tools:black'
|
||||
blackcheck = 'scripts.dev_tools:blackcheck'
|
||||
|
||||
[tool.black]
|
||||
exclude = '''
|
||||
/(
|
||||
\.eggs
|
||||
| \.git
|
||||
| \.hg
|
||||
| \.mypy_cache
|
||||
| \.tox
|
||||
| \.venv
|
||||
| _build
|
||||
| buck-out
|
||||
| build
|
||||
| dist
|
||||
| tests/.*/setup.py
|
||||
)/
|
||||
'''
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
atomic = true
|
||||
include_trailing_comma = true
|
||||
lines_after_imports = 2
|
||||
lines_between_types = 1
|
||||
use_parentheses = true
|
||||
src_paths = ["poetry", "tests"]
|
||||
skip_glob = ["*/setup.py"]
|
||||
filter_files = true
|
||||
known_first_party = "poetry"
|
@ -1,4 +0,0 @@
|
||||
web3==5.20.1
|
||||
hexbytes==0.2.1
|
||||
argparse==1.4.0
|
||||
pydantic==1.8.2
|
@ -1,3 +0,0 @@
|
||||
pre-commit==2.13.0
|
||||
pylint==2.9.3
|
||||
mypy==0.910
|
22
scripts/dev_tools.py
Normal file
22
scripts/dev_tools.py
Normal file
@ -0,0 +1,22 @@
|
||||
from subprocess import check_call
|
||||
|
||||
def lint():
|
||||
check_call(['pylint'])
|
||||
|
||||
def test():
|
||||
check_call(['pytest', '--cov=mev_inspect', 'tests'])
|
||||
|
||||
def isort():
|
||||
check_call(['isort', '.'])
|
||||
|
||||
def isortcheck():
|
||||
check_call(['isort', '--diff', '.'])
|
||||
|
||||
def mypy():
|
||||
check_call(['mypy', '.'])
|
||||
|
||||
def black():
|
||||
check_call(['black', '.'])
|
||||
|
||||
def blackcheck():
|
||||
check_call(['black', '--diff', '--color', '.'])
|
Loading…
x
Reference in New Issue
Block a user