Skip to content

Conversation

@oadetayo
Copy link
Contributor

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.

@codecov
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 22.70916% with 194 lines in your changes missing coverage. Please review.

Project coverage is 58.91%. Comparing base (d034b5c) to head (73da3c4).

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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d034b5c...73da3c4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rmbielby rmbielby force-pushed the 12-create-template-app-files branch from d410e26 to f2e330b Compare March 17, 2025 15:55
Copy link
Contributor

@rmbielby rmbielby left a 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)

@oadetayo oadetayo requested a review from rmbielby March 31, 2025 15:32
) {
globalr_script <- paste(
c(
"# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
Copy link
Contributor

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,
Copy link
Contributor

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(
Copy link
Contributor

Choose a reason for hiding this comment

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

same here for readLines()

#' \dontrun{
#' init_ui()
#' }
init_ui <- function(path = ".", team_email = "team.name@education.gov.uk") {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here for readLines()

@rmbielby rmbielby changed the title add functions to createe template files Create template DfE app Apr 30, 2025
@cjrace cjrace marked this pull request as draft October 17, 2025 13:37
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