Skip to content
Open
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
4 changes: 2 additions & 2 deletions .syncweaver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"sources": {
"code/MOSuite": {
"repo_url": "https://github.com/CCBR/MOSuite",
"ref": "v0.3.2",
"git_sha": "f4465c58a7d04f5feb41d4455a019ca4946a4ca8"
"ref": "v0.4.0",
"git_sha": "ef1bdf806d153515e8ecbb8a8d2bfc518a418e05"
}
}
}
29 changes: 15 additions & 14 deletions code/MOSuite/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
^renv$
^renv\.lock$
^_pkgdown\.yml$
^[.]?air[.]toml$
^\.github$
^\.lintr$
^\.posit$
^\.pre-commit-config\.yaml$
^\.prettierignore$
^\.prettierrc$
^\.Rproj\.user$
^\.vscode$
^CITATION\.cff$
^codemeta\.json$
^data-raw$
^doc$
^Dockerfile$
^docker$
^Dockerfile$
^docs$
^figures$
^inst/quarto/report_files$
^LICENSE\.md$
^Meta$
^moo_input\.rds$
^MOSuite\.Rproj$
^pkgdown$
^README\.Rmd$
^README\.html$
^README_files$
^Rplots\.pdf$
^moo_input\.rds$
^plot-volc-enh\.json$
^volc-sum-params\.json$
^report_files$
^inst/quarto/report_files$
^README.*$
^renv\.lock$
^renv$
^report
^Rplots\.pdf$
^SECURITY\.md$
^tests/figures$
^vignettes/cli\.Rmd$
^vignettes/figures/$
^vignettes/memory\.Rmd$
^vignettes/cli\.Rmd$
^volc-sum-params\.json$
VennDiagram.*\.log
^[.]?air[.]toml$
^\.vscode$
^\.posit/assistant$
7 changes: 3 additions & 4 deletions code/MOSuite/.github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

concurrency:
Expand All @@ -23,8 +22,8 @@ jobs:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, r: 'release' }
- { os: ubuntu-latest, r: 'oldrel-1' }
- { os: ubuntu-latest, r: "release" }
- { os: ubuntu-latest, r: "oldrel-1" }
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
env:
Expand All @@ -51,7 +50,7 @@ jobs:
- uses: actions/checkout@v6
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.5'
r-version: "4.5"
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down
3 changes: 1 addition & 2 deletions code/MOSuite/.github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: auto-format
on:
workflow_dispatch:
pull_request:
branches: [ main, master ]

permissions:
contents: write
Expand Down Expand Up @@ -40,7 +39,7 @@ jobs:

- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.5'
r-version: "4.5"
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
Expand Down
92 changes: 92 additions & 0 deletions code/MOSuite/.github/workflows/syncweaver-source-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: syncweaver-source-dispatch

on:
release:
types: [published]
workflow_dispatch:
inputs:
source_ref:
description: Optional source ref to dispatch (defaults to release tag for release events, or current ref for manual runs).
required: false
type: string
source_repo:
description: Optional source repository override in OWNER/REPO format (defaults to current repository).
required: false
type: string
orchestrator-repo:
description: Optional orchestrator repository override in OWNER/REPO format.
required: false
default: NIDAP-Community/syncweaver-orchestrator
type: string

permissions:
contents: read

jobs:
notify-syncweaver:
runs-on: ubuntu-latest
env:
SOURCE_REPOSITORY: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.source_repo || github.repository }}
SOURCE_REF: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.source_ref || github.ref_name }}
ORCHESTRATOR_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['orchestrator-repo'] || vars['orchestrator-repo'] || 'NIDAP-Community/syncweaver-orchestrator' }}
steps:
- name: Validate dispatch payload
shell: bash
run: |
set -euo pipefail
if [[ -z "${SOURCE_REPOSITORY//[[:space:]]/}" ]]; then
echo "Error: source repository cannot be empty." >&2
exit 1
fi
if [[ -z "${SOURCE_REF//[[:space:]]/}" ]]; then
echo "Error: source ref cannot be empty." >&2
exit 1
fi
if [[ -z "${ORCHESTRATOR_REPO//[[:space:]]/}" ]]; then
echo "Error: orchestrator repository cannot be empty." >&2
exit 1
fi
if [[ "${ORCHESTRATOR_REPO}" != */* ]]; then
echo "Error: orchestrator repository must be in OWNER/REPO format." >&2
exit 1
fi
if [[ -z "${{ vars.CCBR_BOT_APP_ID }}" ]]; then
echo "Error: vars.CCBR_BOT_APP_ID is required to generate a dispatch token." >&2
exit 1
fi
if [[ -z "${{ secrets.CCBR_BOT_PRIVATE_KEY }}" ]]; then
echo "Error: secrets.CCBR_BOT_PRIVATE_KEY is required to generate a dispatch token." >&2
exit 1
fi

- name: Resolve orchestrator repository owner and name
id: orchestrator_repo
shell: bash
run: |
set -euo pipefail
owner="${ORCHESTRATOR_REPO%%/*}"
repo="${ORCHESTRATOR_REPO#*/}"
if [[ -z "${owner}" || -z "${repo}" ]]; then
echo "Error: failed to parse orchestrator repository '${ORCHESTRATOR_REPO}'." >&2
exit 1
fi
echo "owner=${owner}" >> "$GITHUB_OUTPUT"
echo "repository=${repo}" >> "$GITHUB_OUTPUT"

- name: Generate CCBR-bot token
id: ccbr_bot
uses: actions/create-github-app-token@v3
with:
client-id: ${{ vars.CCBR_BOT_APP_ID }}
private-key: ${{ secrets.CCBR_BOT_PRIVATE_KEY }}
owner: ${{ steps.orchestrator_repo.outputs.owner }}
repositories: ${{ steps.orchestrator_repo.outputs.repository }}

- name: Dispatch syncweaver-update-hosts workflow in orchestrator repo
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ steps.ccbr_bot.outputs.token }}
repository: ${{ env.ORCHESTRATOR_REPO }}
event-type: syncweaver-update-hosts
client-payload: >-
{"source_repository": ${{ toJson(env.SOURCE_REPOSITORY) }}, "ref": ${{ toJson(env.SOURCE_REF) }}}
29 changes: 16 additions & 13 deletions code/MOSuite/.gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
.Rproj.user
.Rhistory
.Rdata
.httr-oauth
.DS_Store
.quarto
docs
inst/doc
*_files/
**/figures/
/.github/plans/
/.httr-oauth
/.posit/
/.quarto
/.Rdata
/.Rhistory
/.Rproj.user
/.vscode/
/doc/
/docs
/inst/doc
/Meta/
/README.html
**/figures/
VennDiagram.*.log
*_files/
tests/testthat/Rplots.pdf
/tests/testthat/Rplots.pdf
/tmp
vignettes/args*.json
Rplots.pdf
/vignettes/args*.json
moo_input.rds
plot-volc-enh.json
Rplots.pdf
VennDiagram.*.log
volc-sum-params.json
1 change: 1 addition & 0 deletions code/MOSuite/.lintr
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ linters: linters_with_defaults(
commented_code_linter = NULL,
object_name_linter = NULL,
object_length_linter = object_length_linter(60L),
object_usage_linter = NULL,
return_linter = return_linter(
return_style = "explicit"
),
Expand Down
7 changes: 3 additions & 4 deletions code/MOSuite/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@ repos:
- id: trailing-whitespace
# spell check
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
rev: v2.4.3
hooks:
- id: codespell
args: ["-I=.github/WORDLIST.txt"]
# R formatting
- repo: https://github.com/posit-dev/air-pre-commit
rev: 0.9.0
rev: 0.10.0
hooks:
- id: air-format
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.4.3.9025
rev: v0.4.3.9029
hooks:
- id: parsable-R
- id: readme-rmd-rendered
- id: use-tidy-description
- id: lintr
args: [--warn_only]
Expand Down
5 changes: 0 additions & 5 deletions code/MOSuite/.vscode/extensions.json

This file was deleted.

13 changes: 0 additions & 13 deletions code/MOSuite/.vscode/settings.json

This file was deleted.

58 changes: 58 additions & 0 deletions code/MOSuite/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# multiOmicsSuite

## Description

multiOmicsSuite (`MOSuite`) is an R package for differential multi-omic analysis.
It defines an S7 class called `multiOmicDataSet` to store data and analyses from
multi-omic experiments.

Development of MOSuite follows the R packages 2nd edition (https://r-pkgs.org/),
with a few minor exceptions noted below.
Helper functions from `usethis` and `devtools` are used extensively for development tasks.

## Package conventions

- **Internal functions should have roxygen2 documentation** (with `@keywords internal`). Do not strip roxygen docs from internal functions.
- R code should pass `lintr` and `air format` (run `air format .` from the package root).
- Tests should be written with `testthat`.
- The package must pass `devtools::check()`.
- R code should adhere to the tidyverse style guide. https://style.tidyverse.org/
- Only include one return statement at the end of a function, if a return statement is used at all. Explicit returns are preferred but not required for R functions.

## Commit messages

- Commit messages must follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) (as enforced in `CONTRIBUTING.md`).
- Generate messages from staged changes only (`git diff --staged`); do not include unrelated work.
- Commits should be atomic: one logical change per commit.
- If mixed changes are present, split into multiple logical commits; the number of commits does not need to equal the number of files changed.
- Subject format must be: `<type>(optional-scope): short imperative summary` (<=72 chars), e.g., `fix(profile): update release table parser`.
- Add a body only when needed to explain **why** and notable impact; never include secrets, tokens, PHI, or large diffs.
- For AI-assisted commits, add this final italicized footer line in the commit message body: _commit message is ai-generated_

## Pull request (PR) process

- When opening a PR, use the request template (`.github/PULL_REQUEST_TEMPLATE.md`) and fill out all sections of the template in the PR description.
- Do not allow the developer to proceed with opening a PR if it does not fill out all sections of the template.
- Before a PR can be moved from draft to "ready for review", all of the relevant checklist items must be checked, and any
irrelevant checklist items should be crossed out.
- If code is AI-generated, the PR should be labeled `generated-by-AI`. There should be a brief, concise statement in the PR description of how AI was used in creating the PR (model used, high-level prompt intent, manual review confirmation).
- When new features, bug fixes, or other behavioral changes are introduced to the code,
unit tests must be added or updated to cover the new or changed functionality.
- If there are any API or other user-facing changes, the documentation must be updated both inline via roxygen comments and long-form docs in the `vignettes/` directory as R Markdown files.
- The `R-CMD-check` github actions workflow must pass before the PR can be approved.

### Changelog

The changelog for the repository is maintained in `NEWS.md` at the root of the repository.
Each pull request that introduces user-facing changes must include a concise
entry with the PR number and author username tagged.
Developer-only changes (i.e. updates to CI workflows, development notes, etc.)
should never be included in the changelog.

Example:

```
## development version

- Fix bug in `detect_absolute_paths()` to ignore comments. (#123, @username)
```
Loading
Loading