-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
63 lines (50 loc) · 1.7 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
PYTHON=python
SSSOM_VERSION_TAG=0.12.0
SSSOM_PY="https://raw.githubusercontent.com/mapping-commons/sssom/$(SSSOM_VERSION_TAG)/src/sssom_schema/datamodel/sssom_schema.py"
SSSOM_YAML="https://raw.githubusercontent.com/mapping-commons/sssom/$(SSSOM_VERSION_TAG)/src/sssom_schema/schema/sssom_schema.yaml"
SSSOM_JSON_SCHEMA="https://raw.githubusercontent.com/mapping-commons/sssom/$(SSSOM_VERSION_TAG)/project/jsonschema/sssom_schema.schema.json"
SSSOM_JSONLD_CONTEXT="https://raw.githubusercontent.com/mapping-commons/sssom/$(SSSOM_VERSION_TAG)/project/jsonld/sssom_schema.context.jsonld"
OBO_EPM_JSON="https://raw.githubusercontent.com/biopragmatics/bioregistry/main/exports/contexts/obo.epm.json"
all: test
EXTS = _datamodel.py .schema.json .context.jsonld .external.context.jsonld .yaml
all_schema: $(patsubst %,schema/sssom%, $(EXTS))
.PHONY: .FORCE
schema/%_datamodel.py: .FORCE
wget $(SSSOM_PY) -O $@
schema/cliquesummary.py: schema/cliquesummary.yaml
gen-py-classes $< > $@
schema/%.schema.json: .FORCE
wget $(SSSOM_JSON_SCHEMA) -O $@
src/sssom/obo.epm.json:
wget $(OBO_EPM_JSON) -O $@
schema/%.context.jsonld: .FORCE
wget $(SSSOM_JSONLD_CONTEXT) -O $@
schema/%.yaml sssom/%.yaml: .FORCE
wget $(SSSOM_YAML) -O $@
test:
pip install --upgrade pip
pip install --upgrade tox
tox
sh tests/tests.sh
deploy-dm: src/sssom/obo.epm.json
install:
pip install .[test,docs]
pypi: test
echo "Uploading to pypi. Make sure you have twine installed.."
python setup.py sdist
twine upload dist/*
.PHONY: lint
lint:
pip install tox
tox -e lint
.PHONY: mypy
mypy:
pip install tox
tox -e mypy
# .PHONY: sphinx
# sphinx:
# cd sphinx &&\
# make clean html
# .PHONY: deploy-docs
# deploy-docs:
# cp -r sphinx/_build/html/* docs/