-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into MounaBelaid-patch-1
- Loading branch information
Showing
8 changed files
with
654 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Annual Release | ||
|
||
on: | ||
schedule: | ||
# Schedule to run at midnight on the 1st of January, April, July, and October | ||
- cron: '0 0 1 1,4,7,10 *' | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout your repository | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
|
||
# Set up Git user | ||
- name: Configure Git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
# Create a tag for the release | ||
- name: Create Tag | ||
run: | | ||
RELEASE="$(date +"%Y").$(date +"%m")" | ||
echo "RELEASE=$RELEASE" >> $GITHUB_ENV | ||
git tag -a "$RELEASE" -m "Automatic release $RELEASE" | ||
git push origin "$RELEASE" | ||
# Create a GitHub Release | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ env.RELEASE }} | ||
name: "Automatic Release ${{ env.RELEASE }}" | ||
body: "Quarterly release of the R-Ladies guide." | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Greet New Contributor | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
greet-and-remind: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all tags and branches | ||
|
||
- name: Check if user is a new contributor | ||
env: | ||
GITHUB_EVENT_PATH: ${{ github.event_path }} | ||
id: is-new-contributor | ||
run: | | ||
PR_AUTHOR=$(jq -r .pull_request.user.login "$GITHUB_EVENT_PATH") | ||
CONTRIBUTOR_COUNT=$(git log --format='%aN' | grep -i -c "^${PR_AUTHOR}$" || true) | ||
echo "Contributor count: $CONTRIBUTOR_COUNT" | ||
if [ "$CONTRIBUTOR_COUNT" -eq "0" ]; then | ||
echo "new_contributor=true" >> $GITHUB_ENV | ||
fi | ||
- uses: actions/github-script@v6 | ||
name: "Comment to greet and remind" | ||
if: env.new_contributor == 'true' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const PR_AUTHOR = context.payload.pull_request.user.login | ||
await github.rest.issues.createComment({ | ||
issue_number: ${{ github.event.pull_request.number}}, | ||
owner: 'rladies', | ||
repo: 'rladiesguide', | ||
body: `Welcome ${PR_AUTHOR}! It looks like this is your first contribution to this repository. 🎉\n\nPlease remember to add yourself to the '.zenodo.json'.` | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Validate Zenodo Metadata | ||
|
||
on: | ||
push: | ||
paths: | ||
- '.zenodo.json' | ||
pull_request: | ||
paths: | ||
- '.zenodo.json' | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: install curl headers | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libcurl4-openssl-dev | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
|
||
- name: Install Dependencies | ||
run: install.packages("jsonvalidate") | ||
shell: Rscript {0} | ||
|
||
- name: Get JSON schema | ||
run: | | ||
curl -s -o schema.json \ | ||
https://raw.githubusercontent.com/zenodo/zenodo/master/zenodo/modules/deposit/jsonschemas/deposits/records/legacyrecord.json | ||
- name: Validate JSON | ||
shell: Rscript {0} | ||
run: | | ||
library(jsonvalidate); | ||
validate <- jsonvalidate::json_validator('schema.json') | ||
z <- tryCatch(validate('.zenodo.json', | ||
verbose = TRUE, | ||
error = FALSE, | ||
greedy = TRUE), | ||
error = function(e) e | ||
) | ||
if(!z){ | ||
errs <- attr(z, "errors", TRUE) | ||
msg <- sprintf("'%s' %s", | ||
errs$field, | ||
errs$message) | ||
cat(paste(msg, collapse = "\n")) | ||
cat("\n") | ||
stop("json validation failed", call. = FALSE) | ||
} | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.RData | ||
.Ruserdata | ||
.markdrive | ||
schema.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{ | ||
"title": "R-Ladies organizational guidance", | ||
|
||
"description": "Source content for R-Ladies organizational guidance", | ||
|
||
"keywords": ["operational guide", "community guide"], | ||
|
||
"license": "cc-by-4.0", | ||
|
||
"communities": [{"identifier": "rladies"}], | ||
|
||
"creators": [ | ||
{ | ||
"name": "R-Ladies Global Team", | ||
"affiliation": "R-Ladies Global" | ||
}, | ||
{ | ||
"name": "Salmon, Maëlle", | ||
"affiliation": "@ropensci", | ||
"orcid": "0000-0002-2815-0399" | ||
}, | ||
{ | ||
"name": "Simeon, Katherine", | ||
"orcid": "0000-0002-0170-5585" | ||
}, | ||
{ | ||
"name": "Pileggi, Shannon", | ||
"affiliation": "The Prostate Cancer Clinical Trials Consortium", | ||
"orcid": "0000-0002-7732-4164" | ||
}, | ||
{ | ||
"name": "Mowinckel, Athanasia Monika", | ||
"affiliation": "@LCBC-UiO", | ||
"orcid": "0000-0002-5756-0223" | ||
}, | ||
{ | ||
"name": "Saibene, Yanina Bellini", | ||
"affiliation": "@ropensci", | ||
"orcid": "0000-0002-4522-7466" | ||
}, | ||
{ | ||
"name": "LeDell, Erin", | ||
"affiliation": "@h2oai" | ||
}, | ||
{ | ||
"name": "Quiroga, Riva", | ||
"orcid": "0000-0002-1147-4135" | ||
}, | ||
{ | ||
"name": "Frick, Hannah", | ||
"orcid": "0000-0002-6049-5258" | ||
}, | ||
{ | ||
"name": "Gazzelloni, Federica", | ||
"affiliation": "Data Scientist", | ||
"orcid": "0000-0002-4285-611X" | ||
}, | ||
{ | ||
"name": "Saia, Sheila", | ||
"affiliation": "Tetra Tech", | ||
"orcid": "0000-0002-4943-0306" | ||
}, | ||
{ | ||
"name": "Almarzouq, Batool", | ||
"orcid": "0000-0002-3905-2751" | ||
}, | ||
{ | ||
"name": "Thompson, Jennifer" | ||
}, | ||
{ | ||
"name": "Vitolo, Claudia", | ||
"orcid": "0000-0002-4252-1176" | ||
}, | ||
{ | ||
"name": "Rüegger, Sina", | ||
"orcid": "0009-0000-7190-9922" | ||
}, | ||
{ | ||
"name": "Acion, Laura", | ||
"orcid": "0000-0001-5213-6012" | ||
}, | ||
{ | ||
"name": "de Quieroz, Gabriela" | ||
}, | ||
{ | ||
"name": "Belaid, Mouna" | ||
}, | ||
{ | ||
"name": "Daish, Alice" | ||
}, | ||
{ | ||
"name": "Mostipak, Jesse" | ||
}, | ||
{ | ||
"name": "Loto, Patricia A." | ||
}, | ||
{ | ||
"name": "Vazquez, Daniela", | ||
"orcid": "0000-0001-8016-1469" | ||
}, | ||
{ | ||
"name": "Columbus, Alyssa" | ||
}, | ||
{ | ||
"name": "Ravi, Janani", | ||
"orcid": "0000-0001-7443-925X" | ||
}, | ||
{ | ||
"name": "Hernández, Bea" | ||
}, | ||
{ | ||
"name": "Sero, Nadejda B", | ||
"orcid": "0000-0002-3569-2014" | ||
}, | ||
{ | ||
"name": "D'Andrea, Florencia", | ||
"orcid": "0000-0002-0041-097X" | ||
} | ||
] | ||
} |
Oops, something went wrong.