Skip to content

Installation and setup

Quick setup

To try out ghqc without your organization’s custom configuration options, run the following commands to install the ecosystem and clone an example custom configuration repository .

  1. Set options to a CRAN-like repository with the ghqc ecosystem (this allows the setup function to install ghqc.app, an auxiliary helper package)
    options("repos" = c(
    "ghqc-eco" = "https://prism.dev.a2-ai.cloud/rpkgs/ghqc-eco/v3",
    getOption("repos")))
  2. Install ghqc and its suggested dependencies
    install.packages("ghqc", dependencies = TRUE)
  3. Clone the example custom configuration repository and install ghqc.app dependencies and ghqc.app with:
    ghqc::ghqc_example_setup()

Now you are set up to run the apps.

Organization setup

Install ghqc

With rv

  1. Add the PRISM ghqc ecosystem collection as the first repository listed in the repositories section of your rproject.toml.

    rproject.toml
    {alias = "ghqc-eco", url = "https://prism.dev.a2-ai.cloud/rpkgs/ghqc-eco/v3"}
  2. Add ghqc to the dependencies section of your rproject.toml.

    rproject.toml
    {name = "ghqc", install_suggestions = true}

Without rv

  1. Set options to a CRAN-like repository with the ghqc ecosystem
    options("repos" = c(
    "ghqc-eco" = "https://prism.dev.a2-ai.cloud/rpkgs/ghqc-eco/v3",
    getOption("repos")))
  2. Install ghqc and its suggested dependencies
    install.packages("ghqc", dependencies = TRUE)

Install and setup the ecosystem

  1. Run the interactive setup script.

    library(ghqc)
    ghqc_setup()
  2. Add the configuration repository to your .Renviron.

    A prompt will appear to set the GHQC_CONFIG_REPO variable for the custom configuration repository. The inputted URL will be added to ~/.Renviron.

    For initial setup, you will be prompted to enter the URL to your custom configuration repository.

    Terminal window
    --- GHQC RENVIRON SETUP -----------------------------------------------------
    GHQC_CONFIG_REPO is not set in your ~/.Renviron
    Provide URL to custom configuration repository:
    https://github.com/A2-ai/ghqc.example_config_repo
  3. Clone the custom configuration repository

    Next, a prompt will appear for the local directory in which to clone the repository. The default location is according to the XDG Base Directory specification, with a subfolder based on the repository name.

    To install to the default directory, which is highly recommended, input y. If a different location is required, input the file path.

    Terminal window
    --- CUSTOM CONFIGURATION REPOSITORY --------------------------------------
    Download custom configuration repository to path:
    ~/.local/share/ghqc/ghqc.example_config_repo (y/N) y

    Not Downloaded

    If you have not downloaded the repository before, the following prompt will appear. Input y to download.

    Terminal window
    x Custom configuration repository ghqc.example_config_repo is not found locally
    Would you like to download the repository (y/N)? y

    After a successful download, the structure of the repository is verified for its compatibility with the ghqc ecosystem. This includes structural validation of each yaml checklist.

    Terminal window
    logo.png successfully found
    options.yaml successfully found
    prepended_checklist_note:
    “Note: Please modify checklist items to insert relevant QC context.”
    Checklist directory successfully found
    advanced_checklist.yaml
    simple_checklist.yaml
  4. ghqc.app dependency installation

    To ensure ghqc.app dependencies do not interfere with project work, ghqc.app and its dependencies are installed in an isolated directory outside the QCed project.

    A prompt will appear to install or link the ghqc.app package dependencies.

    Terminal window
    --- GHQC.APP DEPENDENCY INSTALLATION ----------------------------------------
    Would you like to INSTALL new packages form Posit Package Manager or LINK to a
    previously installed package library?
    1. INSTALL
    2. LINK
    3. Neither
    Input:

    If you are on a linux operating system, ghqc will install the dependencies from PPM@2024-03-01

    After inputting 1, the user is prompted for the local directory in which to install ghqc.app dependencies. To install to the default directory, which is highly recommended, input y. If a different location is required, input N to enter the file path.

    Terminal window
    Install ghqc.app dependencies to path:
    ~/.local/share/ghqc/rpkgs/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu (y/N) y

    ghqc will check the content of the directory to ensure the correct packages and versions are installed.

    If no packages are found, you will be prompted the following:

    Terminal window
    x No packages found in ~/.local/share/ghqc/rpkgs
    Would you like to install the ghqc.app dependencies (y/N)? y
  5. Install ghqc.app

    At the end of the ghqc.app dependency installation, the following note will print if ghqc.app is not installed in the ghqc directory.

    Terminal window
    ! NOTE: ghqc.app is not installed in ~/.local/share/ghqc/rpkgs.
    Please install before running any ghqc apps

    If it is not an available package in the user’s options("repos"), ghqc.app is not installed as part of ghqc::ghqc_setup().
    Manually install ghqc.app with the following command:

    Terminal window
    utils::install.packages("ghqc.app",
    lib = ghqc::ghqc_libpath(),
    repos = "https://prism.dev.a2-ai.cloud/rpkgs/ghqc-eco/v3")

Run the apps

To run the apps, ensure your project is open and is an initialized git repository with a remote upstream.

Via console

library(ghqc)
# Assign QC file(s)
ghqc_assign_app()
# Status QC file(s)
ghqc_status_app()
# Generate QC Record
ghqc_record_app()

Via RStudio addins

Ensure miniUI is installed to use RStudio Addins.