forked from kin-labs/kinetic-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
28 lines (22 loc) · 1.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
clean:
rm -rf dist build __pycache__ *.egg-info
build:
poetry build
format:
poetry run isort src tests
poetry run black --line-length=120 src tests
lint:
poetry run black --check --diff --line-length=120 src tests
#poetry run pydocstyle src tests
poetry run flake8 src tests
#poetry run mypy src
poetry run pylint --rcfile=.pylintrc src tests
generate:
rm -r src/kinetic_sdk/generated/client && openapi-generator-cli generate -i https://raw.githubusercontent.com/kin-labs/kinetic/main/api-swagger.json -g python -o src/kinetic_sdk/generated --additional-properties=packageName=client --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false
find src/kinetic_sdk/generated -name '*.py' -print -exec sed -i.bak 's/from client/from kinetic_sdk.generated.client/g' {} \;
find src/kinetic_sdk/generated -name '*.bak' -print -exec rm {} \;
rm -r src/kinetic_sdk/generated/{.openapi-generator,.gitignore,.gitlab-ci.yml,.openapi-generator-ignore,.travis.yml,README.md,git_push.sh,requirements.txt,setup.cfg,setup.py,test-requirements.txt,tox.ini}
install:
poetry install
test:
poetry run pytest -vv -s ./tests/