-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add timezone grid caching to CLI (#17) #21
Conversation
This isn't intentional, and is probably not desired either! The behaviour is controlled by these defaults: ShadowFinder/src/shadowfinder/shadowfinder.py Lines 36 to 40 in e5f636b
It would be good to understand why this is happening |
I've just checked a lot more thoroughly (before, I was just looking at files changed, now I ran it through diffchecker.com) — the only difference is a trailing newline is removed. Sorry about that! I've also updated the tests so the reflect the new output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it looks good!
One small thing, find_sun
needs updating to include the grid argument.
No worries at all, better for it to be a newline than an entirely different set of points! So thank you for noticing the difference and double checking! |
...oops. I've fixed it now, I think. Would it be a good idea to add the modified |
bump. Anything else that needs to be fixed? |
This all looks good - apologies about the delay, and thanks for the bump! 🙌 |
I've gone ahead and implemented the changes described in Galen's comment. The only notable change in behaviour is that now, by default,
find_sun
andfind
will attempt to read fromtimezone_grid.json
(even if no--grid
argument is passed). If this is unwanted, I can change it back, I just thought it would be a good default.While testing, I found that
finder.generate_timezone_grid()
generates a JSON file that doesn't match thetimezone_grid.json
currently in this repo... is that intentional? Also,shadowfinder generate_timezone_grid
will overwrite the file it's given — should that be changed?