-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improve querying #264
Improve querying #264
Conversation
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.
Thanks, Olex, this looks good.
I'm wondering if we need to remove the old match_uc_wildcards
test though? It's common practice to test a function by comparing its results to a slower-but-simpler implementation, and I think we don't have unit tests that test the new code on a series of small examples, do we? So why not leave it in.
(Ideally, eventually, we would have unit tests for more transforms using small examples.)
Wow, this PR also improves runtime by around 50%! Do you have any idea what is responsible for the speedup? 🤩 |
Good question! TIMES-NZ runs are responsible for the reported wild improment. It's runtimes have varied a lot before. As far as I can see from the log, the time it takes to run |
The changes in this PR brake the test, because some inputs change. Since we have had the faster version running for a while now, without ever having any issues with it, I thought it was okay just to delete the test. I could try to fix it instead, if you think it is worth keeping it? |
I've timed it: |
Thanks for looking into it! And no, not worth spending too much time on the test. It might be easier to write unit tests once we've converted many transforms into methods of the TimesModel class, perhaps. |
This PR allows other fields (in addition to
process
andcommodity
) to be passed as lists toquery
. It also allows column-wise control of which dataframe entries should be exploded if a comma is found.