File tree Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Expand file tree Collapse file tree 2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,25 @@ Then install the required libraries:
3838poetry install --all-extras
3939```
4040
41+ ### Optional Makefile
42+
43+ If you use ` make ` , we've created shortcuts for running the commands in this document.
44+
45+ | Command | Description |
46+ | ---------| -------------|
47+ | make install | Installs all dependencies using Poetry|
48+ | make redis-start | Starts Redis Stack in a Docker container on ports 6379 and 8001 |
49+ | make redis-stop | Stops the Redis Stack Docker container |
50+ | make format | Runs code formatting and import sorting |
51+ | make check-types | Runs mypy type checking |
52+ | make lint | Runs formatting, import sorting, and type checking |
53+ | make test | Runs tests, excluding those that require API keys and/or remote network calls)|
54+ | make test-all | Runs all tests, including those that require API keys and/or remote network calls)|
55+ | make check | Runs all linting targets and a subset of tests |
56+ | make docs-build | Builds the documentation |
57+ | make docs-serve | Serves the documentation locally |
58+ | make clean | Removes all generated files (cache, coverage, build artifacts, etc.) |
59+
4160### Linting and Tests
4261
4362Check formatting, linting, and typing:
Original file line number Diff line number Diff line change 1+ .PHONY : install format lint test clean redis-start redis-stop check-types integration-test docs-build docs-serve check
2+
3+ install :
4+ poetry install --all-extras
5+
6+ redis-start :
7+ docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
8+
9+ redis-stop :
10+ docker stop redis-stack
11+
12+ format :
13+ poetry run format
14+ poetry run sort-imports
15+
16+ check-types :
17+ poetry run check-mypy
18+
19+ lint : format check-types
20+
21+ test :
22+ SKIP_RERANKERS=true SKIP_VECTORIZERS=true poetry run test-cov
23+
24+ test-all :
25+ poetry run test-cov
26+
27+ check : lint test
28+
29+ docs-build :
30+ poetry run build-docs
31+
32+ docs-serve :
33+ poetry run serve-docs
34+
35+ clean :
36+ find . -type d -name " __pycache__" -exec rm -rf {} +
37+ find . -type d -name " .pytest_cache" -exec rm -rf {} +
38+ find . -type d -name " .mypy_cache" -exec rm -rf {} +
39+ find . -type d -name " .coverage" -delete
40+ find . -type d -name " htmlcov" -exec rm -rf {} +
41+ find . -type d -name " dist" -exec rm -rf {} +
42+ find . -type d -name " build" -exec rm -rf {} +
43+ find . -type d -name " *.egg-info" -exec rm -rf {} +
44+ find . -type d -name " _build" -exec rm -rf {} +
You can’t perform that action at this time.
0 commit comments