Rationalize optional dependencies vs dependency groups
Establish clear separation between user-facing optional dependencies and developer-only dependency groups: **Optional Dependencies (user features):** - watcher: File watching service for batch processing - webservice: Streamlit-based web UI - Installable via: uv sync --extra <name> or pip install ocrmypdf[name] **Dependency Groups (developer tools):** - test: Testing infrastructure (merged from test + extended_test) - docs: Documentation building tools - streamlit-dev: Enhanced Streamlit development tools - dev: General development tools (mypy, ipykernel) - Installable via: uv sync --group <name> (uv only, NOT pip) Breaking changes for developers: - pip install -e .[test] no longer works → use uv sync --group test - pip install -e .[docs] no longer works → use uv sync --group docs - pip install -e .[extended_test] removed → merged into test group No breaking changes for end users: - pip install ocrmypdf[watcher] still works - pip install ocrmypdf[webservice] still works Updated: - CI/CD workflows to use uv sync --group test - Docker images to exclude test dependencies - Documentation to recommend uv with pip as fallback - pyproject.toml with clear comments explaining both systems
This commit is contained in:
+1
-1
@@ -55,7 +55,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
COPY . /app
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen \
|
||||
--extra test --extra webservice --extra watcher --no-dev \
|
||||
--extra webservice --extra watcher --no-dev \
|
||||
--no-install-package pyarrow
|
||||
|
||||
FROM base
|
||||
|
||||
@@ -39,7 +39,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
COPY . /app
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen \
|
||||
--extra test --extra webservice --extra watcher --no-dev \
|
||||
--extra webservice --extra watcher --no-dev \
|
||||
--no-install-package pyarrow
|
||||
|
||||
FROM base
|
||||
|
||||
Reference in New Issue
Block a user