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

Docstrings for all epimodel types and generate_latent_infs plus named arguments for constructors #138

Merged
merged 9 commits into from
Mar 12, 2024

Conversation

SamuelBrand1
Copy link
Collaborator

@SamuelBrand1 SamuelBrand1 commented Mar 11, 2024

This is a draft PR for on going work on documenting AbstractEpiModel subtypes and methods that dispatch on them.

Current focus and decisions:

  • As recommended here I am focusing documentation at the highest/most abstract level. This means that I'm going to give the example usages and most extensive documentation to generate_latent_infs dispatch on generic AbstractEpiModel.
  • I don't think the METHODLIST was useful in our doc template and has been removed.
  • Example usage of a DirectInfections goes beyond just constructing the struct, but also its main usage with generate_latent_infs.
  • Example usage is not a doc test; it has a complicated output that works ok with a spread of testitems. However, a next step could be to combine as per discussed in Doctests with @testitem #48. I've readvised this... simple doctests will be included.

This is aimed at addressing #137 which is part of #35 and #97 . It sets my current expectation of docstrings #135 and #126 .

Extra activity

@SamuelBrand1 SamuelBrand1 linked an issue Mar 11, 2024 that may be closed by this pull request
6 tasks
@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.61%. Comparing base (649567f) to head (cae1144).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #138   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files          13       13           
  Lines         168      168           
=======================================
  Hits          164      164           
  Misses          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

EpiAware/src/abstract-types.jl Outdated Show resolved Hide resolved
EpiAware/src/epimodels/directinfections.jl Outdated Show resolved Hide resolved
@SamuelBrand1 SamuelBrand1 marked this pull request as ready for review March 12, 2024 16:14
@SamuelBrand1 SamuelBrand1 requested a review from seabbs March 12, 2024 16:14
@SamuelBrand1
Copy link
Collaborator Author

I've done everything in the opening description except for the example usage of the EpiModels and generate_latent_infs is not a doctest.

The reason for this is that the pattern of doc testing against an expected result didn't seem to meet what we want from the examples and might lead into complexity around different random seed implementation on different OS etc. An alternative approach which just checks the examples run didn't seem to do anything that our testing CI doesn't do anyway.

Happy to get pushed back on this.

Copy link
Collaborator

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice. It doesn't look like you have implemented field or return information for functions or made use of DocStringExtensions. I think we need at least a clear return field but perhaps in another issue.

@seabbs seabbs enabled auto-merge March 12, 2024 20:12
@seabbs seabbs merged commit 3b2d479 into main Mar 12, 2024
10 checks passed
@seabbs seabbs deleted the 137-docstrings-for-all-epimodel-types branch March 12, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docstrings for all EpiModel types
3 participants