-
Notifications
You must be signed in to change notification settings - Fork 8
mrc-3665 way for orderly web to control demo data #320
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #320 +/- ##
=======================================
Coverage 99.95% 99.95%
=======================================
Files 41 41
Lines 4524 4535 +11
=======================================
+ Hits 4522 4533 +11
Misses 2 2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
| @@ -0,0 +1,9 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the existing create_orderly_demo script is still in use by things other than OW (e.g. for testing in this repo), so I've left that as is and just added a new one for the usage we want in OW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like create_orderly_demo script is used in test set in many places, like montagu-proxy, montagu-reporting-api, montagu-webapps. If we are not using create_orderly_demo in orderly-web any more then possibly worth backing out commit d7922bd from this PR to avoid potentially breaking the other components which use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok yep, let's do that.
r-ash
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New function for running git example from source looks good. Small comment about the changes to create_orderly_demo script.
It would be nice to review all the setup functions in R/testing.R at some point as they have all expanded since first being added and I think probably have some overlap in functionality. The differences between them are quite confusing. Can see that is out of scope for what you want to do in this ticket though
| @@ -0,0 +1,9 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like create_orderly_demo script is used in test set in many places, like montagu-proxy, montagu-reporting-api, montagu-webapps. If we are not using create_orderly_demo in orderly-web any more then possibly worth backing out commit d7922bd from this PR to avoid potentially breaking the other components which use it
Agree that adding a further function feels like adding more complication on top of an already confusing collection of code. I'd be happy to have a go at refactoring the whole file in another ticket. |
|
Ok, I've backed out the previous change @r-ash had made, and this just adds the new entrypoint. |
|
I'm a little puzzled as to why the windows R-CMD-check is failing, given that it seems to be passing for other branches... |
|
quite likely it's failing because openssl has been updated on cran, GHA is trying and failing to install it from source - probably something in that vignette is using openssl indirectly |
|
indeed that is what's going on: |
richfitz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry about the windows failing build, this is affecting lots of things atm and it's very unlikely this set of changes will break that build specifically
| } | ||
|
|
||
|
|
||
| prepare_git_example_from_source <- function(source_path, path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this within the testthat tests please?
| @@ -0,0 +1,9 @@ | |||
| #!/bin/sh | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I think it's nicer to avoid using extensions on scripts as then we can reimplement them in another language later without having to update uses. Your editor should pick up syntax highlighting properly based on the first line
There is a fix for this in #321 https://github.com/vimc/orderly/pull/321/files#diff-9c940e8ad2b7bc4c26ec3da57b94bc00e73e2166cfed689da51a4c59bcc0a310R80 |
| RUN R CMD INSTALL /orderly && \ | ||
| Rscript -e 'orderly:::write_script("/usr/bin")' && \ | ||
| cp /orderly/inst/create_orderly_demo.sh /usr/bin/ && \ | ||
| cp /orderly/inst/run_orderly_demo /usr/bin/ && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left the old script create_orderly_demo.sh with the extension, since it could be in use by other repos
|
Any idea why all GHA checks suddenly stopped running here? Edit: these ones do look like they're running but not posting back - https://github.com/vimc/orderly/actions/runs/3290165552 |
|
Huh, weird. Also looks like there are some strange test failures, will investigate. |
This adds a new entrypoint that exposes the function for generating an orderly demo based on a source directory and a
demo.ymlfile. See this in use in OrderlyWeb: vimc/orderly-web#479R/testing.Ris a bit of a tangle tbh, but rather than unpicking it I've just added a new function for what we want in OW.