Skip to content

Commit

Permalink
Initialise shiny project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pixup1 committed Nov 30, 2024
1 parent 17e4abf commit 7625b95
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 1 deletion.
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Imports:
shiny (>= 1.9.1),
bslib (>= 0.8.0)
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(run)
import(bslib)
import(shiny)
6 changes: 6 additions & 0 deletions R/ADSPlanner-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is used to define the imports that will be updated by roxygen2 when running `devtools::document()`.

#' @import shiny
#' @import bslib
NULL
#> NULL
1 change: 0 additions & 1 deletion R/main.R

This file was deleted.

12 changes: 12 additions & 0 deletions R/run.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
library(shiny)

source("R/ui.R")
source("R/server.R")

#' @export
run <- function() {
runApp(shinyApp(
ui = ui,
server = server
))
}
10 changes: 10 additions & 0 deletions R/server.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
library(shiny)

server <- function(input, output) {
output$download <- downloadHandler(
filename = "affectations.xlsx",
content = function(file) {
write("Not implemented yet.", file)
}
)
}
26 changes: 26 additions & 0 deletions R/ui.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
library(bslib)

ui <- page_sidebar(
title = "ADS-Planner",
sidebar = sidebar(
width = 350,
card(
fileInput("file", "Résultats du sondage", accept = c(".xlsx", ".ods"), buttonLabel = "Parcourir...", placeholder = "Aucun fichier", multiple = FALSE),
),
downloadButton("download", "Télécharger affectations"),
),
navset_tab(
nav_panel(
"Visualisation des choix",
"Not implemented yet.",
),
nav_panel(
"Sans réponse",
"Not implemented yet.",
),
nav_panel(
"Affectations",
"Not implemented yet.",
),
),
)
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

A tool to distribute INSA students into ADS sessions.

## Installing & Running

To install (or update) the ADS-Planner R package, simply clone this repo, start an interactive R session from the root folder and run :

```R
install.packages(".",repos=NULL)
```

And to run the app :

```R
ADSPlanner::run()
```

The web interface should open automatically. If it doesn't, you can open the link next to `Browsing` in the command output.

For development purposes, the app can be started more simply by running `shiny::runApp("R")` from the root of the repo.

## ADS

ADS (Action Découverte des Spécialités) is a teaching module aimed at presenting the specialties of the engineering program at INSA to students in the preparatory program. This module consists of three sessions. Each student is asked to rank the specialties by preference to assign them to the three half-day sessions.
Expand Down

0 comments on commit 7625b95

Please sign in to comment.