-
Notifications
You must be signed in to change notification settings - Fork 3
Create template DfE app #111
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #111 +/- ##
==========================================
- Coverage 66.27% 58.91% -7.37%
==========================================
Files 14 16 +2
Lines 1278 1492 +214
==========================================
+ Hits 847 879 +32
- Misses 431 613 +182 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
d410e26 to
f2e330b
Compare
rmbielby
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.
Few things to look at. Looks good and seems to work well here, but I think we're going to want to use this work to develop a distinction between template and showcase (where what we currently call the template is really a showcase app and what this creates will be a skeleton template that people can use as more of a blank canvas)
R/create_dashboard.R
Outdated
| ) { | ||
| globalr_script <- paste( | ||
| c( | ||
| "# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", |
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.
for code like this where scripts are being created by pasting the code, it may be better to store the code we're pasting as scripts in the inst folder and read it in using functions like readLines().
the benefit of this would be the ability of viewing the code in proper format when editing it, instead of having to copy it out of the quotes.
| path = path, | ||
| google_analytics_key = google_analytics_key, | ||
| dashboard_url = dashboard_url, | ||
| site_title = site_title, |
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 know this is a WIP so not done yet but wanted to flag that the create_dashboard function throws up an error because site_title isn't found
| #' \dontrun{ | ||
| #' init_server() | ||
| #' } | ||
| init_server <- function( |
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.
same here for readLines()
R/create_dashboard.R
Outdated
| #' \dontrun{ | ||
| #' init_ui() | ||
| #' } | ||
| init_ui <- function(path = ".", team_email = "team.name@education.gov.uk") { |
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.
same here for readLines()
…-analytical-services/dfeshiny into 12-create-template-app-files
Brief overview of changes
This PR introduces a structured setup process for initializing a DFE Shiny Template using a single function, init_template(). It consolidates multiple setup steps, making it easier for developers to get started quickly.
Key Changes
Added init_template(): A function that automates the setup of the Shiny template by calling:
init_app(): Clones the DFE Shiny template repository.
init_commit_hooks(): Installs Git pre-commit hooks.
init_workflow(): Sets up GitHub Actions for deployment.