Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
musica-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MuSICA
R-tools
musica-tools
Commits
732e8f9e
Commit
732e8f9e
authored
1 year ago
by
Rémi Lemaire-Patin
Browse files
Options
Downloads
Patches
Plain Diff
Added option to remove changelog sidebar toc
parent
3e522638
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
R/format_changelog.R
+1
-1
1 addition, 1 deletion
R/format_changelog.R
R/summary.R
+10
-3
10 additions, 3 deletions
R/summary.R
inst/rmarkdown/template_changelog_notoc.Rmd
+29
-0
29 additions, 0 deletions
inst/rmarkdown/template_changelog_notoc.Rmd
vignettes/NEWS.Rmd
+1
-0
1 addition, 0 deletions
vignettes/NEWS.Rmd
with
41 additions
and
4 deletions
R/format_changelog.R
+
1
−
1
View file @
732e8f9e
...
...
@@ -21,7 +21,7 @@
##' library(ncdf4)
##' @export
##'
##' @importFrom stringr str_detect str_subset str_remove str_trim str_split
##' @importFrom stringr str_detect str_subset str_remove str_trim str_split
##' @importFrom lubridate parse_date_time
format_changelog
<-
function
(
filename
)
{
...
...
This diff is collapsed.
Click to expand it.
R/summary.R
+
10
−
3
View file @
732e8f9e
...
...
@@ -265,6 +265,8 @@ summary_pdf <- function(x, filename, template, list_var, add_study_site = FALSE,
##' @param input.file a \code{character}, path to changelog
##' @param out.file a \code{character}, path to output file
##' @param out.dir (default \code{'./'}), a \code{character}, output directory
##' @param sidebar.toc (default \code{FALSE}) whether a sidebar toc should be generated
##' or not
##' @return NULL
##'
##' @family summary
...
...
@@ -278,13 +280,18 @@ summary_pdf <- function(x, filename, template, list_var, add_study_site = FALSE,
summary_changelog
<-
function
(
input.file
,
out.file
=
"./MuSICA_changelog.html"
,
out.dir
=
"./"
)
{
out.dir
=
"./"
,
sidebar.toc
=
FALSE
)
{
parsed_changelog
<-
format_changelog
(
input.file
)
if
(
requireNamespace
(
"rmarkdown"
)
&
requireNamespace
(
"DT"
))
{
file.md
<-
paste0
(
system.file
(
package
=
"musica.tools"
),
"/rmarkdown/"
,
ifelse
(
sidebar.toc
,
"template_changelog.Rmd"
,
"template_changelog_notoc.Rmd"
))
rmarkdown
::
render
(
input
=
paste0
(
system.file
(
package
=
"musica.tools"
),
"/rmarkdown/template_changelog.Rmd"
),
input
=
file.md
,
output_file
=
out.file
,
output_dir
=
out.dir
,
encoding
=
'UTF-8'
...
...
This diff is collapsed.
Click to expand it.
inst/rmarkdown/template_changelog_notoc.Rmd
0 → 100644
+
29
−
0
View file @
732e8f9e
---
title: " "
output:
html_document
date: "`r Sys.Date()`"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, error = FALSE, warning = FALSE)
```
# Version 3
```{r, results = 'asis'}
DT::datatable(parsed_changelog$v3, filter = 'top')
```
# Version 2
```{r, results = 'asis'}
DT::datatable(parsed_changelog$v2, filter = 'top')
```
# Authors
```{r, results = 'asis'}
DT::datatable(parsed_changelog$authors, filter = 'top')
```
This diff is collapsed.
Click to expand it.
vignettes/NEWS.Rmd
+
1
−
0
View file @
732e8f9e
...
...
@@ -13,6 +13,7 @@ vignette: >
### 0.1.3
* Added changelog parser and summary
* Added option to remove changelog sidebar toc
### 0.1.2
* in the shiny app, for heatmap and daily heatmap, facet default to models if possible
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment