Skip to content

Commit

Permalink
Fix the repository and website paths
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvartan committed Aug 7, 2021
1 parent 54270d5 commit f8a2690
Show file tree
Hide file tree
Showing 46 changed files with 151 additions and 96 deletions.
14 changes: 7 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ First of all, thanks for considering contributing to `mctq`! 👍 It's people li

`mctq` is an open source project, maintained by people who care. We are not directly funded to do so.

[repo]: https://github.com/gipsousp/mctq
[issues]: https://github.com/gipsousp/mctq/issues
[discussions]: https://github.com/gipsousp/mctq/discussions
[new_issue]: https://github.com/gipsousp/mctq/issues/new
[new_discussion]: https://github.com/gipsousp/mctq/discussions/new
[website]: https://gipsousp.github.io/mctq
[citation]: https://gipsousp.github.io/mctq//authors.html
[repo]: https://github.com/gipso/mctq
[issues]: https://github.com/gipso/mctq/issues
[discussions]: https://github.com/gipso/mctq/discussions
[new_issue]: https://github.com/gipso/mctq/issues/new
[new_discussion]: https://github.com/gipso/mctq/discussions/new
[website]: https://gipso.github.io/mctq
[citation]: https://gipso.github.io/mctq//authors.html
[email]: mailto:danvartan@gmail.com

## Code of conduct
Expand Down
3 changes: 1 addition & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,4 @@ enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at https://
www.contributor-covenant.org/translations.
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ Authors@R:
email = "miguel.ml.mario@gmail.com",
comment = c(ORCID = "0000-0002-7248-3529")),
person(given = "Interdisciplinary Sleep Research Group (GIPSO)",
role = c("fnd")),
role = "fnd"),
person(given = "University of Sao Paulo (USP)",
role = "fnd"))
Maintainer: Daniel Vartanian <danvartan@gmail.com>
Description: A complete and consistent toolkit to process the Munich
ChronoType Questionnaire (MCTQ) for its three versions (standard,
micro, and shift).
License: MIT + file LICENSE
URL: https://gipsousp.github.io/mctq/, https://github.com/gipsousp/mctq/
BugReports: https://github.com/gipsousp/mctq/issues/
URL: https://gipso.github.io/mctq/, https://github.com/gipso/mctq/
BugReports: https://github.com/gipso/mctq/issues/
Depends:
R (>= 3.6)
Imports:
checkmate,
cli,
dplyr (>= 0.2),
hms,
lifecycle,
Expand Down
20 changes: 19 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
# mctq 0.0.0.9001

* The DESCRIPTION file now requires a lubridate version >= 1.7.9. `vctrs` support was added in this version, fixing some issues related to rounding `Duration`, `Period`, and `Interval` objects. Click [here](https://github.com/tidyverse/lubridate/pull/871) to learn more.
## Added

* @jonkeane was added as a reviewer ('rev').
* @leocadio-miguel was added as a reviewer ('rev').
* The user interface has gotten more stylish, thanks to the [`cli` package](https://cli.r-lib.org) (now on imports).

## Changed

* The DESCRIPTION file now requires a lubridate version `>= 1.7.9`. `vctrs` support was added in this version, fixing some issues related to rounding `Duration`, `Period`, and `Interval` objects. Click [here](https://github.com/tidyverse/lubridate/pull/871) to learn more.
* The DESCRIPTION file now requires a dplyr version `>= 0.2`. That's when the `dplyr` start to import the pipe operator. Click [here](https://github.com/tidyverse/dplyr/blob/master/NEWS.md#piping) to learn more.
* `round_time()` is now a S3 generic.
* `shortest_interval()` was renamed to `shorter_interval()`
* Several functions were optimized.
* The test suite was optimized.

## Fixed

* Several typos were fixed in the documentation.


# mctq 0.0.0.9000

Expand Down
2 changes: 1 addition & 1 deletion R/gu.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## For standard and micro versions of the MCTQ
#'
Expand Down
2 changes: 1 addition & 1 deletion R/le_week.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## Computation
#'
Expand Down
2 changes: 1 addition & 1 deletion R/micro_mctq.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#' addition to be a suggested data structure for MCTQ data.
#'
#' You can see the `micro_mctq` build and data wrangling processes
#' [here](https://github.com/gipsousp/mctq/blob/master/data-raw/micro_mctq.R).
#' [here](https://github.com/gipso/mctq/blob/master/data-raw/micro_mctq.R).
#'
#' ## Variable naming
#'
Expand Down
4 changes: 2 additions & 2 deletions R/ms.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## For standard and micro versions of the MCTQ
#'
Expand Down Expand Up @@ -149,7 +149,7 @@ ms <- function(so, sd) {
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## For standard and micro versions of the MCTQ
#'
Expand Down
2 changes: 1 addition & 1 deletion R/random_mctq.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#' Vetter, & Roenneberg (2013).
#'
#' You can see more about the distribution parameters used
#' [here](https://github.com/gipsousp/mctq/blob/master/data-raw/random_mctq.R).
#' [here](https://github.com/gipso/mctq/blob/master/data-raw/random_mctq.R).
#'
#' @param model A string indicating the data model to return. Valid values are:
#' `"standard"`, "`shift"`, and `"micro"` (default: `"standard"`).
Expand Down
10 changes: 5 additions & 5 deletions R/sd.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## For standard and micro versions of the MCTQ
#'
Expand Down Expand Up @@ -120,7 +120,7 @@ sd <- function(so, se) {
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## Computation
#'
Expand Down Expand Up @@ -211,7 +211,7 @@ napd <- function(napo, nape) {
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## Computation
#'
Expand Down Expand Up @@ -324,7 +324,7 @@ sd24 <- function(sd, napd, nap) {
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## Computation
#'
Expand Down Expand Up @@ -462,7 +462,7 @@ sd_week <- function(sd_w, sd_f, wd) {
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## Computation
#'
Expand Down
2 changes: 1 addition & 1 deletion R/shift_mctq.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#' addition to be a suggested data structure for MCTQ data.
#'
#' You can see the `shift_mctq` build and data wrangling processes
#' [here](https://github.com/gipsousp/mctq/blob/master/data-raw/shift_mctq.R).
#' [here](https://github.com/gipso/mctq/blob/master/data-raw/shift_mctq.R).
#'
#' ## Variable naming
#'
Expand Down
4 changes: 2 additions & 2 deletions R/sjl.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## For standard and micro versions of the MCTQ
#'
Expand Down Expand Up @@ -290,7 +290,7 @@ sjl_rel <- function(msw, msf, method = "shorter") {
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## Computation
#'
Expand Down
2 changes: 1 addition & 1 deletion R/sloss_week.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## Computation
#'
Expand Down
2 changes: 1 addition & 1 deletion R/so.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## For standard and micro versions of the MCTQ
#'
Expand Down
2 changes: 1 addition & 1 deletion R/std_mctq.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#' addition to be a suggested data structure for MCTQ data.
#'
#' You can see the `std_mctq` build and data wrangling processes
#' [here](https://github.com/gipsousp/mctq/blob/master/data-raw/std_mctq.R).
#' [here](https://github.com/gipso/mctq/blob/master/data-raw/std_mctq.R).
#'
#' ## Variable naming
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tbt.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' * If you are visualizing this documentation in plain text (`ASCII`), you may
#' have some trouble understanding the equations. If you want a better viewer,
#' you can see this documentation on the package
#' [website](https://gipsousp.github.io/mctq/reference/).
#' [website](https://gipso.github.io/mctq/reference/).
#'
#' ## For standard and micro versions of the MCTQ
#'
Expand Down
26 changes: 24 additions & 2 deletions R/utils-dialogs.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# "Absolutely")
# no <- c("No way", "Not now", "Negative", "No", "Nope", "Absolutely not")
#
# if(isTRUE(space_above)) cat("\n")
# if (isTRUE(space_above)) cat("\n")
#
# for (i in seq_along(choices)) {
# choices[i] <- crayon::black$bold(choices[i])
Expand Down Expand Up @@ -72,7 +72,10 @@ alert <- function(..., combined_styles = c("bold", "red"), type = "message",

message <- vapply(list(...), paste0, character(1), collapse = "")
message <- paste0(message, collapse = "")
message <- paste(strwrap(message), collapse = "\n")

if (!grepl("\\n", message)) {
message <- paste(strwrap(message), collapse = "\n")
}

if (require_namespace("crayon", quietly = TRUE) &&
!is.null(combined_styles)) {
Expand Down Expand Up @@ -115,3 +118,22 @@ crayonize <- function(..., combined_styles = c("bold", "red"), abort = FALSE) {

out
}

# emojinize <- function(aliases, alternative = "", left_space = FALSE,
# right_space = FALSE) {
# checkmate::assert_string(aliases)
# checkmate::assert_string(alternative)
# checkmate::assert_flag(left_space)
# checkmate::assert_flag(right_space)
#
# if (require_namespace("emojifont", quietly = TRUE)) {
# out <- emojifont::emoji(aliases)
#
# if (isTRUE(left_space)) out <- paste0(" ", out)
# if (isTRUE(right_space)) out <- paste0(out, " ")
#
# out
# } else {
# alternative
# }
# }
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.onAttach <- function(...) {
tip <- "Learn how to use 'mctq' at gipsousp.github.io/mctq ."
tip <- "Learn how to use {mctq} at gipso.github.io/mctq ."
package_startup_message(paste(strwrap(tip), collapse = "\n"))
}
22 changes: 11 additions & 11 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@ library(lubridate)
library(hms)
```

# mctq <a href='https://gipsousp.github.io/mctq'><img src='man/figures/logo.png' align="right" height="139" /></a>
# mctq <a href='https://gipso.github.io/mctq'><img src='man/figures/logo.png' align="right" height="139" /></a>

<!-- badges: start -->
[![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/434_status.svg)](https://github.com/ropensci/software-review/issues/434)
[![CRAN status](https://www.r-pkg.org/badges/version/mctq)](https://CRAN.R-project.org/package=mctq)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![R-CMD-check](https://github.com/gipsousp/mctq/workflows/R-CMD-check/badge.svg)](https://github.com/gipsousp/mctq/actions)
[![codecov](https://codecov.io/gh/gipsousp/mctq/branch/main/graph/badge.svg?token=i5nG9mtxP8)](https://codecov.io/gh/gipsousp/mctq)
[![R-CMD-check](https://github.com/gipso/mctq/workflows/R-CMD-check/badge.svg)](https://github.com/gipso/mctq/actions)
[![codecov](https://codecov.io/gh/gipso/mctq/branch/main/graph/badge.svg?token=i5nG9mtxP8)](https://codecov.io/gh/gipso/mctq)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://choosealicense.com/licenses/mit/)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://gipsousp.github.io/mctq/CODE_OF_CONDUCT.html)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://gipso.github.io/mctq/CODE_OF_CONDUCT.html)
[![Buy Me A Coffee donate button](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/danielvartan)
<!-- badges: end -->

## Overview

`mctq` is an R package that provides a complete and consistent toolkit to process the Munich ChronoType Questionnaire (MCTQ), a quantitative and validated method to assess peoples sleep behavior presented by Till Roenneberg, Anna Wirz-Justice, and Martha Merrow in [2003](https://doi.org/10.1177/0748730402239679). The aim of `mctq` is to facilitate the work of sleep and chronobiology scientists with MCTQ data while also helping with research reproducibility.
`mctq` is an R package that provides a complete and consistent toolkit to process the Munich ChronoType Questionnaire (MCTQ), a quantitative and validated tool to assess chronotypes using peoples' sleep behavior presented by Till Roenneberg, Anna Wirz-Justice, and Martha Merrow in [2003](https://doi.org/10.1177/0748730402239679). The aim of `mctq` is to facilitate the work of sleep and chronobiology scientists with MCTQ data while also helping with research reproducibility.

> This package is currently under a [software peer-review](https://github.com/ropensci/software-review/issues/434) by the [rOpenSci](https://ropensci.org/) initiative. We plan to submit it to [CRAN](https://cran.r-project.org/) soon after the review process ends.
Learn more about the MCTQ questionnaire at <https://www.thewep.org/documentations/mctq>.

### Wait, an R package for a questionnaire?

Although it may look like a simple questionnaire, MCTQ requires a lot of date/time manipulation. This poses a challenge for many scientists, being that most people have difficulties with date/time data, especially when dealing with an extensive set of data. The `mctq` package comes to address this issue.
Although it may look like a simple questionnaire, MCTQ requires a lot of date/time manipulation. This poses a challenge for many scientists, being that most people have difficulties with date/time data, especially when dealing with an extensive set of data. The `mctq` package comes to address this issue.

`mctq` can handle the processing tasks for the three MCTQ versions (standard, micro, and shift) with few dependencies, relying much of its applications on the [lubridate](https://lubridate.tidyverse.org/) and [hms](https://hms.tidyverse.org/) packages from [tidyverse](https://www.tidyverse.org/). We also designed `mctq` with the user experience in mind, by creating an interface that resembles the way the questionnaire data is shown in MCTQ publications, and by providing extensive and detailed documentation about each computation proposed by the MCTQ authors. The package also includes several utility tools to deal with different time representations (e.g., decimal hours, radians) and time arithmetic issues, along with fictional datasets for testing and learning purposes.

Expand All @@ -57,7 +57,7 @@ The first stable `mctq` version is already out, we're just waiting for the [soft

``` {r, eval = FALSE}
# install.packages("pak")
pak::pkg_install("gipsousp/mctq")
pak::pkg_install("gipso/mctq")
```

## Usage
Expand Down Expand Up @@ -128,13 +128,13 @@ msf <- c(hms::parse_hms("23:05:00"), hms::parse_hms("08:30:00"))
sjl_rel(msw, msf)
```

See a quick tour of all MCTQ main functions [here](https://gipsousp.github.io/mctq/articles/mctq.html).
See a quick tour of all MCTQ main functions [here](https://gipso.github.io/mctq/articles/mctq.html).

### Utilities

In addition to `convert()`, `mctq` is also equipped with many other utility functions. The package also provides fictional datasets of the standard, micro, and shift MCTQ versions for testing and learning purposes.

All functions are well documented, showing all the guidelines behind the computations. Click [here](https://gipsousp.github.io/mctq/reference/index.html) to see a list of them.
All functions are well documented, showing all the guidelines behind the computations. Click [here](https://gipso.github.io/mctq/reference/index.html) to see a list of them.

## Citation

Expand All @@ -146,10 +146,10 @@ citation("mctq")

## Contributing

`mctq` is a community project, everyone is welcome to contribute. Take a moment to review our [Guidelines for Contributing](https://gipsousp.github.io/mctq/CONTRIBUTING.html).
`mctq` is a community project, everyone is welcome to contribute. Take a moment to review our [Guidelines for Contributing](https://gipso.github.io/mctq/CONTRIBUTING.html).

Please note that `mctq` is released with a [Contributor Code of
Conduct](https://gipsousp.github.io/mctq/CODE_OF_CONDUCT.html). By contributing
Conduct](https://gipso.github.io/mctq/CODE_OF_CONDUCT.html). By contributing
to this project, you agree to abide by its terms.

## Support `mctq`
Expand Down
Loading

0 comments on commit f8a2690

Please sign in to comment.