forked from apify/apify-sdk-python
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (36 loc) · 1.33 KB
/
Makefile
File metadata and controls
53 lines (36 loc) · 1.33 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
.PHONY: clean install-dev build publish twine-check lint unit-tests integration-tests type-check check-code format check-version-availability check-changelog-entry build-api-reference
DIRS_WITH_CODE = src tests scripts
# This is default for local testing, but GitHub workflows override it to a higher value in CI
INTEGRATION_TESTS_CONCURRENCY = 1
clean:
rm -rf build dist .mypy_cache .pytest_cache src/*.egg-info __pycache__
install-dev:
python3 -m pip install --upgrade pip
pip install --no-cache-dir -e ".[dev,scrapy]"
pre-commit install
build:
python3 -m build
publish:
python3 -m twine upload dist/*
twine-check:
python3 -m twine check dist/*
lint:
python3 -m ruff check $(DIRS_WITH_CODE)
unit-tests:
python3 -m pytest -n auto -ra tests/unit --cov=src/apify
unit-tests-cov:
python3 -m pytest -n auto -ra tests/unit --cov=src/apify --cov-report=html
integration-tests:
python3 -m pytest -n $(INTEGRATION_TESTS_CONCURRENCY) -ra tests/integration
type-check:
python3 -m mypy $(DIRS_WITH_CODE)
check-code: lint type-check unit-tests
format:
python3 -m ruff check --fix $(DIRS_WITH_CODE)
python3 -m ruff format $(DIRS_WITH_CODE)
check-version-availability:
python3 scripts/check_version_availability.py
check-changelog-entry:
python3 scripts/check_version_in_changelog.py
build-api-reference:
cd website && ./build_api_reference.sh