Skip to content

feat: Add new endpoint for ingestion status#181

Merged
cguedes merged 19 commits into
mainfrom
113-ability-to-display-reference-ingestion-status-new-endpoint
Jun 23, 2023
Merged

feat: Add new endpoint for ingestion status#181
cguedes merged 19 commits into
mainfrom
113-ability-to-display-reference-ingestion-status-new-endpoint

Conversation

@gjreda

@gjreda gjreda commented Jun 21, 2023

Copy link
Copy Markdown
Collaborator

fixes #113

Example response below. If an unhandled exception is raised when calling this endpoint, we'll return "status": "error" with an empty list of statuses.

❯ poetry run python main.py ingest --status | jq
{
  "status": "ok",
  "reference_statuses": [
    {
      "source_filename": "A Few Useful Things to Know about Machine Learning.pdf",
      "status": "complete"
    },
    {
      "source_filename": "2301.10140.pdf",
      "status": "pending"
    },
    {
      "source_filename": "grobid-fails.pdf",
      "status": "failure"
    }
  ]
}

@codecov

codecov Bot commented Jun 21, 2023

Copy link
Copy Markdown

Codecov Report

Merging #181 (4b51bbe) into main (26e7617) will increase coverage by 0.37%.
The diff coverage is 91.42%.

@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   66.53%   66.91%   +0.37%     
==========================================
  Files          87       87              
  Lines        4429     4498      +69     
  Branches      331      331              
==========================================
+ Hits         2947     3010      +63     
- Misses       1465     1471       +6     
  Partials       17       17              
Impacted Files Coverage Δ
python/main.py 0.00% <0.00%> (ø)
python/sidecar/cli.py 0.00% <0.00%> (ø)
python/sidecar/ingest.py 90.95% <94.00%> (+0.89%) ⬆️
python/sidecar/typing.py 96.66% <100.00%> (+1.31%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment thread python/sidecar/typing.py Outdated
@gjreda gjreda marked this pull request as ready for review June 22, 2023 21:22
Comment thread python/sidecar/ingest.py
Comment thread scripts/codegen.sh
@gjreda gjreda requested review from cguedes and sehyod June 22, 2023 21:47
@gjreda gjreda changed the title Add new endpoint for ingestion status feat: Add new endpoint for ingestion status Jun 22, 2023

@cguedes cguedes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Update README
  • Create a new command to be able to set the correct return type (CliCommands are per command)
  • Try to make status field mandatory

Comment thread src/api/types.ts Outdated
Comment thread python/main.py Outdated
@gjreda gjreda requested a review from cguedes June 23, 2023 13:40
@cguedes cguedes merged commit 30cd1b5 into main Jun 23, 2023
@cguedes cguedes deleted the 113-ability-to-display-reference-ingestion-status-new-endpoint branch June 23, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to display Reference ingestion status

2 participants