Skip to content

add count/exist/quiet options to printProcessQueue - #88

Merged
dnadeau-lanl merged 4 commits into
spacepy:masterfrom
dnadeau-lanl:printProcessQueue
Nov 16, 2021
Merged

dnadeau-lanl merged 4 commits into
spacepy:masterfrom
dnadeau-lanl:printProcessQueue

Conversation

@dnadeau-lanl

@dnadeau-lanl dnadeau-lanl commented Sep 7, 2021 •

Copy link
Copy Markdown
Contributor

PR Checklist

Adding options to printProcessQueue as we talked about. Closes #87.

  • exist return 0 if there are files in processQueue otherwise 0
  • count return the number of files in the processing queue.
  • quiet option des not print any message on the screen.
  • Pull request has descriptive title
  • Pull request gives overview of changes
  • New code has inline comments where necessary
  • (N/A) Any new modules, functions or classes have docstrings consistent with dbprocessing style
  • Major new functionality has appropriate Sphinx documentation
  • Added an entry to release notes if fixing a major bug or providing a major new feature
  • (see below) New features and bug fixes should have unit tests
  • Relevant issues are linked in the description (use Closes # if this PR closes the issue, or some other reference, such as See # if it is related in some other way)

Because this script isn't incorporated into unit tests yet, this was hand-tested.

@jtniehof

Copy link
Copy Markdown
Member

This is on my radar, just need to carve out some time....

@jtniehof jtniehof left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's some stuff to clean up...also the new arguments (and the return code weirdnesses) need to be documented in scripts.rst.

Comment thread scripts/deleteAllDBFiles.py Resolved
Comment thread scripts/printProcessQueue.py Resolved
Comment thread scripts/printProcessQueue.py Resolved
Comment thread scripts/printProcessQueue.py Resolved
Comment thread scripts/printProcessQueue.py Resolved
@jtniehof

jtniehof commented Nov 8, 2021

Copy link
Copy Markdown
Member

Failure here is unrelated to changes, looking into it.

 * Use the standard output (list of entries) even if using exist or
   count to set the return value
 * Make quiet work for all cases
 * When using count, make 255 the max so it doesn't roll over

@jtniehof jtniehof left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've made the changes to address my comments. You can merge if you're happy with this (or just comment that you're good and I'll do the merge.)

@dnadeau-lanl
dnadeau-lanl merged commit 5e6e413 into spacepy:master Nov 16, 2021
@dnadeau-lanl
dnadeau-lanl deleted the printProcessQueue branch November 16, 2021 23:12
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.

Use exit code of printProcessQueue to indicate if the queue is empty

2 participants