Skip to content

Commit 1ef4bb2

Browse files
authored
Prepare for open sourcing (#42)
* Prepare for open sourcing * Address comments * Update README
1 parent 35e9861 commit 1ef4bb2

File tree

15 files changed

+430
-97
lines changed

15 files changed

+430
-97
lines changed

.github/CONTRIBUTING.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Contribution Guidelines
2+
3+
First of all, thank you for taking the time to contribute! ✌️ 🎉
4+
5+
We love your input regardless of its size, content or scope - whether it is an issue, feature request, bug-fix or documentation enhancement.
6+
7+
Thanks 🙏 You rock 🤘
8+
9+
## Table of contents
10+
11+
[👶 Getting started](#getting-started)
12+
13+
[📔 Code of Conduct](#code-of-conduct)
14+
15+
[🗃 License](#license)
16+
17+
[🐛 How to report a bug?](#how-to-report-a-bug)
18+
19+
[💡 How to request the change?](#how-to-request-the-change)
20+
21+
[🚩 How to submit a change?](#how-to-submit-a-change)
22+
23+
[👗 Style guide](#style-guide)
24+
25+
[🧐 Recognition model](#recognition-model)
26+
27+
[❓ Any questions](#any-questions)
28+
29+
## Getting started
30+
31+
For an introduction, please read [`README`](README.md) file. You can also find vignettes [here](vignettes/). Usually you will find a "Getting started" article. Please also see the package manual in the form of a `pkgdown` website.
32+
33+
## Code of Conduct
34+
35+
This project is governed by [Code of Conduct](../CODE_OF_CONDUCT.md). By participating, you are expected to follow the rules outlined there.
36+
37+
## License
38+
39+
All of your code changes would be under the same [license](../LICENSE) that covers this project.
40+
41+
## How to report a bug?
42+
43+
We use GitHub to track issues, feature requests as well as bugs. Before opening a new issue please double-check if it's already reported (but don't worry if to be a duplicate - we will manage). If already there - up-vote ⬆️. We will have a look at it faster!
44+
45+
We kindly ask you to write a good issue with a minimal and reproducible example that demonstrates the problem. It would also be great to know your local environment (R session info) as well. You will find our template for issues when opening a bug ticket. This will speed up the fixing process a lot! 📈.
46+
47+
## How to request the change?
48+
49+
If you notice a missing feature or you have an idea how to enhance existing functionalities - please let us know by creating a new issue. Before opening a new issue please double-check if it's already reported (but don't worry if occurs to be a duplicate - we will manage). If already there - up-vote ⬆️. We will have a look at it faster!
50+
51+
Please elaborate on "why?" - what's the context, what's the benefit and for whom. You will find our template when opening a feature request ticket. This will help us prioritize and submit meaningful changes.
52+
53+
## How to submit a change?
54+
55+
### GitHub Flow
56+
57+
We are following [GitHub Flow](https://docs.github.com/en/get-started/quickstart/github-flow) to collaborate in this repository. In order to submit the changes please do the following:
58+
59+
1. Open a branch
60+
61+
Please see branch naming convention below. If you don't have write access please fork it first.
62+
63+
1. Make changes.
64+
65+
Make sure your code passes all the checks and is well documented and tested so as not to decrease existing test coverage 💪.
66+
67+
1. Create a PR(s)
68+
69+
Please link an issue and make a good change description. Include development assumptions when necessary. Give all the details for a reviewer to efficiently check your changes.
70+
71+
1. Address review comments
72+
73+
Please apply changes where necessary. If you disagree with a reviewer - please explain why.
74+
75+
1. Once approved - merge your PR(s) and delete a branch
76+
77+
### Branching convention
78+
79+
In case you are working on a task inside one specific repository, please name your branch `<issue_id>_<short_description>` all lowercase. Multiple words of the description should be divided by an underscore (`_`). E.g. `15_fix_spelling_error` in case you try to solve a spelling mistake mentioned in the issue number `15`.
80+
81+
In case you are working on a task from one repository that affects multiple repositories, please always name your branches: `<issue_id>_<issue_repo>_<short description>` all lowercase. Multiple words of the description should be divided by an underscore (`_`). E.g. `15_abc_fix_spelling_error` in case you try to solve a spelling mistake inside `xyz` which closes issue `15` inside `abc`.
82+
83+
### `monorepo` and `staged.dependencies`
84+
85+
Sometimes you might need to change upstream dependent package(s) to be able to submit a meaningful change. We are using [`staged.dependencies`](https://github.com/openpharma/staged.dependencies) functionality to simulate a `monorepo` behavior. The configuration is already in the [`staged_dependencies.yaml`](../staged_dependencies.yaml) file. You just need to name the feature branches identically. This is the only exception from branch naming convention described above. Please read the package manual for more details.
86+
87+
### Recommended development environment & tools
88+
89+
#### R & package versions
90+
91+
We continuously test our packages against the newest R version as well as a given package dependencies. We recommend to set-up your working environment in the same way. You can find all the details in a given GitHub Action execution log - there is a step that prints out session info.
92+
93+
If you find out any bugs on the older version of dependencies - please create appropriate bug ticket.
94+
95+
#### `pre-commit`
96+
97+
We highly recommend the [`pre-commit`](https://pre-commit.com/) tool combined with [`R hooks for pre-commit`](https://github.com/lorenzwalthert/precommit) to execute some of the checks prior committing and pushing. The configuration is already there in a repository ([here](../.pre-commit-config.yaml)). Please, follow the installation guide on the official [`pre-commit` page](https://github.com/lorenzwalthert/precommit) and the [`GitHub` `readme` page](https://github.com/lorenzwalthert/precommit#installation) for the R hooks.
98+
99+
## Style guide
100+
101+
This repository follows standard [`tidyverse` style guide](https://style.tidyverse.org/) and it's being checked against it by [`lintr`](https://github.com/r-lib/lintr). There are some slight modifications to its default settings available in the [`.lintr`](../.lintr) file.
102+
103+
Although it allows for some flexibility - we recommend sticking to the style of the existing code.
104+
105+
Please note that there is a style and also `lintr` check in place that will validate your code.
106+
107+
## Recognition model
108+
109+
Any contribution is highly welcomed and appreciated. While all the contribution data is already there in GitHub repository insights feature, we introduced some objective rules to recognize a _significant_ contribution so as to became a package author:
110+
111+
- Minimum 5% of lines of code authored (determined by `git blame` query) OR
112+
- Being at the top 5 contributors in terms of number of commits OR lines added OR lines removed.
113+
114+
The package maintainer also reserves the rights to manually adjust the criteria to recognize contributions.
115+
116+
## Any questions
117+
118+
If you have any further questions regarding contribution - please reach out to the repository maintainer(s)!

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: 🐞 Bug Report
3+
description: File a bug report
4+
title: "[Bug]: <title>"
5+
labels: ["bug"]
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
- type: textarea
12+
id: what-happened
13+
attributes:
14+
label: What happened?
15+
description: Also tell us, what did you expect to happen?
16+
placeholder: Tell us what you see!
17+
value: "A bug happened!"
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: session-info
22+
attributes:
23+
label: sessionInfo()
24+
description: Please copy and paste your output from `sessionInfo()`. This will be automatically formatted into code, so no need for backticks.
25+
render: R
26+
- type: textarea
27+
id: logs
28+
attributes:
29+
label: Relevant log output
30+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
31+
render: R
32+
- type: checkboxes
33+
id: code-of-conduct
34+
attributes:
35+
label: Code of Conduct
36+
description: By submitting this issue, you agree to follow our [Code of Conduct.](https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html)
37+
options:
38+
- label: I agree to follow this project's Code of Conduct.
39+
required: true
40+
- type: checkboxes
41+
id: contributor-guidelines
42+
attributes:
43+
label: Contribution Guidelines
44+
description: By submitting this issue, you agree to follow our [Contribution Guidelines.](https://insightsengineering.github.io/teal.code/CONTRIBUTING.html)
45+
options:
46+
- label: I agree to follow this project's Contribution Guidelines.
47+
required: true
48+
- type: checkboxes
49+
id: security-policy
50+
attributes:
51+
label: Security Policy
52+
description: By submitting this issue, you agree to follow our [Security Policy.](https://github.com/insightsengineering/teal.code/security/policy)
53+
options:
54+
- label: I agree to follow this project's Security Policy.
55+
required: true

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
blank_issues_enabled: false
3+
4+
contact_links:
5+
- name: We are hiring!
6+
url: https://careers.gene.com/
7+
about: Genentech and Roche are hiring!
8+
- name: Pharmaverse
9+
url: https://pharmaverse.org/
10+
about: Related projects @ Pharmaverse.org

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: ✨ Feature Request
3+
description: Request or propose a new feature
4+
title: "[Feature Request]: <title>"
5+
labels: ["enhancement"]
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: Feature description
10+
validations:
11+
required: true
12+
- type: checkboxes
13+
id: code-of-conduct
14+
attributes:
15+
label: Code of Conduct
16+
description: By submitting this issue, you agree to follow our [Code of Conduct.](https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html)
17+
options:
18+
- label: I agree to follow this project's Code of Conduct.
19+
required: true
20+
- type: checkboxes
21+
id: contributor-guidelines
22+
attributes:
23+
label: Contribution Guidelines
24+
description: By submitting this issue, you agree to follow our [Contribution Guidelines.](https://insightsengineering.github.io/teal.code/CONTRIBUTING.html)
25+
options:
26+
- label: I agree to follow this project's Contribution Guidelines.
27+
required: true
28+
- type: checkboxes
29+
id: security-policy
30+
attributes:
31+
label: Security Policy
32+
description: By submitting this issue, you agree to follow our [Security Policy.](https://github.com/insightsengineering/teal.code/security/policy)
33+
options:
34+
- label: I agree to follow this project's Security Policy.
35+
required: true

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: ❓ Question
3+
description: Question about usage or documentation
4+
title: "[Question]: <title>"
5+
labels: ["question"]
6+
body:
7+
- type: textarea
8+
attributes:
9+
label: What is your question?
10+
validations:
11+
required: true
12+
- type: checkboxes
13+
id: code-of-conduct
14+
attributes:
15+
label: Code of Conduct
16+
description: By submitting this issue, you agree to follow our [Code of Conduct.](https://insightsengineering.github.io/teal.code/CODE_OF_CONDUCT.html)
17+
options:
18+
- label: I agree to follow this project's Code of Conduct.
19+
required: true
20+
- type: checkboxes
21+
id: contributor-guidelines
22+
attributes:
23+
label: Contribution Guidelines
24+
description: By submitting this issue, you agree to follow our [Contribution Guidelines.](https://insightsengineering.github.io/teal.code/CONTRIBUTING.html)
25+
options:
26+
- label: I agree to follow this project's Contribution Guidelines.
27+
required: true
28+
- type: checkboxes
29+
id: security-policy
30+
attributes:
31+
label: Security Policy
32+
description: By submitting this issue, you agree to follow our [Security Policy.](https://github.com/insightsengineering/teal.code/security/policy)
33+
options:
34+
- label: I agree to follow this project's Security Policy.
35+
required: true

.github/workflows/check.yaml

100755100644
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@ name: Check 🛠
33

44
on:
55
pull_request:
6+
types:
7+
- opened
8+
- synchronize
9+
- reopened
10+
- ready_for_review
611
branches:
712
- main
813
- pre-release
914
push:
1015
branches:
1116
- main
1217
- pre-release
18+
workflow_dispatch:
1319

1420
jobs:
1521
audit:

.github/workflows/docs.yaml

100755100644
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
- LICENSE.*
1515
- NAMESPACE
1616
pull_request:
17+
types:
18+
- opened
19+
- synchronize
20+
- reopened
21+
- ready_for_review
1722
branches:
1823
- main
1924
- pre-release
@@ -25,6 +30,7 @@ on:
2530
- man/**
2631
- LICENSE.*
2732
- NAMESPACE
33+
workflow_dispatch:
2834

2935
jobs:
3036
docs:

0 commit comments

Comments
 (0)