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

Document, Test, Repair gempyor.parameters Module #276

Open
TimothyWillard opened this issue Jul 31, 2024 · 6 comments · Fixed by #277 · May be fixed by #414
Open

Document, Test, Repair gempyor.parameters Module #276

TimothyWillard opened this issue Jul 31, 2024 · 6 comments · Fixed by #277 · May be fixed by #414
Assignees
Labels
bug Defects or errors in the code. docstring Relating to in-code documentation. gempyor Concerns the Python core. medium priority Medium priority.

Comments

@TimothyWillard
Copy link
Contributor

Very similar to GH-246 but for the gempyor.parameters module. I'm starting here since this seems to be one of the simpler modules that interact with the configuration files directly. I also suspect that I'll find some bugs/unexpected behaviors along the way (such as the time series data frame being dropped issue I've already discovered) so I'll leave open the possibility of fixing that here. If the repairs get too large in size I'll migrate that to a separate issue.

@TimothyWillard TimothyWillard added bug Defects or errors in the code. documentation Relating to ReadMEs / gitbook / vignettes / etc. gempyor Concerns the Python core. medium priority Medium priority. labels Jul 31, 2024
@TimothyWillard TimothyWillard self-assigned this Jul 31, 2024
@TimothyWillard TimothyWillard linked a pull request Aug 2, 2024 that will close this issue
@TimothyWillard
Copy link
Contributor Author

Methods that need to be removed on the next PR for this issue:

  1. picklable_lamda_alpha
  2. picklable_lamda_sigma
  3. get_pnames2pindex

See #277 (comment).

@TimothyWillard
Copy link
Contributor Author

This was originally a comment in GH-277 in relation to the second insufficient dates ValueError in the constructor of the Parameters class. I'm not sure how to get to the second pathway to this error message.

  1. We subset the read in dataframe to ti to tf so if the dataframe goes from 2024-01-01 through 2024-01-05 and the given date range is 2024-01-02 through 2024-01-06 the dataframe's date range will be subsetted to 2024-01-02 through 2024-01-05 which is a repeat of the above.
  2. Because of the subsetting you can't provide anything except a monotonic increasing sequence of dates, pandas only allows subsetting on ordered date indexes so you'll get a different error.
  3. If you provide a monotonic increasing sequence of dates but 'reverse' ti and tf you get no errors (which I think is also bad) because the slice operation returns an empty dataframe with the right columns & index and the pd.date_range function only creates monotonic increasing sequences and 0 == 0.

If this is dead code then I think we should just remove it, but @saraloo and @jcblemai do y'all have any thoughts?

See: #277 (comment).

@TimothyWillard
Copy link
Contributor Author

An open TODO for this issue that needs to be followed up on is adding descriptions to the examples of the new testing functions added per this comment: #277 (comment). Took care of the immediate one there, but will address others in a follow up.

@emprzy
Copy link
Collaborator

emprzy commented Dec 13, 2024

@TimothyWillard Are you systematically going through all gempyor modules to do documentation, testing, and repairs?

@TimothyWillard
Copy link
Contributor Author

@emprzy Yes, piece by piece. Some of the open ones can be found here: https://github.com/HopkinsIDD/flepiMoP/issues?q=is%3Aissue+is%3Aopen+document+test+. Although, I don't think that covers all of the outstanding work.

@emprzy
Copy link
Collaborator

emprzy commented Dec 16, 2024

@emprzy Yes, piece by piece. Some of the open ones can be found here: https://github.com/HopkinsIDD/flepiMoP/issues?q=is%3Aissue+is%3Aopen+document+test+. Although, I don't think that covers all of the outstanding work.

Let me know if you want any extra hands on this, or if you have specific tasks you'd like to delegate to me! Always happy to (try to) help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects or errors in the code. docstring Relating to in-code documentation. gempyor Concerns the Python core. medium priority Medium priority.
Projects
None yet
3 participants