epiverse-trace / epiparameter

R package with library of epidemiological parameters for infectious diseases and functions and classes for working with parameters
https://epiverse-trace.github.io/epiparameter
Other
33 stars 11 forks source link

render-readme.yml cannot handle updating figures #65

Closed joshwlambert closed 1 year ago

Bisaloo commented 2 years ago

We are touching the limits of automation here. I could easily update the workflow to add new figures but it's not straightforward to automatically delete unnecessary figures that should be deleted :thinking:.

joshwlambert commented 2 years ago

Updating the figures (and potentially deleting them) will not be done frequently, so we can render the .md locally before pushing.

Would adding git add man/figures/ below git add README.md not add or delete any figures being changed in the README?

Bisaloo commented 2 years ago

It would add new figures and update existing ones but not delete unnecessary ones.

For example, if you remove the instructions to create & display a figure from the README, the old png file would still remain in man/figures/.

joshwlambert commented 2 years ago

Had a quick look to see if anyone else had solved this issue (e.g. here) but couldn't find anything. Are we happy to keep the yml as is and render locally when changing/deleting figures?

Bisaloo commented 2 years ago

Please submit a PR to add man/figures/ alongside README.md here and in the packagetemplate repo. It's always better than what we have at the moment but we should keep in mind that we may have to manually clean man/figures/ sometimes.

Note that both man/figures/ and README can be added in a single git add call, no need for 2 separate lines.

joshwlambert commented 1 year ago

The issue of adding figures has been tackled here and also in epiverse-trace/packagetemplate@cabaae6591bd562b123d486d38a6e3582706fc05.

@Bisaloo shall we close this issue for now and revisit possibilities to automate deleting figures in the future?

Bisaloo commented 1 year ago

As far as I know, the new workflow should also handle deletions so I think this issue can be closed.