Skip to content
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

Set up our first GH Action with Styler, Spelling and others #26

Open
2 tasks
bms63 opened this issue Feb 8, 2025 · 5 comments
Open
2 tasks

Set up our first GH Action with Styler, Spelling and others #26

bms63 opened this issue Feb 8, 2025 · 5 comments
Assignees

Comments

@bms63
Copy link
Contributor

bms63 commented Feb 8, 2025

Background

Adhering to the same style of coding is really nice and makes reviewing code so much easier. We are following the tidyverse style guide.

Every PR coming in should fail if the style is not tidyverse style.

Definition of Done

  • Implement GH Action using styler package when a Pull Request is created
  • Action should fail if style isn't following tidyverse style

@RConsortium/pilot5 anyone want to set this one up!! I think this one is nice https://github.com/r-lib/actions/blob/v2/examples/style.yaml

@elimillera
Copy link
Member

@bms63 I'm happy to take this and any other CI/CD stuff

@bms63
Copy link
Contributor Author

bms63 commented Feb 8, 2025

Yay!!

What do you think about setting up a lintr action? I'd like to implement just the vanilla lintrs on our code. Most our caught by styler, but checking for commented out code would be nice win!

In the website repo it would be good to set up a link checker @parmsam-pfizer WDYT?

@elimillera
Copy link
Member

@bms63 It looks like these were already implemented in the last release and pulled over:
https://github.com/RConsortium/submissions-pilot5-datasetjson/blob/main/.github/workflows/style.yml
https://github.com/RConsortium/submissions-pilot5-datasetjson/blob/main/.github/workflows/lint.yml
https://github.com/RConsortium/submissions-pilot5-datasetjson/blob/main/.github/workflows/link.yml

@bms63
Copy link
Contributor Author

bms63 commented Feb 9, 2025

oh right - yeah can you make sure they are all using latest versions?

the big CI action will be comparing the datasets we create to several sources: pilot 3 datasets, original CDISC pilot datasets, and recent datasetjson COSA pilot. I was thinking of diffdf for the datasets, but not sure what to use for comparing json files.

@robertdevine
Copy link
Collaborator

robertdevine commented Feb 12, 2025

@bms63 - the jsonlite package in CRAN (which dataset-json v0.3.0 suggests here >= v1.8.0) supports functionality to compare if JSON files are identical. We can also write a custom function (if necessary) for pilot5 utils to compare length and drill down through key-value pairs to check for any differences across JSON files. Seems reasonable to use the CDISC pilot datasets noted in the Slack pilot5 channel here as the single point of truth.

@elimillera - in pilot3 we used atorus-research CDISC replication repo here as the single point of truth during QC and outputs replica match confirmation.

@bms63 bms63 changed the title Set up our first GH Action with Styler Set up our first GH Action with Styler, Spelling and others Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants