Skip to content

Commit e03ed78

Browse files
fix: switch to MOSuite FigOutSync (#4)
1 parent fee2ee8 commit e03ed78

64 files changed

Lines changed: 2138 additions & 336 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/code/MOSuite linguist-vendored
1+
code/MOSuite linguist-vendored

‎.syncweaver-lock.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"sources": {
66
"code/MOSuite": {
77
"repo_url": "https://github.com/CCBR/MOSuite",
8-
"ref": "v0.3.2",
9-
"git_sha": "f4465c58a7d04f5feb41d4455a019ca4946a4ca8"
8+
"ref": "FigOutSync",
9+
"git_sha": "f2177f7c4b1efc6960e96361442e7be099c532c9"
1010
}
1111
}
1212
}

‎code/MOSuite/.Rbuildignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
VennDiagram.*\.log
3636
^[.]?air[.]toml$
3737
^\.vscode$
38+
^SECURITY\.md$
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: syncweaver-source-dispatch
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
source_ref:
9+
description: Optional source ref to dispatch (defaults to release tag for release events, or current ref for manual runs).
10+
required: false
11+
type: string
12+
source_repo:
13+
description: Optional source repository override in OWNER/REPO format (defaults to current repository).
14+
required: false
15+
type: string
16+
orchestrator-repo:
17+
description: Optional orchestrator repository override in OWNER/REPO format.
18+
required: false
19+
default: CCBR/syncweaver
20+
type: string
21+
22+
permissions:
23+
contents: read
24+
25+
jobs:
26+
notify-syncweaver:
27+
runs-on: ubuntu-latest
28+
env:
29+
SOURCE_REPOSITORY: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.source_repo || github.repository }}
30+
SOURCE_REF: ${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.source_ref || github.ref_name }}
31+
ORCHESTRATOR_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['orchestrator-repo'] || vars['orchestrator-repo'] || 'CCBR/syncweaver' }}
32+
steps:
33+
- name: Validate dispatch payload
34+
shell: bash
35+
run: |
36+
set -euo pipefail
37+
if [[ -z "${SOURCE_REPOSITORY//[[:space:]]/}" ]]; then
38+
echo "Error: source repository cannot be empty." >&2
39+
exit 1
40+
fi
41+
if [[ -z "${SOURCE_REF//[[:space:]]/}" ]]; then
42+
echo "Error: source ref cannot be empty." >&2
43+
exit 1
44+
fi
45+
if [[ -z "${ORCHESTRATOR_REPO//[[:space:]]/}" ]]; then
46+
echo "Error: orchestrator repository cannot be empty." >&2
47+
exit 1
48+
fi
49+
if [[ "${ORCHESTRATOR_REPO}" != */* ]]; then
50+
echo "Error: orchestrator repository must be in OWNER/REPO format." >&2
51+
exit 1
52+
fi
53+
if [[ -z "${{ vars.CCBR_BOT_APP_ID }}" ]]; then
54+
echo "Error: vars.CCBR_BOT_APP_ID is required to generate a dispatch token." >&2
55+
exit 1
56+
fi
57+
if [[ -z "${{ secrets.CCBR_BOT_PRIVATE_KEY }}" ]]; then
58+
echo "Error: secrets.CCBR_BOT_PRIVATE_KEY is required to generate a dispatch token." >&2
59+
exit 1
60+
fi
61+
62+
- name: Resolve orchestrator repository owner and name
63+
id: orchestrator_repo
64+
shell: bash
65+
run: |
66+
set -euo pipefail
67+
owner="${ORCHESTRATOR_REPO%%/*}"
68+
repo="${ORCHESTRATOR_REPO#*/}"
69+
if [[ -z "${owner}" || -z "${repo}" ]]; then
70+
echo "Error: failed to parse orchestrator repository '${ORCHESTRATOR_REPO}'." >&2
71+
exit 1
72+
fi
73+
echo "owner=${owner}" >> "$GITHUB_OUTPUT"
74+
echo "repository=${repo}" >> "$GITHUB_OUTPUT"
75+
76+
- name: Generate CCBR-bot token
77+
id: ccbr_bot
78+
uses: actions/create-github-app-token@v3
79+
with:
80+
client-id: ${{ vars.CCBR_BOT_APP_ID }}
81+
private-key: ${{ secrets.CCBR_BOT_PRIVATE_KEY }}
82+
owner: ${{ steps.orchestrator_repo.outputs.owner }}
83+
repositories: ${{ steps.orchestrator_repo.outputs.repository }}
84+
85+
- name: Dispatch syncweaver-update-hosts workflow in orchestrator repo
86+
uses: peter-evans/repository-dispatch@v4
87+
with:
88+
token: ${{ steps.ccbr_bot.outputs.token }}
89+
repository: ${{ env.ORCHESTRATOR_REPO }}
90+
event-type: syncweaver-update-hosts
91+
client-payload: >-
92+
{"source_repository": ${{ toJson(env.SOURCE_REPOSITORY) }}, "ref": ${{ toJson(env.SOURCE_REF) }}}

‎code/MOSuite/.gitignore‎

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
.Rproj.user
2-
.Rhistory
3-
.Rdata
4-
.httr-oauth
51
.DS_Store
6-
.quarto
7-
docs
8-
inst/doc
2+
*_files/
3+
**/figures/
4+
/.github/plans/
5+
/.httr-oauth
6+
/.posit/
7+
/.quarto
8+
/.Rdata
9+
/.Rhistory
10+
/.Rproj.user
11+
/.vscode/
912
/doc/
13+
/docs
14+
/inst/doc
1015
/Meta/
1116
/README.html
12-
**/figures/
13-
VennDiagram.*.log
14-
*_files/
15-
tests/testthat/Rplots.pdf
17+
/tests/testthat/Rplots.pdf
1618
/tmp
17-
vignettes/args*.json
18-
Rplots.pdf
19+
/vignettes/args*.json
1920
moo_input.rds
2021
plot-volc-enh.json
22+
Rplots.pdf
23+
VennDiagram.*.log
2124
volc-sum-params.json

‎code/MOSuite/.lintr‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ linters: linters_with_defaults(
33
commented_code_linter = NULL,
44
object_name_linter = NULL,
55
object_length_linter = object_length_linter(60L),
6+
object_usage_linter = NULL,
67
return_linter = return_linter(
78
return_style = "explicit"
89
),

‎code/MOSuite/.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ repos:
2626
args: ["-I=.github/WORDLIST.txt"]
2727
# R formatting
2828
- repo: https://github.com/posit-dev/air-pre-commit
29-
rev: 0.9.0
29+
rev: 0.10.0
3030
hooks:
3131
- id: air-format
3232
- repo: https://github.com/lorenzwalthert/precommit
33-
rev: v0.4.3.9025
33+
rev: v0.4.3.9028
3434
hooks:
3535
- id: parsable-R
3636
- id: readme-rmd-rendered

‎code/MOSuite/.vscode/extensions.json‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎code/MOSuite/.vscode/settings.json‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎code/MOSuite/CITATION.cff‎

Lines changed: 47 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)