Skip to content
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

Large code block in dscim.utils.utils.model_outputs will never run #15

Closed
brews opened this issue Sep 15, 2022 · 3 comments · Fixed by #53
Closed

Large code block in dscim.utils.utils.model_outputs will never run #15

brews opened this issue Sep 15, 2022 · 3 comments · Fixed by #53
Assignees
Labels
bug Something isn't working

Comments

@brews
Copy link
Member

brews commented Sep 15, 2022

There is a large block of code in dscim.utils.utils.model_outputs() when using "time_trends" extrapolation that doesn't run because it is behind a raised NotImplementedError. This chunk of code feels like it might just have bad indentation...? I'm not sure what the desired behavior is.

The NotImplementedError blocking the rest of the function is here:

raise NotImplementedError(

@brews brews added bug Something isn't working help wanted Extra attention is needed labels Sep 15, 2022
@brews
Copy link
Member Author

brews commented Sep 16, 2022

To avoid problems, I'm closing #42 and consolidating the issue here.

dscim.utils.utils.model_outputs() takes arguments extrap_formula and extrap_year but these appear to be unused. Similarly, extrap_exog is defined a couple of times but unused in the code because of the above block.

In short: If we remove this never-running block of code, we should also clean up extrap_formula, extrap_year, and extrap_exog.

@kemccusker
Copy link
Member

kemccusker commented Sep 16, 2022

I think that

if extrapolation_type == "time_trends":

is checking a possibly unused or outdated method option ("time_trends") that we played around with in the early days of dscim and then scrapped. But didn't remove the option here. Would need to confirm that by doing some archeology before deleting the code-block.

@brews
Copy link
Member Author

brews commented Jul 20, 2023

This closed with #53.

@brews brews closed this as completed Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants