2021-10-14 16:48:42 +02:00
|
|
|
.PHONY: env38
|
|
|
|
PY_SOURCE ?= ingestion/src
|
2021-08-01 14:27:44 -07:00
|
|
|
|
|
|
|
env38:
|
|
|
|
# virtualenv -p python3.8 env38
|
|
|
|
python3.8 -m venv env38
|
|
|
|
clean_env37:
|
|
|
|
rm -rf env38
|
2021-10-14 16:48:42 +02:00
|
|
|
|
2021-10-15 00:22:59 +02:00
|
|
|
install:
|
|
|
|
pip install ingestion/
|
|
|
|
|
2021-10-14 16:48:42 +02:00
|
|
|
install_test:
|
2021-10-15 00:22:59 +02:00
|
|
|
pip install -r ingestion/requirements-test.txt
|
|
|
|
|
2021-10-21 23:51:38 +02:00
|
|
|
install_dev:
|
|
|
|
pip install -r ingestion/requirements-dev.txt
|
|
|
|
|
2021-10-15 00:22:59 +02:00
|
|
|
precommit_install:
|
|
|
|
@echo "Installing pre-commit hooks"
|
|
|
|
@echo "Make sure to first run `make install_test`"
|
|
|
|
pre-commit install --config ingestion/.pre-commit-config.yaml
|
|
|
|
|
|
|
|
isort:
|
|
|
|
isort $(PY_SOURCE) --skip $(PY_SOURCE)/metadata/generated --profile black --multi-line 3
|
2021-10-14 16:48:42 +02:00
|
|
|
|
|
|
|
lint:
|
|
|
|
find $(PY_SOURCE) -path $(PY_SOURCE)/metadata/generated -prune -false -o -type f -name "*.py" | xargs pylint
|
|
|
|
|
|
|
|
black:
|
|
|
|
black $(PY_SOURCE) --exclude $(PY_SOURCE)/metadata/generated
|
|
|
|
|
|
|
|
black_check:
|
|
|
|
black --check --diff $(PY_SOURCE) --exclude $(PY_SOURCE)/metadata/generated
|
2021-10-21 23:51:38 +02:00
|
|
|
|
|
|
|
generate:
|
|
|
|
datamodel-codegen --input catalog-rest-service/src/main/resources/json --input-file-type jsonschema --output ingestion/src/metadata/generated
|