-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add pdf ingestion lane #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
pmoves/contracts/schemas/ingest/document-ready.v1.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "title": "Ingest Document Ready", | ||
| "type": "object", | ||
| "required": [ | ||
| "doc_id", | ||
| "namespace", | ||
| "uri", | ||
| "chunk_count" | ||
| ], | ||
| "properties": { | ||
| "doc_id": { | ||
| "type": "string" | ||
| }, | ||
| "namespace": { | ||
| "type": "string" | ||
| }, | ||
| "uri": { | ||
| "type": "string" | ||
| }, | ||
| "chunk_count": { | ||
| "type": "integer", | ||
| "minimum": 0 | ||
| }, | ||
| "file_id": { | ||
| "type": "string" | ||
| }, | ||
| "title": { | ||
| "type": ["string", "null"] | ||
| }, | ||
| "checksum": { | ||
| "type": "string" | ||
| }, | ||
| "size_bytes": { | ||
| "type": "integer", | ||
| "minimum": 0 | ||
| }, | ||
| "preview": { | ||
| "type": "string" | ||
| }, | ||
| "meta": { | ||
| "type": "object" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| FROM python:3.11-slim | ||
| WORKDIR /app | ||
| ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PYTHONPATH=/app | ||
| RUN pip install --no-cache-dir --upgrade pip | ||
| COPY services/pdf-ingest/requirements.txt ./ | ||
| RUN pip install --no-cache-dir -r requirements.txt | ||
| COPY libs /app/libs | ||
| COPY services/common /app/services/common | ||
| COPY contracts /app/contracts | ||
| COPY services/pdf-ingest/ /app/ | ||
| ENV PMOVES_CONTRACTS_DIR=/app/contracts | ||
| EXPOSE 8092 | ||
| CMD ["uvicorn","app:app","--host","0.0.0.0","--port","8092"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Expose pdf-ingest on host port already used by publisher-discord
The new
pdf-ingestservice mapsports: ["8092:8092"]whilepublisher-discordalready binds the same host port in the orchestration profile. Bringing up both profiles together (docker compose --profile orchestration up) will fail with a port-collision error and neither service will start. Consider assigning a different host port or making one of the bindings optional to avoid blocking the compose stack.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
pdf-ingestservice’s host port mapping to 8095 and aligned the ingestion documentation with the new endpoint so it no longer conflicts withpublisher-discord. pmoves/docker-compose.ymlL176-L189 pmoves/docs/DATA_IMPORT.mdL30-L41smoke-pdfMakefile target at the new pdf-ingest host port for both verification steps. pmoves/MakefileL60-L76Testing
python -m compileall pmoves/services/pdf-ingestView task →
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex fix comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
smoke-pdfMakefile target to call the pdf-ingest endpoint on the new host port throughout the smoke flow. pmoves/MakefileL60-L76Testing
View task →