Commit d1867625 authored by Timothy Keebler's avatar Timothy Keebler
Browse files

removed a +1 from _urls_omni_hires month to allow pulling December data (there is no month 13)

parent 6f0f40dc
......@@ -227,7 +227,7 @@ def _urls_omni_hires(time_from, time_to):
for date in rrule.rrule(rrule.MONTHLY,
suffix = 'omni_min'
suffix += str(date.year) + str(date.month).zfill(2)
  • @tkeebler are you sure this will pull the last month (December) if the +1 is not there?

  • Yes, it will create the proper list of URLs because of the hard-coded day. I have tested it locally with print statements and it works. By creating the list of URLs, this alleviates the difficulties from before caused by making a URL each time. The more I think about this, the more I feel that it would be easier to just add one day to the time_to input at the start of the script rather than fix the off-by-one error at every location. But, I am afraid of messing up other people's existing usage.

  • Changing the inputs is mutating the input which is considered bad practice because of the reason you mentioned. Immutable code is always great! Thank you for this, it has been approved.

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment