writing-reusable-code

Writing Reusable and Modular Code

https://github.com/uf-repro/writing-reusable-code

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

codesmells functions reproducibility styleguide teaching-materials workshop
Last synced: 6 months ago · JSON representation

Repository

Writing Reusable and Modular Code

Basic Info
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
codesmells functions reproducibility styleguide teaching-materials workshop
Created about 5 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Zenodo

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

```{r, include = FALSE}

lesson_title <- "Writing Reusable and Modular Code"
lesson_description <- "This workshop introduces attendees to the principles of writing 'clean' code, that is easier to read, maintain, and expand. Attendees will learn about organizing complex programming scripts into modular functions, writing effective documentation, and habits to improve code robustness and reusability.

*Attendees will be expected to have basic familiarity with programming, such as experience writing simple scripts or recent attendance at a Carpentries workshop* - https://www.uf-carpentries.org/"
lesson_version <- "1.1.3"
lesson_keywords <- c("Open Educational Resources", 
                     "Research Support Skills", 
                     "Version Control", 
                     "Workshop", 
                     "Research Software Engineering", 
                     "Reproducibility", 
                     "Modular Code", 
                     "Style Guide", 
                     "Code Smell")

folder_name <- basename(usethis::proj_get())
package_name <- gsub("-", ".", folder_name)
github_url <- sub("^git@github\\.com:", "https://github.com/", 
                  sub("\\.git$", "", usethis::git_remotes()$origin)
)

desc::desc_set(Package = package_name, 
               Title = lesson_title, 
               Description = lesson_description, 
               Version = lesson_version, 
               URL = github_url, 
               Version = lesson_version, 
               "X-schema.org-keywords" = paste(lesson_keywords, collapse = ", "))

cite_data <- list(
    title = lesson_title, 
    version = lesson_version, 
    creators = list(list(affiliation = "University of Florida", 
                 name = "Hao Ye", 
                 orcid = "0000-0002-8630-1458")), 
    description = lesson_description, 
    keywords = as.list(lesson_keywords), 
    license = cffr:::parse_desc_license(desc::desc()), 
    upload_type = "lesson"
)

jsonlite::write_json(cite_data, ".zenodo.json", 
                     auto_unbox = TRUE, pretty = TRUE)
```

# `r lesson_title`


[![GitHub Actions pkgdown workflow](https://github.com/uf-repro/lesson-template/workflows/pkgdown/badge.svg)](https://github.com/uf-repro/lesson-template/actions?query=workflow%3Apkgdown)

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4489867.svg)](https://doi.org/10.5281/zenodo.4489867)



## Description

`r lesson_description`

## Learning Outcomes

```{r, include = FALSE}
learning_outcomes <- c("organize programming tasks into modular functions", 
                       "communicate code intent using comments",
                       "recognize and fix basic code smells")
outcomes_text <- paste0("* ", learning_outcomes, collapse = "\n")
desc::desc_set("learningOutcomes", outcomes_text)
```

By the end of the workshop, participants will be able to:

`r outcomes_text`

Owner

  • Name: UF ReproducibiliTea Pod
  • Login: uf-repro
  • Kind: organization
  • Location: Gainesville, Florida, USA

Promoting transparency, reproducibility, openness, and inclusion in research at the University of Florida

GitHub Events

Total
Last Year

Dependencies

DESCRIPTION cran
  • desc * imports
  • dplyr * imports
  • jsonlite * imports
  • showtext * imports
  • xaringan * imports
  • xaringanthemer * imports
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite