Skip to content
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

feat: Add new endpoint for ingestion status #181

Merged

Conversation

gjreda
Copy link
Collaborator

@gjreda gjreda commented Jun 21, 2023

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
Copy link

codecov bot commented Jun 21, 2023

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

python/sidecar/typing.py Outdated Show resolved Hide resolved
@gjreda gjreda marked this pull request as ready for review June 22, 2023 21:22
@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
Copy link
Collaborator

@cguedes cguedes left a comment

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

src/api/types.ts Outdated Show resolved Hide resolved
python/main.py Outdated Show resolved Hide resolved
@gjreda gjreda requested a review from cguedes June 23, 2023 13:40
@cguedes cguedes merged commit 30cd1b5 into main Jun 23, 2023
11 checks passed
@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