-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathJustfile
63 lines (45 loc) · 1.38 KB
/
Justfile
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
63
local_install:
python -m pip install -e .
_clear:
rm -rf __pycache__ dist build latch.egg-info
_build:
python3 setup.py sdist bdist_wheel
_upload:
twine upload dist/*
build: _clear _build
publish: _clear _build _upload _clear
requirements:
pip-compile requirements.in
doc-requirements:
pip-compile doc-requirements.in
dev-requirements:
pip-compile dev-requirements.in
build-api-docs:
rm docs/source/api/*
sphinx-apidoc \
--force \
-o docs/source/api/ . \
'latch_cli/services/init/*/**' \
'latch_cli/snakemake' \
'setup.py' \
'tests/*'
build-docs:
make --directory docs html
test:
export TEST_TOKEN=$(cat ~/.latch/token) &&\
pytest -s tests
#
# Docs build.
git_hash := `git rev-parse --short=4 HEAD`
git_branch := `inp=$(git rev-parse --abbrev-ref HEAD); echo "${inp//\//--}"`
docker_image_name := "sdk-docs"
docker_registry := "812206152185.dkr.ecr.us-west-2.amazonaws.com"
docker_image_version := docker_image_name + "-" + git_hash + "-" + git_branch
docker_image_full := docker_registry + "/" + docker_image_name + ":" + docker_image_version
@docker-login:
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin {{docker_registry}}
@docker-build: build
docker build -t {{docker_image_full}} . -f Dockerfile-docs
@docker-push:
docker push {{docker_image_full}}
@dbnp: build-docs docker-build docker-push