forked from sematic-ai/sematic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (41 loc) · 1.45 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
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
migrate_up_rds:
cd sematic; DATABASE_URL=${DATABASE_URL} dbmate -s db/schema.sql.pg up
migrate_up_sqlite:
bazel run //sematic/db:migrate -- up --verbose --env local --schema-file ${PWD}/sematic/db/schema.sql.sqlite
migrate_down_sqlite:
bazel run //sematic/db:migrate -- down --verbose --env local --schema-file ${PWD}/sematic/db/schema.sql.sqlite
clear_sqlite:
sqlite3 ~/.sematic/db.sqlite3 < sematic/db/scripts/clear_all.sql
install-dev-deps:
pip3 install -r requirements/ci-requirements.txt
pre-commit:
flake8
mypy sematic
black sematic --check
isort sematic --diff
fix:
isort sematic
black sematic
refresh-dependencies:
pip-compile --allow-unsafe requirements/requirements.in
ui:
cd sematic/ui; npm run build
worker-image:
cd docker; docker build -t sematicai/sematic-worker-base:latest -f Dockerfile.worker .
wheel:
rm -f bazel-bin/sematic/*.whl
cat README.md | grep -v "<img" | grep -v "<p" > README.nohtml
m2r --overwrite README.nohtml
rm README.nohtml
bazel build //sematic:wheel
test-release:
python3 -m twine upload --repository testpypi bazel-bin/sematic/*.whl
release:
python3 -m twine upload bazel-bin/sematic/*.whl
release-server:
cd docker; docker build -t sematicai/sematic-server:${TAG} -f Dockerfile.server .
docker push sematicai/sematic-server:${TAG}
test:
bazel test //sematic/... --test_tag_filters=nocov --test_output=all
coverage:
bazel coverage //sematic/... --combined_report=lcov --test_tag_filters=cov --test_output=all