From 51534affa7a6cc82961d02f9988573f1ed6d492a Mon Sep 17 00:00:00 2001 From: David Mayer Date: Fri, 3 Oct 2025 13:59:27 -0400 Subject: [PATCH 1/9] update license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 2c9177e..9c84258 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2023, JRaviLab +Copyright (c) 2025, JRaviLab Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: From 266050c5982d2ed4a7365ddba083dfeb666c137c Mon Sep 17 00:00:00 2001 From: David Mayer Date: Mon, 6 Oct 2025 06:22:01 -0400 Subject: [PATCH 2/9] add default COC --- CODE_OF_CONDUCT.md | 139 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..7539c1a --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,139 @@ +# Code of Conduct + +We abide the [CU code of conduct](https://www.cu.edu/ope/aps/2027) as part of our association with the University of Colorado Anshutz Medical Campus. + +Additionally, we follow the Contributor Covenant Code of Conduct, as found below. + +## Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socioeconomic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to community leaders responsible for enforcement. +Please open a [new security advisory notice](https://github.com/CU-DBMI/.github/security/advisories/new) (using defaults or β€œn/a” where unable to fill in the form) to privately notify us of any incidents of this nature. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][mozilla coc]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][faq]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[faq]: https://www.contributor-covenant.org/faq +[homepage]: https://www.contributor-covenant.org +[mozilla coc]: https://github.com/mozilla/diversity +[translations]: https://www.contributor-covenant.org/translations +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html \ No newline at end of file From 1a207a7a5054c3eaa1d0a51cbf00069ca5506540 Mon Sep 17 00:00:00 2001 From: David Mayer Date: Mon, 6 Oct 2025 06:32:33 -0400 Subject: [PATCH 3/9] add lintr GHA --- .Rbuildignore | 1 + .github/.gitignore | 1 + .github/workflows/lint-project.yaml | 32 +++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 .Rbuildignore create mode 100644 .github/.gitignore create mode 100644 .github/workflows/lint-project.yaml diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..c503c4f --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1 @@ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/lint-project.yaml b/.github/workflows/lint-project.yaml new file mode 100644 index 0000000..e0192f1 --- /dev/null +++ b/.github/workflows/lint-project.yaml @@ -0,0 +1,32 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + +name: lint-project.yaml + +permissions: read-all + +jobs: + lint-project: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - name: Install lintr + run: install.packages("lintr") + shell: Rscript {0} + + - name: Lint root directory + run: lintr::lint_dir() + shell: Rscript {0} + env: + LINTR_ERROR_ON_LINT: true From eef97e81c6c8c560329d280f5682137fb667a0c8 Mon Sep 17 00:00:00 2001 From: David Mayer Date: Mon, 6 Oct 2025 06:41:05 -0400 Subject: [PATCH 4/9] add bug report/feature request --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f94fc1f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "\U0001F41E[BUG]" +labels: bug +assignees: jananiravi + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Use code '...' (or add hyperlink) +2. Click on '...' +3. Scroll down to '...' +4. See error/issue + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g., iOS] + - Browser [e.g., chrome, safari] + - Version [e.g., 22] + +**Smartphone (please complete the following information):** + - Device: [e.g., iPhone16] + - OS: [e.g., iOS8.1] + - Browser [e.g., stock browser, safari] + - Version [e.g., 22] + +**Additional context** +Please add any other context about the problem here, along with screenshots, code snippets, possible fixes, and relevant information to help troubleshoot. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..8eabd1f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "\U0001F195 [FEAT]" +labels: enhancement +assignees: jananiravi + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. E.g., I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen and how you envision this. If you already have a solution, awesome πŸ™Œ -- link to the branch/PR here. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file From 771851143d140e437682477ea6ca4d89aa0d3e9d Mon Sep 17 00:00:00 2001 From: David Mayer Date: Mon, 6 Oct 2025 06:45:33 -0400 Subject: [PATCH 5/9] add PR template --- .github/pull_request_template.md | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..191e2e6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,39 @@ + + +# Description + + + +## What kind of change(s) are included? + +- [ ] Feature (adds or updates new capabilities) +- [ ] Bug fix (fixes an issue). +- [ ] Enhancement (adds functionality). +- [ ] Breaking change (these changes would cause existing functionality to not work as expected). + +# Checklist + +Please ensure that all boxes are checked before indicating that this pull request is ready for review. + +- [ ] I have read and followed the [CONTRIBUTING.md](CONTRIBUTING.md) guidelines. +- [ ] I have searched for existing content to ensure this is not a duplicate. I have deduplicated my codebase. +- [ ] I have performed a self-review of these additions (including spelling, grammar, and related). +- [ ] I have implemented basic code linting, styling, and indentation (e.g., with lintr, styler). +- [ ] I have added comments to my code to help provide understanding. +- [ ] I have added a test which covers the code changes found within this PR. +- [ ] I have added necessary data (or sample data) to test run these scripts. +- [ ] **Reviewer assignment**: Tag a relevant team member to review and approve the changes. \ No newline at end of file From 552b60ebba2caec94de68c72e5bd07a1e35549fc Mon Sep 17 00:00:00 2001 From: David Mayer Date: Mon, 6 Oct 2025 10:55:57 -0400 Subject: [PATCH 6/9] initial styler config --- .github/workflows/style.yaml | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/style.yaml diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml new file mode 100644 index 0000000..e2f7df8 --- /dev/null +++ b/.github/workflows/style.yaml @@ -0,0 +1,76 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + paths: ["**.[rR]", "**.[qrR]md", "**.[rR]markdown", "**.[rR]nw", "**.[rR]profile"] + +name: style.yaml + +permissions: read-all + +jobs: + style: + runs-on: ubuntu-latest + permissions: + contents: write + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup R + uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - name: Install styler and roxygen2 + uses: r-lib/actions/setup-r-dependencies@v2 + with: + packages: styler, roxygen2 + + - name: Enable styler cache + run: styler::cache_activate() + shell: Rscript {0} + + - name: Determine cache location + id: styler-location + run: | + cat( + "location=", + styler::cache_info(format = "tabular")$location, + "\n", + file = Sys.getenv("GITHUB_OUTPUT"), + append = TRUE, + sep = "" + ) + shell: Rscript {0} + + - name: Cache styler + uses: actions/cache@v4 + with: + path: ${{ steps.styler-location.outputs.location }} + key: ${{ runner.os }}-styler-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-styler- + ${{ runner.os }}- + + - name: Style + run: styler::style_dir() + shell: Rscript {0} + + - name: Commit and push changes + run: | + if FILES_TO_COMMIT=($(git diff-index --name-only ${{ github.sha }} \ + | egrep --ignore-case '\.(R|[qR]md|Rmarkdown|Rnw|Rprofile)$')) + then + git config --local user.name "$GITHUB_ACTOR" + git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" + git commit ${FILES_TO_COMMIT[*]} -m "Style code (GHA)" + git pull --ff-only + git push origin + else + echo "No changes to commit." + fi From 5b52eb19a6f1af522c4f7564b9ab2d625939b039 Mon Sep 17 00:00:00 2001 From: David Mayer Date: Mon, 6 Oct 2025 11:02:52 -0400 Subject: [PATCH 7/9] use bioc style --- .github/workflows/style.yaml | 37 +++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index e2f7df8..9187682 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -1,10 +1,25 @@ # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +name: style.yaml + on: push: - paths: ["**.[rR]", "**.[qrR]md", "**.[rR]markdown", "**.[rR]nw", "**.[rR]profile"] + branches: + - main + paths: + - "**.[rR]" + - "**.[qrR]md" + - "**.[rR]markdown" + - "**.[rR]nw" + - "**.[rR]profile" -name: style.yaml + pull_request: + paths: + - "**.[rR]" + - "**.[qrR]md" + - "**.[rR]markdown" + - "**.[rR]nw" + - "**.[rR]profile" permissions: read-all @@ -20,16 +35,17 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.head_ref || github.ref_name }} - name: Setup R uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - - name: Install styler and roxygen2 + - name: Install styler, biocthis, and roxygen2 uses: r-lib/actions/setup-r-dependencies@v2 with: - packages: styler, roxygen2 + packages: styler, biocthis, roxygen2 - name: Enable styler cache run: styler::cache_activate() @@ -58,19 +74,18 @@ jobs: ${{ runner.os }}- - name: Style - run: styler::style_dir() + run: styler::style_dir(transformers = biocthis::bioc_style()) shell: Rscript {0} - name: Commit and push changes run: | - if FILES_TO_COMMIT=($(git diff-index --name-only ${{ github.sha }} \ - | egrep --ignore-case '\.(R|[qR]md|Rmarkdown|Rnw|Rprofile)$')) - then + FILES_TO_COMMIT=$(git diff --name-only | egrep -i '\.(r|[qr]md|rmarkdown|rnw|rprofile)$' || true) + if [ -n "$FILES_TO_COMMIT" ]; then git config --local user.name "$GITHUB_ACTOR" git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - git commit ${FILES_TO_COMMIT[*]} -m "Style code (GHA)" - git pull --ff-only - git push origin + git add $FILES_TO_COMMIT + git commit -m "Style code (GHA)" + git push origin HEAD:${{ github.head_ref || github.ref_name }} else echo "No changes to commit." fi From b6b59c4bc26f0fc1d87a8295a392915abb7ddff7 Mon Sep 17 00:00:00 2001 From: David Mayer Date: Wed, 8 Oct 2025 08:24:27 -0400 Subject: [PATCH 8/9] add contributing guide --- .github/CONTRIBUTING.md | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/CONTRIBUTING.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..6b585b8 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,91 @@ +# Contribution guide + +This outlines how to propose a change to this repo. +For a detailed discussion on contributing to this and other tidyverse packages, please see the [development contributing guide](https://rstd.io/tidy-contrib) and our [code review principles](https://code-review.tidyverse.org/). + +## Fixing typos + +You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the _source_ file. +This generally means you'll need to edit [roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a `.Rd` file. +You can find the `.R` file that generates the `.Rd` by reading the comment in the first line. + +## Bigger changes + +If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed. +If you’ve found a bug, please file an issue that illustrates the bug with a minimal +[reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed). +See our guide on [how to create a great issue](https://code-review.tidyverse.org/issues/) for more advice. + +### Pull request process + +- Fork the repository and clone onto your computer. If you haven't done this before, we recommend using `usethis`. + +- Install and load the `usethis` package with: + + ``` + install.packages("usethis") + + library("usethis") + ``` + +- If you are outside our group and the repo is public, please fork this repo using: + + ``` + usethis::create_from_github("JRaviLab/REPONAME", fork = TRUE) + ``` +- Install BiocManager from Bioconductor: + + ``` + if (!require("BiocManager", quietly = TRUE)) + install.packages("BiocManager") + BiocManager::install(version = "3.19") + ``` + +- If this repository is a package, install other development dependencies and then ensure that the package passes R CMD check using `devtools`: + + ``` + install.packages("devtools") + + library("devtools") + + devtools::install_dev_deps() + + devtools::check() + ``` + + _If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing._ + +- Create a Git branch for your pull request (PR). We recommend using: + + ``` + usethis::pr_init("brief-description-of-change") + ``` + +- Make your changes, commit to git, and then create a PR by running `usethis::pr_push()`, and following the prompts in your browser. + The title of your PR should briefly describe the change. + The body of your PR should contain `Fixes #issue-number`. + +### Code style + +- New code should follow the tidyverse [style guide](https://style.tidyverse.org). + You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR. +- Lint Your Code: Ensure your code adheres to our style guidelines by using [lintr](https://lintr.r-lib.org/): + + ``` + install.packages("lintr") + + library("lintr") + + lintr::lint("path/to/your/file.R") + ``` + +- We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for package documentation. + +- We use [testthat](https://cran.r-project.org/package=testthat) for unit tests. + Contributions with test cases included are easier to accept. + +## Code of Conduct + +Please note that the this project is released with a +[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this +project you agree to abide by its terms. \ No newline at end of file From 0433e69cc439d0a96190654207b57d8fdebcf050 Mon Sep 17 00:00:00 2001 From: David Mayer Date: Wed, 8 Oct 2025 08:29:03 -0400 Subject: [PATCH 9/9] add new member guide --- newmember_guidelines.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 newmember_guidelines.md diff --git a/newmember_guidelines.md b/newmember_guidelines.md new file mode 100644 index 0000000..35d42d0 --- /dev/null +++ b/newmember_guidelines.md @@ -0,0 +1,21 @@ +# Getting started +Welcome aboard! πŸ™Œ + +[JRaviLab Onboarding](https://jravilab.github.io/lab_docs/onboarding.html) + +1. Visit the main [NewPackage repository](https://github.com/jravilab/NewPackage/); please start with the `README` doc in the repository. +2. Read our companion preprint [here](https://jravilab.github.io/publication). +3. Follow instructions from the repo `README` to install `NewPackage`, starting with [bioconductor installation instructions](https://bioconductor.org/install/). +4. Make sure you can build the package with `R CMD build` or run tests with `devtools`. +5. Check out [open issues](https://github.com/JRaviLab/NewPackage/issues), select a task [labeled quickfix](https://github.com/JRaviLab/NewPackage/issues?q=is%3Aissue+is%3Aopen+label%3Aquickfix), and ask to be assigned to it. +6. Create a branch for the specific task and submit a PR (["pull request"](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)), and respond to any feedback from reviewers. + +## Resources +- πŸ’»[How to Code](https://jravilab.github.io/lab_docs/howto.html#code) + - [Learn R](https://jravilab.github.io/lab_docs/howto.html#learn-r) + - [Git/GitHub basics](https://jravilab.github.io/lab_docs/howto.html#learn-gitgithub) +- πŸ—£οΈ[Scientific Communication](https://jravilab.github.io/lab_docs/howto.html#readwritepresent) +- πŸ‘₯[Lab Culture & working with the JRaviLab](https://jravilab.github.io/lab_docs/culture.html) | [Expectations](https://jravilab.github.io/lab_docs/culture.html#undergraduates-short-term-internsvisiting-scientists) + +- ## Contact +- πŸ“§ Janani Ravi | [Email](mailto:janani.ravi@cuanschutz.edu) \ No newline at end of file