Skip to content

Commit b5bc6c6

Browse files
committed
docs: create flow chart for new features and match with documentation
1 parent f56f5e6 commit b5bc6c6

7 files changed

Lines changed: 100 additions & 88 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ R package for Single Cell analysis
1010
[![](https://raw.githubusercontent.com/NIDAP-Community/SCWorkflow/GalaxyCLI/vignettes/SCWorkflow.png)](https://lucid.app/lucidchart/c7b852ad-72dc-4821-90d5-e45bed0c4199/view)
1111

1212

13-
<center>**Click Figure to Navigate Workflow**.</center>
13+
<!-- <center>**Click Figure to Navigate Workflow**.</center> -->
1414

1515
<br>
1616
<br>

_pkgdown.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ template:
1111
btn-border-radius: 3px
1212
grid-gutter-width: 3rem
1313
pkgdown-nav-height: 78px
14+
params:
15+
toc:
16+
smooth_scroll: true
17+
toc_float: true
18+
toc_collapsed: true # Start with TOC collapsed
1419

1520
navbar:
1621
structure:

docs/index.html

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ articles:
1010
SCWorkflow-SubsetReclust: SCWorkflow-SubsetReclust.html
1111
SCWorkflow-Usage: SCWorkflow-Usage.html
1212
SCWorkflow-Visualizations: SCWorkflow-Visualizations.html
13-
last_built: 2025-11-25T21:56Z
13+
last_built: 2025-12-16T01:06Z
1414
urls:
1515
reference: https://nidap-community.github.io/SCWorkflow/reference
1616
article: https://nidap-community.github.io/SCWorkflow/articles

docs/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

vignettes/CONTRIBUTING.Rmd

Lines changed: 91 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,20 @@ knitr::opts_chunk$set(
2121
run_Chunks=FALSE
2222
```
2323

24+
# Overview {#overview}
2425

25-
<br><br>
26+
![](./images/DEV_CheatSheet.png){}
27+
28+
<br>
2629

27-
# **Clone the repo** {#clone-the-repo}
30+
# **Propose Change** {#propose-changes}
2831

2932
---
3033

34+
35+
36+
## **Clone the repo** {#clone-the-repo}
37+
3138
If you are a member of [CCBR](https://github.com/CCBR),
3239
you can clone this repository to your computer or development environment.
3340

@@ -48,23 +55,17 @@ git clone --single-branch --branch DEV https://github.com/NIDAP-Community/SCWork
4855
> Resolving deltas: 100% (1754/1754), done. <br>
4956
> Updating files: 100% (306/306), done. <br>
5057
51-
<br>
5258
```sh
5359
cd SCWorkflow
5460
```
5561

56-
<br><br>
57-
58-
# **Install dependencies** {#install-dependencies}
59-
62+
<br>
6063

61-
---
64+
## **Install dependencies** {#install-dependencies}
6265

6366
If this is your first time cloning the repo you may have to install dependencies
6467

65-
<br
66-
67-
**Steps to follow:**
68+
<!-- **Steps to follow:** -->
6869

6970
**Check R CMD:** In an R console, make sure the package passes R CMD check by running:
7071
```r
@@ -82,51 +83,56 @@ If this is your first time cloning the repo you may have to install dependencies
8283
This will install the repo's pre-commit hooks.
8384
You'll only need to do this step the first time you clone the repo. -->
8485

85-
<br><br>
86-
87-
# **Load SCWorkflow from repo** {#load-scworkflow}
88-
86+
<br>
8987

90-
---
88+
## **Load SCWorkflow from repo** {#load-scworkflow}
9189

9290
In an R console, load the package from the local repo using:
9391

9492
```r
9593
devtools::load_all()
9694
```
9795

98-
<br><br>
99-
100-
# **Create a branch** {#create-branch}
101-
96+
<br>
10297

103-
---
98+
## **Create branch** {#create-branch}
10499

105100
Create a Git branch for your pull request (PR). Give the branch a descriptive name for the changes you will make.
106101

107-
<br>
108-
109102
**Example:** Use `iss-10` if it's for a specific issue, or `feature-new-plot` for a new feature.
110103

104+
For bug fixes or small changes, you can branch from the `main` branch.
105+
111106
```sh
112-
# Create a new branch and switch to it
107+
# Create a new branch from main and switch to it
113108
git branch iss-10
114109
git switch iss-10
115110
```
116-
117111
> **Success:** Switched to a new branch 'iss-10'
118112
113+
For new features or larger changes, branch from the `DEV` branch.
114+
115+
```sh
116+
# Switch to DEV branch, create a new branch, and switch to new branch
117+
git switch DEV
118+
git branch feature-new-plot
119+
git switch feature-new-plot
120+
```
121+
> **Success:** Switched to a new branch 'feature-new-plot'
122+
119123
<br><br>
120124

121-
# **Make your changes** {#make-changes}
125+
# Develop {#develop}
122126

123127
---
124128

129+
## **Make your changes** {#make-changes}
130+
125131
Now you're ready to edit the code, write unit tests, and update the documentation as needed.
126132

127133
<br>
128134

129-
## **Code Style Guidelines**
135+
### **Code Style Guidelines**
130136

131137

132138
New code should follow the general guidelines outlined [here](https://nih.sharepoint.com/sites/NCI-CCR-CCBR-NIDAP/SitePages/R-Package-Coding-Style-and-Best-Practices.aspx).
@@ -147,7 +153,7 @@ New code should follow the general guidelines outlined [here](https://nih.sharep
147153

148154
<br>
149155

150-
## **Function Organization**
156+
### **Function Organization**
151157

152158
**Structure your functions like this:**
153159

@@ -187,56 +193,12 @@ yourFunction <- function(param1, param2) {
187193
return(output_list)
188194
}
189195
```
190-
<br> <br>
191-
192-
## **Writing Tests**
193-
194-
**Why tests matter:** Most changes to the code will also need unit tests to demonstrate that the changes work as intended.
195-
196-
**How to add tests:**
197-
198-
1. Use [`testthat`](https://testthat.r-lib.org/) to create your unit tests
199-
2. Follow the organization described in the [tidyverse test style guide](https://style.tidyverse.org/tests.html)
200-
3. Look at existing code in this package for examples
201-
202-
203-
## **Documentation**
204-
205-
**When to update documentation:**
206-
207-
- Written a new function
208-
- Changed the API of an existing function
209-
- Function is used in a vignette
210-
211-
**How to update documentation:**
212-
213-
1. Use [roxygen2](https://cran.r-project.org/package=roxygen2) with [Markdown syntax](https://roxygen2.r-lib.org/articles/rd-formatting.html)
214-
2. See the [R Packages book](https://r-pkgs.org/man.html) for detailed instructions
215-
3. Update relevant vignettes if needed
216-
217-
<br><br>
218-
219-
# **Check Your Work** {#check}
220-
221-
🔍 **Final validation step:**
222-
223-
224-
---
225-
226-
After making your changes, run the following command from an R console to make sure the package still passes R CMD check:
227-
228-
```r
229-
devtools::check()
230-
```
231-
232-
> **Goal:** All checks should pass with no errors, warnings, or notes.
196+
<br>
233197

234-
<br><br>
235198

236-
# **Commit and Push Your Changes** {#commit-push}
199+
## **Commit and Push Your Changes** {#commit-push}
237200

238201

239-
---
240202

241203
**Best practices for commits:**
242204

@@ -269,11 +231,11 @@ Add the files that you changed to the staging area:
269231
git commit -m 'feat: create function for awesome feature'
270232
```
271233

272-
Your commit message should follow the
273-
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
274-
specification.
275-
Briefly, each commit should start with one of the approved types such as
276-
`feat`, `fix`, `docs`, etc. followed by a description of the commit.
234+
Your commit message should follow the
235+
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
236+
specification.
237+
Briefly, each commit should start with one of the approved types such as
238+
`feat`, `fix`, `docs`, etc. followed by a description of the commit.
277239
Take a look at the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/#summary)
278240
for more detailed information about how to write commit messages.
279241

@@ -327,8 +289,8 @@ will appear after the pre-commit messages showing that the commit was created.
327289
git push
328290
```
329291

330-
If this is the first time you are pushing this branch, you may have to
331-
explicitly set the upstream branch:
292+
If this is the first time you are pushing this branch, you may have to
293+
explicitly set the upstream branch:
332294

333295
```sh
334296
git push --set-upstream origin iss-10
@@ -341,7 +303,54 @@ You can view the files in your branch on GitHub at
341303

342304
<br><br>
343305

344-
# **Create a PR**
306+
307+
# Document and Tests {#docs-tests}
308+
309+
---
310+
311+
## **Writing Tests**
312+
313+
**Why tests matter:** Most changes to the code will also need unit tests to demonstrate that the changes work as intended.
314+
315+
**How to add tests:**
316+
317+
1. Use [`testthat`](https://testthat.r-lib.org/) to create your unit tests
318+
2. Follow the organization described in the [tidyverse test style guide](https://style.tidyverse.org/tests.html)
319+
3. Look at existing code in this package for examples
320+
321+
<br>
322+
323+
## **Documentation**
324+
325+
**When to update documentation:**
326+
327+
- Written a new function
328+
- Changed the API of an existing function
329+
- Function is used in a vignette
330+
331+
**How to update documentation:**
332+
333+
1. Use [roxygen2](https://cran.r-project.org/package=roxygen2) with [Markdown syntax](https://roxygen2.r-lib.org/articles/rd-formatting.html)
334+
2. See the [R Packages book](https://r-pkgs.org/man.html) for detailed instructions
335+
3. Update relevant vignettes if needed
336+
337+
<br>
338+
339+
## **Check Your Work** {#check}
340+
341+
🔍 **Final validation step:**
342+
343+
After making your changes, run the following command from an R console to make sure the package still passes R CMD check:
344+
345+
```r
346+
devtools::check()
347+
```
348+
349+
> **Goal:** All checks should pass with no errors, warnings, or notes.
350+
351+
<br><br>
352+
353+
# **Deploy Feature** {#deploy-feature}
345354

346355
---
347356

363 KB
Loading

0 commit comments

Comments
 (0)