Skip to content

Commit

Permalink
Initial setup (#8)
Browse files Browse the repository at this point in the history
Questions:
1. Can we discuss `./tests/testhat/setup.R`? I am not sure I understand
what it's doing.
    - I can delete this file.
3. What is the reporter here? `test_check(pkg_name, reporter =
ParallelProgressReporter$new())`
- Is this similar to the parallel processing of unit tests available in
testthat edition 3 (which is opt-in)?
- Can I add `Config/testthat/parallel: true` to the DESCRIPTION without
breaking things?
    - ADDED the config to DESCRIPTION, and no longer need the reporter.
4. `.pre-commit-config.yaml` The defaults here are styling and
re-documenting, right? But we have workflows for those as well. Do we
need both? What is the role of all the dependencies listed in the file?
- I can leave this and not install the pre-commit hooks. Or i can delete
this
6. `.gitlab-ci.yml`, do I need this one since this is a GH repo? KEEP
THIS BECAUSE WE WILL NEED IT FOR VALIDATION.
7. Where are staged dependencies used? I see them in the R CMD Checks
yaml. Any other spaces? I don't think I need that infrastructure right
now: if I delete the file now, will it break existing workflows?
   - I CAN DELETE OR NOT DELETE
9. `build-check-install.yaml` 
- Can we discuss the details of `junit-xml` reports, so I can understand
what they are doing?
- What versions of R are checked? A project like cards need to be
checked on the last 4 versions of R.
- This checks one version of R only for now. This may change in the
future. For now, I'll probably just add the Posit checks for older
versions.
- The reports that are uploaded to the pkgdown site, are the just static
html files? If I prefer not to add a dropdown menu that persists all
every page of the website, can I link to them another way?
- I can delete these menus from the _pkgdown.yaml, and then add a link
via a fa-icon
- Is this built similarly to the admiral workflows based off images that
update every so often? If so, how frequently do they update? What if I
need to use a new feature from a package?
 10. I ❤️ `branch-cleanup`. Did I specify this option correctly?
 

![image](https://github.com/insightsengineering/cardx/assets/26774684/d4ee72ce-71c3-4526-9234-01d9ccba040e)

11. Does either the lintr or styler actually change my scripts or just
report when they are not properly linted/styled? If so, can that be
changed to just report?
  • Loading branch information
ddsjoberg authored Jan 23, 2024
1 parent a3f2fc2 commit e3b365f
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 142 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
auto-update: true
auto-update: false
gitleaks:
name: gitleaks 💧
uses: insightsengineering/r.pkg.template/.github/workflows/gitleaks.yaml@main
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
name: Style Check 👗
uses: insightsengineering/r.pkg.template/.github/workflows/style.yaml@main
with:
auto-update: true
auto-update: false
grammar:
if: github.event_name != 'push'
name: Grammar Check 🔤
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,15 @@ on:
workflow_dispatch:

jobs:
dependency-test:
strategy:
fail-fast: false
matrix:
test-strategy: ["min_cohort", "min_isolated", "release", "max"]
uses: insightsengineering/r.pkg.template/.github/workflows/verdepcheck.yaml@main
name: Dependency Test - ${{ matrix.test-strategy }} 🔢
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
GCHAT_WEBHOOK: ${{ secrets.GCHAT_WEBHOOK }}
with:
strategy: ${{ matrix.test-strategy }}
additional-env-vars: |
PKG_SYSREQS_DRY_RUN=true
branch-cleanup:
name: Branch Cleanup 🧹
uses: insightsengineering/r.pkg.template/.github/workflows/branch-cleanup.yaml@main
secrets:
REPO_GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
last-commit-age-days: 365
cran-status:
name: CRAN Status Monitor 📺
uses: insightsengineering/r.pkg.template/.github/workflows/cran-status.yaml@main
with:
issue-assignees: "shajoezhu,Melkiades,edelarua,gmbecker,ayogasekaram"
issue-assignees: "ddsjoberg"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ docs
# others
.DS_Store
temp/


.pre-commit-config.yaml
71 changes: 0 additions & 71 deletions .pre-commit-config.yaml

This file was deleted.

10 changes: 6 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Package: cardx
Title: R Package to Supplement ARD Functions Found in {cards}
Title: Extra Analysis Results Data Utilities
Version: 0.0.0.9005
Date: 2024-01-23
Authors@R: c(
person("Daniel", "Sjoberg", , "[email protected]", role = c("aut", "cre")),
person("F. Hoffmann-La Roche AG", role = c("cph", "fnd"))
Expand All @@ -13,13 +12,16 @@ BugReports: https://github.com/insightsengineering/cardx/issues
Depends:
R (>= 4.0)
Imports:
utils
cards (>= 0.0.0.9012)
Suggests:
testthat (>= 3.2.0)
Remotes:
insightsengineering/cards
Config/Needs/website: insightsengineering/nesttemplate
Config/testthat/edition: 3
Config/testthat/parallel: true
Encoding: UTF-8
Language: en-US
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.0
Empty file removed R/.gitkeep
Empty file.
6 changes: 6 additions & 0 deletions R/cardx-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
## usethis namespace: end
NULL
16 changes: 8 additions & 8 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ navbar:
structure:
left: [intro, reference, articles, tutorials, news, reports]
right: [search, github]
components:
reports:
text: Reports
menu:
- text: Coverage report
href: coverage-report/
- text: Unit test report
href: unit-test-report/
# components:
# reports:
# text: Reports
# menu:
# - text: Coverage report
# href: coverage-report/
# - text: Unit test report
# href: unit-test-report/
github:
icon: fa-github
href: https://github.com/insightsengineering/cardx
2 changes: 2 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARD
Forkers
Hoffmann
funder
repo
Empty file removed man/.gitkeep
Empty file.
28 changes: 28 additions & 0 deletions man/cardx-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions staged_dependencies.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pkg_name <- "cardx"
library(testthat)
test_check(pkg_name, reporter = ParallelProgressReporter$new())
test_check("cardx")
Empty file removed tests/testthat/.gitkeep
Empty file.
35 changes: 0 additions & 35 deletions tests/testthat/setup.R

This file was deleted.

3 changes: 3 additions & 0 deletions tests/testthat/test-delete_me.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test_that("multiplication works", {
expect_equal(2 * 2, 4)
})

0 comments on commit e3b365f

Please sign in to comment.