-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (43 loc) · 1.86 KB
/
Makefile
File metadata and controls
58 lines (43 loc) · 1.86 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
ELASTIC_TAG=9.4.1
all: clean install test
install:
poetry install --with dev --all-extras
lint:
poetry run flake8 openaleph_search --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 openaleph_search --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pre-commit:
poetry run pre-commit install
poetry run pre-commit run -a
typecheck:
poetry run mypy --strict openaleph_search
test:
poetry run pytest -v --capture=sys --cov=openaleph_search --cov-report lcov
build:
poetry run build
clean:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
documentation:
zensical build
aws --profile nbg1 --endpoint-url https://s3.investigativedata.org s3 sync ./site s3://openaleph.org/docs/lib/openaleph-search
SYNONYMS_URL=https://raw.githubusercontent.com/opensanctions/rigour/refs/heads/main/rust/data/names/person_names.txt
SYNONYMS_FILE=contrib/person_name_synonyms.txt
synonyms:
@mkdir -p contrib
curl -s "$(SYNONYMS_URL)" | sed 's/ => .*//' > $(SYNONYMS_FILE)
@echo "Compiled $$(wc -l < $(SYNONYMS_FILE)) synonym rules to $(SYNONYMS_FILE)"
elastic-build:
docker build --target full -t ghcr.io/openaleph/elasticsearch:$(ELASTIC_TAG) .
elastic-build-test:
docker build --target test -t ghcr.io/openaleph/elasticsearch:$(ELASTIC_TAG)-test .
elastic: elastic-build
docker run -p 9200:9200 -ti -v ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml ghcr.io/openaleph/elasticsearch:$(ELASTIC_TAG)
elastic-test: elastic-build-test
docker run -p 9200:9200 -ti -v ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml ghcr.io/openaleph/elasticsearch:$(ELASTIC_TAG)-test