Skip to content

Rename package from orderly to orderly1 #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 25 additions & 107 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# 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
on:
push:
branches:
- main
- master
branches: [main, master]
pull_request:
branches:
- main
- master
branches: [main, master]

name: Check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -22,113 +20,33 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
VAULTR_TEST_SERVER_INSTALL: true
VAULTR_TEST_SERVER_PORT: 18200
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v1
- uses: actions/checkout@v4

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- uses: r-lib/actions/setup-pandoc@v2

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
- uses: r-lib/actions/setup-r@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Set env
run: echo "VAULTR_TEST_SERVER_BIN_PATH=$GITHUB_WORKSPACE/.vault" >> $GITHUB_ENV

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')

- name: "[macOS] system dependencies"
if: runner.os == 'macOS'
run: |
brew install libgit2

- name: Install openssl (Windows)
if: runner.os == 'Windows'
run: |
install.packages("openssl", type = "binary")
shell: Rscript {0}

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Install RSQlite
run: |
remotes::install_cran("RSQLite")
shell: Rscript {0}

- name: Install vault
if: runner.os != 'Windows'
run: |
vaultr::vault_test_server_install()
shell: Rscript {0}

- name: Copy reference data
run: |
./scripts/copy_reference

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/setup-r-dependencies@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
extra-packages: any::rcmdcheck
needs: check

check-orderly-server:

runs-on: ubuntu-20.04

needs: R-CMD-check

steps:
- uses: convictional/[email protected]
- uses: r-lib/actions/check-r-package@v2
with:
owner: vimc
repo: orderly.server
ref: master
github_token: ${{ secrets.REPO_DISPATCH_TOKEN }}
client_payload: "{\"orderly_version\": \"${{ github.event_name == 'push' && 'master' || github.head_ref }}\"}"
workflow_file_name: R-CMD-check.yaml
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
91 changes: 43 additions & 48 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,63 @@
# 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
on:
push:
branches:
- main
- master
branches: [main, master]
pull_request:
branches:
- main
- master
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: macOS-latest
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
VAULTR_TEST_SERVER_INSTALL: true
VAULTR_TEST_SERVER_PORT: 18200

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- uses: r-lib/actions/setup-pandoc@v1
- uses: actions/checkout@v4

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
- uses: r-lib/actions/setup-r@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install libs
run: |
brew install libgit2

- name: Set env
run: echo "VAULTR_TEST_SERVER_BIN_PATH=$GITHUB_WORKSPACE/.vault" >> $GITHUB_ENV
use-public-rspm: true

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
vaultr::vault_test_server_install()
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Install RSQlite
- name: Test coverage
run: |
remotes::install_cran("RSQLite")
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- name: Copy reference data
- uses: codecov/codecov-action@v5
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
./scripts/copy_reference
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: orderly
Package: orderly1
Title: Lightweight Reproducible Reporting
Version: 1.6.1
Version: 1.7.0
Description: Order, create and store reports from R. By defining a
lightweight interface around the inputs and outputs of an
analysis, a lot of the repetitive work for reproducible research
Expand Down
10 changes: 5 additions & 5 deletions R/batch.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##' Run one report multiple times with different sets of parameters.
##'
##' @param name Name of the report to run (see
##' [orderly::orderly_list()]). A leading `src/` will be
##' [orderly1::orderly_list()]). A leading `src/` will be
##' removed if provided, allowing easier use of autocomplete.
##' Alternatively, the default of `NULL` is useful if you have
##' already set the working directory to be the source directory.
Expand All @@ -17,18 +17,18 @@
##' during preparation e.g. because of missing parameters this will
##' error and stop all subsequent parameter sets.
##'
##' @param ... Additional args passed to [orderly::orderly_run()]
##' @param ... Additional args passed to [orderly1::orderly_run()]
##'
##' @seealso [orderly::orderly_run()] for details of report running
##' @seealso [orderly1::orderly_run()] for details of report running
##'
##' @export
##' @return List of ids of newly created reports
##'
##' @examples
##'
##' path <- orderly::orderly_example("demo")
##' path <- orderly1::orderly_example("demo")
##' params <- data.frame(nmin = c(0.2, 0.25))
##' ids <- orderly::orderly_batch("other", params, root = path)
##' ids <- orderly1::orderly_batch("other", params, root = path)
orderly_batch <- function(name = NULL, parameters = NULL,
continue_on_error = TRUE, ...) {
if (NROW(parameters) < 1) {
Expand Down
16 changes: 8 additions & 8 deletions R/bundle.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
##' `orderly_bundle_pack` or `orderly_bundle_run`)
##'
##' @param name Name of the report to pack (see
##' [orderly::orderly_list()]. A leading `src/` will be removed if
##' [orderly1::orderly_list()]. A leading `src/` will be removed if
##' provided, allowing easier use of autocomplete.
##'
##' @inheritParams orderly_run
Expand All @@ -39,35 +39,35 @@
##'
##' @export
##' @examples
##' path <- orderly::orderly_example("minimal")
##' path <- orderly1::orderly_example("minimal")
##'
##' # A working directory to export bundles to:
##' workdir <- tempfile()
##'
##' # Pack up the "example" report to go:
##' res <- orderly::orderly_bundle_pack(workdir, "example", root = path)
##' res <- orderly1::orderly_bundle_pack(workdir, "example", root = path)
##'
##' # The return value is a list with the id and the path to the zip
##' # file created:
##' res
##'
##' # A list of reports bundled in this directory and their status
##' orderly::orderly_bundle_list(workdir)
##' orderly1::orderly_bundle_list(workdir)
##'
##' # Run the bundle (this would ordinarily be done on another computer)
##' zip <- orderly::orderly_bundle_run(res$path, workdir)
##' zip <- orderly1::orderly_bundle_run(res$path, workdir)
##' zip
##'
##' # The status has now been updated to reflect the status
##' orderly::orderly_bundle_list(workdir)
##' orderly1::orderly_bundle_list(workdir)
##'
##' # We can import this into the orderly tree
##' orderly::orderly_bundle_import(zip$path, root = path)
##' orderly1::orderly_bundle_import(zip$path, root = path)
##'
##' # This has now been included in your orderly archive and the
##' # workdir can be safely deleted
##' unlink(workdir, recursive = TRUE)
##' orderly::orderly_list_archive(path)
##' orderly1::orderly_list_archive(path)
orderly_bundle_pack <- function(path, name, parameters = NULL,
envir = NULL, root = NULL, locate = TRUE,
message = NULL, instance = NULL,
Expand Down
Loading
Loading