Skip to content

Fix _getRequiredProducts/getInputProductID on old DB (Closes #20) - #21

Merged
balarsen merged 1 commit into
spacepy:masterfrom
jtniehof:yesterday_tomorrow_old_db
Sep 1, 2020
Merged

balarsen merged 1 commit into
spacepy:masterfrom
jtniehof:yesterday_tomorrow_old_db

Conversation

@jtniehof

@jtniehof jtniehof commented Sep 1, 2020

Copy link
Copy Markdown
Member

_getRequiredProducts called getInputProductID with a particular kwarg forcing return of the yesterday-count and tomorrow-count, which aren't in the old database. This PR tests the call with this kwarg and fixes on old databases, returning 0 for both yesterday and tomorrow, so downstream code should work just as it does for newer databases. Closes #20.

PR Checklist

  • 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
  • (N/A) Major new functionality has appropriate Sphinx documentation
  • (N/A) Added an entry to CHANGELOG if fixing a major bug or providing a major new feature
  • New features and bug fixes should have unit tests
  • Relevant issues are linked in the description (e.g. See issue # or Closes #)

@jtniehof

jtniehof commented Sep 1, 2020

Copy link
Copy Markdown
Member Author

I'd consider this an urgent fix where the PR doesn't have to stay open just to allow for commenting.

@balarsen balarsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice solution, the expression is a lot cleaner than this could be done.

@balarsen
balarsen merged commit 07f3e3a into spacepy:master Sep 1, 2020
@jtniehof
jtniehof deleted the yesterday_tomorrow_old_db branch September 2, 2020 17:02
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.

'Productprocesslink' has no attribute 'yesterday', old database

2 participants