Skip to content

Display progress when running with Docker #6

@rhigman

Description

@rhigman

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions