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

Add some examples for documentation #94

Closed
wants to merge 27 commits into from

Conversation

SamuelBrand1
Copy link
Collaborator

This PR builds on #93 with the goal of adding some example usage/or underlying maths of EpiAware.

Main addition

Three .jl scripts which were in a subdirectory of /test are now in the doc/example subdir. These were rendered to Documenter flavour markdown by Literate.markdown (not a dep of this package) in the doc/src/man folder. This means that the blocks tagged @example are run when documenter renders md to HTML whilst creating the documentation.

These have been added as links in the sidebar of the main doc page.

Minor changes/sharp bits

  • Julia code is run from the EpiAware/doc environment in the build process. The main usage expects a package available from the Julia registry; the alternative as suggested by Documenter guide was to include src in the LOAD_PATH environmental variable. This meant adding all the deps of EpiAware to the EpiAware/doc Project.toml which "felt" clunky but works.
  • Commented out linkcheck. This caused an error, which debugging should be an issue. I think this is because we have placeholder links in the documentation.
  • As suggested in the Documenter guide I changed the formal kwarg in makedocs to:
format = Documenter.HTML(
        prettyurls = get(ENV, "CI", nothing) == "true"
    )

This means that local rendering still has active links when view from your browser.

@codecov-commenter
Copy link

codecov-commenter commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.74%. Comparing base (b551042) to head (788ba49).

Additional details and impacted files
@@               Coverage Diff               @@
##           add-documenter      #94   +/-   ##
===============================================
  Coverage           97.74%   97.74%           
===============================================
  Files                   6        6           
  Lines                 133      133           
===============================================
  Hits                  130      130           
  Misses                  3        3           

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

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.

Overall this looks very nice. One request for clarification and also are you manually creating the examples.jl?

I assume we actually want those to be generated in the github action vs committed or in make.jl?

EpiAware/docs/examples/discretized_pmfs.jl Outdated Show resolved Hide resolved
EpiAware/docs/make.jl Outdated Show resolved Hide resolved
Base automatically changed from add-documenter to main March 1, 2024 11:53
@seabbs
Copy link
Collaborator

seabbs commented Mar 1, 2024

Give me a ping when this is ready for review

@seabbs
Copy link
Collaborator

seabbs commented Mar 5, 2024

Do you want some support to unstick this @SamuelBrand1? Note the discussion in #99 that we likely want to deal with that here.

@SamuelBrand1
Copy link
Collaborator Author

This PR suffered from @seabbs and myself trying to fix CI issues simultaneously and is being closed in favour of working #109

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.

3 participants