-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (48 loc) · 1.53 KB
/
Makefile
File metadata and controls
62 lines (48 loc) · 1.53 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.PHONY: clean req-test test lint cli-plugin package-cli-plugin publish-cli-plugin
clean:
find . -path '*/__pycache__/*' -delete
find . -type d -name __pycache__ -delete
rm -rf .mypy_cache .pytest_cache dist build *.egg-info
req-test:
pip install --upgrade pip==20.3.4
pip install --no-use-pep517 -e .[test]
req:
pip install --upgrade pip==20.3.4
pip install --no-use-pep517 .
test:
py.test -sv tests/ --log-cli-level=DEBUG
py.test -sv examples/prediction-demo/tests/ --log-cli-level=DEBUG
black:
black ./bin ./drapps ./tests -S -l 100
black-check:
black ./bin ./drapps ./tests -S --check -l 100
isort:
isort ./bin ./drapps ./tests
isort-check:
isort -c ./bin ./drapps ./tests
mypy:
mypy --config-file=mypy.ini ./drapps
flake:
flake8 bin drapps tests
lint: isort-check black-check mypy flake
# CLI Plugin packaging targets
cli-plugin:
@echo "Building wheel..."
@python setup.py bdist_wheel
@./bin/build-cli-plugin
package-cli-plugin: cli-plugin
@echo "Packaging CLI plugin..."
@if ! command -v dr &> /dev/null; then \
echo "Error: 'dr' CLI not found. Please install DataRobot CLI first."; \
exit 1; \
fi
@dr self plugin package dist/plugin-staging $(PLUGIN_PACKAGE_FLAGS)
@echo "✅ Plugin packaged successfully"
publish-cli-plugin: cli-plugin
@echo "Publishing CLI plugin..."
@if ! command -v dr &> /dev/null; then \
echo "Error: 'dr' CLI not found. Please install DataRobot CLI first."; \
exit 1; \
fi
@dr self plugin publish dist/plugin-staging $(PLUGIN_PUBLISH_FLAGS)
@echo "✅ Plugin published successfully"