An agentic book recommender system
Build the Docker image:
docker build -t agentic-librarian .Run the container:
docker run -it agentic-librarianThis project uses uv for fast dependency management. Dependencies are defined in pyproject.toml.
To install dependencies:
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install project dependencies
uv pip install -e .
# Install development dependencies
uv pip install -e ".[dev]"The development environment includes the following packages:
- ML/Data Science: mlflow, pandas, scikit-learn, PyTorch
- API/Web: requests, google-api-python-client, firecrawl-py
- Audio/Books: audible
- LLM: openai, langchain, langchain-openai
This project uses pre-commit to ensure code quality and consistency. The following checks are run on every commit:
- Linting & Formatting: Handled by ruff (fastest Python linter/formatter).
- Static Analysis: Standard
pre-commit-hooks(whitespace, YAML, etc.). - Tests:
pytestis run on a subset of fast, non-API-dependent tests.
-
Install pre-commit:
pip install pre-commit
-
Install the git hooks:
pre-commit install
-
(Optional) Run on all files:
pre-commit run --all-files
- Fast Tests: Run automatically on commit.
- Slow/API Tests: Skipped in
pre-committo maintain speed. Mark these in code using:@pytest.mark.api_dependent def test_something_with_api(): ... @pytest.mark.slow def test_something_slow(): ...
- Manual Test Execution:
# Run all tests pytest # Run only fast tests (what pre-commit runs) pytest -m "not api_dependent and not slow"