-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (46 loc) · 1.66 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
58
59
60
61
62
63
64
65
RUN = poetry run
CODE = src/linkml_data_browser
test: pytest doctest
test-core: pytest-core doctest
test-full: pytest-full doctest
install:
poetry install --no-interaction --all-extras
pytest:
$(RUN) pytest -m "not integration"
pytest-neo4j:
$(RUN) pytest -k only_neo4j
pytest-core:
$(RUN) pytest
pytest-full:
$(RUN) pytest -m ""
integration-tests:
$(RUN) pytest -m integration
all-pytest:
$(RUN) pytest -m "integration or not integration"
install-all:
poetry install -E analytics -E app -E tests -E llm -E mongodb
DOCTEST_DIR = docs src/linkml_store/api src/linkml_store/index src/linkml_store/utils
doctest:
find $(DOCTEST_DIR) -type f \( -name "*.rst" -o -name "*.md" -o -name "*.py" \) -print0 | xargs -0 $(RUN) python -m doctest --option ELLIPSIS --option NORMALIZE_WHITESPACE
NB_DIRS = tutorials how-to
NB_DIRS_EXPANDED = $(patsubst %, docs/%/*.ipynb, $(NB_DIRS))
NOTEBOOKS = $(wildcard ls $(NB_DIRS_EXPANDED))
NB_TGTS = $(patsubst docs/%, tmp/docs/%, $(NOTEBOOKS))
nbtest: $(NB_TGTS)
echo $(NOTEBOOKS)
tmp/docs/%.ipynb: docs/%.ipynb
mkdir -p $(dir $@) && \
$(RUN) papermill --cwd $(dir $<) $< [email protected] && mv [email protected] [email protected] && $(RUN) nbdiff -M -D $< $@
doctest-%:
find $* -type f \( -name "*.py" \) -print0 | xargs -0 $(RUN) python -m doctest --option ELLIPSIS --option NORMALIZE_WHITESPACE
%-doctest: %
$(RUN) python -m doctest --option ELLIPSIS --option NORMALIZE_WHITESPACE $<
api:
poetry run linkml-store-api
app:
$(RUN) streamlit run $(CODE)/app.py
# $(RUN) streamlit run $(CODE)/app.py --logger.level=debug
#apidoc:
# $(RUN) sphinx-apidoc -f -M -o docs/reference/ src/linkml_store/ && cd docs && $(RUN) make html
sphinx-%:
cd docs && $(RUN) make $*