You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ How to create an R package for the bican-mccarroll-manuscript1 repository.
3
3
4
4
## Creating a package using RStudio
5
5
6
-
1. Get started with github and create a branch using the [basic github workflow](https://docs.google.com/document/d/1A5T8ZVhNxP0GCQmmo1R8qaPPXah9cvSLI96U3TZdYos/edit?tab=t.0)
6
+
1. Get started with github by cloning the broadinstitute/bican-mccarroll-manuscript1 repository and creating a branch using the [basic github workflow](https://docs.google.com/document/d/1A5T8ZVhNxP0GCQmmo1R8qaPPXah9cvSLI96U3TZdYos/edit?tab=t.0)
7
7
1. In RStudio, go to `File` -> `New Project...`
8
8
1. Pick `New Directory`
9
9
1. Pick `R Package`
@@ -14,13 +14,27 @@ How to create an R package for the bican-mccarroll-manuscript1 repository.
1. Edit these two files and replace `<package_name>` with your package name
16
16
1. Do your package development as usual, including adding documentation using roxygen2.
17
+
1. Create a `README.md` file in the root of your package. You can copy the one in R/bican.mccarroll.helloworld/ and modify it as appropriate.
17
18
1. When you are ready to commit your changes, use the [basic github workflow](https://docs.google.com/document/d/1A5T8ZVhNxP0GCQmmo1R8qaPPXah9cvSLI96U3TZdYos/edit?tab=t.0) to commit and push your changes.
18
19
19
20
Note that for now we are requiring review before PRs. We can change if this is cumbersome.
20
21
21
22
Note also that the github actions are not active until they are merged into the main branch, so they won't run
22
23
until they have been merged. Subsequent PRs will trigger the R cmd check action.
23
24
25
+
## Handling less-than-perfect R CMD check results in continuous integration
26
+
Ideally your package will pass R CMD check with no errors or warnings, but if that is not possible,
27
+
you can set the `error_on` parameter of rcmdcheck in R-frob.yml like this:
28
+
```yaml
29
+
jobs:
30
+
call-R-reusable:
31
+
uses: ./.github/workflows/R-reusable.yml
32
+
with:
33
+
package_name: helloworld
34
+
error-on: 'error'# don't fail if warnings or notes are present
35
+
secrets: inherit
36
+
```
37
+
24
38
## Generating documentation via github actions
25
39
You can cause roxygen2 to run via github action by creating a PR, and then commenting on the PR
26
40
with `/document.<package_name>`, e.g. `/document.frob`. This will trigger the roxygen action, which will generate the
How to create a Python package for the bican-mccarroll-manuscript1 repository.
3
+
## Creating a package using PyCharm
4
+
1. Get started with GitHub by cloning the broadinstitute/bican-mccarroll-manuscript1 repository and creating a branch using the [basic GitHub workflow](https://docs.google.com/document/d/1A5T8ZVhNxP0GCQmmo1R8qaPPXah9cvSLI96U3TZdYos/edit?tab=t.0).
5
+
1. In PyCharm, go to `File` -> `New Project...`.
6
+
1. Set the location of the project to `<your-git-sandbox>/bican-mccarroll-manuscript1/python/bican_mccarroll_<your-package-name>`, where `<your-package-name>` is the name of your package.
7
+
1. I picked the following settings, which I'm not sure are the best:
8
+
- Interpreter type: `Custom environment`
9
+
- Environment: `Generate new`
10
+
- Type: `Virtualenv`
11
+
- Base python: `Python 3.9.6`
12
+
1. Click `Create`.
13
+
1. In the project view, create directories `src` and `tests` under the project root.
14
+
1. Right-click the `src` directory and select `New` -> `Python Package`. Name it `bican_mccarroll_<your_package_name>`.
15
+
1. Go to Settings -> Project -> Project Structure, and label 'src' and 'tests' as Sources and Tests, respectively.
16
+
1. Develop your package as usual, including unit tests as appropriate.
17
+
1. Put a `LICENSE` file in the root of your package, and a `README.md` file in the root of your package. You can copy the ones in python/bican_mccarroll_helloworld/ and modify the README.md as appropriate.
18
+
1. Create a `pyproject.toml` file in the root of your package. You can copy the one in python/bican_mccarroll_helloworld/ and modify it as appropriate.
19
+
1. When you are ready to commit your changes, use the [basic github workflow](https://docs.google.com/document/d/1A5T8ZVhNxP0GCQmmo1R8qaPPXah9cvSLI96U3TZdYos/edit?tab=t.0) to commit and push your changes.
0 commit comments