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

Display progress when running with Docker #6

Open
rhigman opened this issue Sep 20, 2023 · 0 comments
Open

Display progress when running with Docker #6

rhigman opened this issue Sep 20, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@rhigman
Copy link
Member

rhigman commented Sep 20, 2023

When running obp-loader with Python, progress bars are displayed to show the outcome of each subprocess executed, e.g.:

$ python3 obp-loader.py 10.11647/obp.XXXX
Executing: `python3 main.py /tmp/XXXX -c bibliography-first-para bibliography-other-para -i https://doi.org/10.11647/obp.XXXX.01`
Extract the citations |################################| 2/2
Process the citations |################################| 38/38
Write to repository   |################################| 38/38
Executing: `python3 main.py /tmp/XXXX -c bibliography-first-para bibliography-other-para -i https://doi.org/10.11647/obp.XXXX.02`
Extract the citations |################################| 2/2
Process the citations |################################| 20/20
Write to repository   |################################| 20/20

When running with Docker, the subprocesses are silent:

$ docker run --rm openbookpublishers/cit-ex-obp-loader obp-loader.py 10.11647/obp.XXXX
Executing: `python3 main.py /tmp/XXXX -c bibliography-first-para bibliography-other-para -i https://doi.org/10.11647/obp.XXXX.01`
Executing: `python3 main.py /tmp/XXXX -c bibliography-first-para bibliography-other-para -i https://doi.org/10.11647/obp.XXXX.02`

This makes it difficult to tell whether any citations have actually been found and/or written to Thoth (in the event that there are no citations, the progress bars aren't shown within Python because they're triggered inside for loops).

(Note that when using --dry-run, the progress bars also don't appear within Python. Unclear whether this is a separate bug.)

@rhigman rhigman added the enhancement New feature or request label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant