diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml deleted file mode 100644 index e103fd7..0000000 --- a/.github/workflows/pkgdown.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -name: pkgdown - -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - release: - types: [published] - workflow_dispatch: - -jobs: - pkgdown: - runs-on: ubuntu-latest - # Only restrict concurrency for non-PR jobs - concurrency: - group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - permissions: - contents: write - steps: - - - name: Checkout repo for workflow access - uses: actions/checkout@v3 - - - name: Setup pandoc - uses: r-lib/actions/setup-pandoc@v2 - - - name: Setup R environment - uses: r-lib/actions/setup-r@v2 - with: - use-public-rspm: true - - - name: Set up dependencies - uses: r-lib/actions/setup-r-dependencies@v2 - with: - dependencies: '"hard"' # do not use suggested dependencies - extra-packages: any::pkgdown, local::. - needs: website - - - name: Build site - run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) - shell: Rscript {0} - - - name: Deploy to GitHub pages 🚀 - if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.1 - with: - clean: false - branch: gh-pages - folder: docs diff --git a/_pkgdown.yml b/_pkgdown.yml deleted file mode 100644 index feab433..0000000 --- a/_pkgdown.yml +++ /dev/null @@ -1,53 +0,0 @@ -url: https://drieslab.github.io/GiottoUtils/ - -authors: - Ruben Dries: - href: https://www.drieslab.com - Guo-Cheng Yuan: - href: https://labs.icahn.mssm.edu/yuanlab/ - Joselyn C. Chávez-Fuentes: - href: https://josschavezf.github.io - - -template: - bootstrap: 5 - bslib: - bg: "#FFFFFF" - fg: "#000000" - primary: "#7E69AE" - code_font: {google: "JetBrains Mono"} - -navbar: - bg: light - structure: - left: - - intro - - reference - - articles - - news - right: - - suite - - github - components: - reference: - text: Documentation - href: reference/index.html - articles: - text: Articles - menu: - - text: Console Printing - href: articles/print_formatting.html - news: - text: News - href: news/index.html - suite: - text: Suite - href: https://drieslab.github.io/Giotto/ - github: - icon: fab fa-github fa-lg - href: https://github.com/drieslab/GiottoUtils/ - aria-label: github - -home: - sidebar: - structure: [links, license, community, citation, authors, dev] diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 04c5585..0000000 --- a/codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -comment: false - -coverage: - status: - project: - default: - target: auto - threshold: 1% - informational: true - patch: - default: - target: auto - threshold: 1% - informational: true diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png deleted file mode 100644 index 8d47800..0000000 Binary files a/pkgdown/favicon/apple-touch-icon-120x120.png and /dev/null differ diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png deleted file mode 100644 index 4a3bae9..0000000 Binary files a/pkgdown/favicon/apple-touch-icon-152x152.png and /dev/null differ diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png deleted file mode 100644 index a539fe4..0000000 Binary files a/pkgdown/favicon/apple-touch-icon-180x180.png and /dev/null differ diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png deleted file mode 100644 index 768a053..0000000 Binary files a/pkgdown/favicon/apple-touch-icon-60x60.png and /dev/null differ diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png deleted file mode 100644 index ef4a450..0000000 Binary files a/pkgdown/favicon/apple-touch-icon-76x76.png and /dev/null differ diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png deleted file mode 100644 index 4a5a036..0000000 Binary files a/pkgdown/favicon/apple-touch-icon.png and /dev/null differ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png deleted file mode 100644 index 6df1346..0000000 Binary files a/pkgdown/favicon/favicon-16x16.png and /dev/null differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png deleted file mode 100644 index dff71c1..0000000 Binary files a/pkgdown/favicon/favicon-32x32.png and /dev/null differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico deleted file mode 100644 index bd1f290..0000000 Binary files a/pkgdown/favicon/favicon.ico and /dev/null differ diff --git a/vignettes/print_formatting.Rmd b/vignettes/print_formatting.Rmd deleted file mode 100644 index 8165b09..0000000 --- a/vignettes/print_formatting.Rmd +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: "Console Printing" -output: rmarkdown::html_vignette -vignette: > - %\VignetteIndexEntry{Console Printing} - %\VignetteEngine{knitr::rmarkdown} - %\VignetteEncoding{UTF-8} ---- - -## Relevant Options -``` -options("giotto.verbose") -options("giotto.logdir") -options("giotto.last_logpath") -``` - - -## Overview - -Diagnostic prints in R are vital for communicating to both users and developers what the function is doing and how it may be going wrong. *GiottoUtils* exports a collection of utility functions that facilitate pretty printing and readability. - -There are several types of console printouts in R. Giotto uses the following types of functions for specific purposes:\ -- `message()` - Descriptive messages of what a function is doing (most common)\ -- `cat()` and `print()` - Diagnostic outputs, usually comments and previews of the data\ -- `warning()` - When a function behavior is potentially problematic, given the context and/or inputs\ -- `stop()` - Error messages - -## Text Formatting - -`GiottoUtils::wrap_txt()` can be used to format text to wrap to to console size -or 100 char by default - whichever is less. New lines are treated like "\\n" and -it also applies an indent to all lines after the first.\ -This function is wrapped by the convenient print functions detailed below.\ -```{r} -library(GiottoUtils) -cat(wrap_txt("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.")) -``` - -
See base behavior -Base functions for console prints lack text wrapping. Linebreaks also require usage of "\\n" to be formatted as expected. - -```{r} -# Code formatting causes " " to be added the next line -cat("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.") - -# Using \n instead -cat("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\nUt enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.") -``` -
- - -## Messages -Giotto primarily uses messages to write helpful console prints. -Whenever a function has a message print, we also encourage adding a `verbose` -param so that it can be turned off. The standard implementation looks like this. -```{r} -test_fun1 <- function(verbose = TRUE) { - if (verbose) message("hello world") -} - -test_fun1() -``` - -*GiottoUtils* v0.1.1 introduces `vmsg()` which simplifies this to a single -function without a preceding `if` statement. It also applies text wrapping. -Note that the `verbose` default should be `NULL` with this implementation since -`vmsg()` checks for a default using the `"giotto.verbose"` option that can be -set globally. -``` {r} -test_fun2 <- function(verbose = NULL) { - vmsg(.v = verbose, "hello world") -} - -test_fun2() -``` - -### Debug messages - -`vmsg()` also provides other modes of prints. For debugging purposes, it can -be helpful to include more abstract or wordy printouts such as messages for -every successful step. These can be included by flagging as `"debug"` -```{r} -test_debug <- function(verbose = NULL) { - vmsg(.v = verbose, .is_debug = TRUE, "this is a debug statement") - vmsg(.v = verbose, "this is a normal message") -} - -test_debug(verbose = TRUE) -test_debug(verbose = "debug") -``` - -### Logging messages - -For cases where a record of the messages would be helpful, but it would be -preferred that nothing is actually printed to the console, `vmsg()` also supports -writing to a logfile. This can be done by passing either `"log"` or `"log_debug"` -for the desired level of verbosity to the `verbose` param or `"giotto.verbose"` -option.\ -The logfile defaults to being created in `tempdir()`, but this can be set to a -directory of choice using the `"giotto.logdir"` option. The specific path to -the logfile is stored within the `"giotto.last_logpath"`. -```{r} -vmsg(.v = "log", "Write this to a logfile in tempdir") -``` - -To read the log items, use `giottoReadLog()`. -```{r} -giottoReadLog() -``` - -You can start a new logfile using `giottoNewLog()` - - -## Errors -With the modularization of *Giotto* in v4.0.0, it can be hard to find which -module a specific error came from. `.gstop()` is an error handling internal -function within each of the modules that seeks to solve this. -This function will pre-pend which module the error happened in. It also -provides the `.n` param that allows developers to specify how many stackframes -back the error should be reported from. -```{r, error = TRUE} -foo <- function(x, y) { - GiottoUtils:::.gstop("This is an error.") -} - -bar <- function() { - foo(1,2) -} - -bar() - -foo <- function(x, y) { - GiottoUtils:::.gstop("This is an error.", .n = 2) # report from one stackframe back -} - -bar() -``` -