Skip to content

Commit 849056b

Browse files
mkopcinsMateusz Kopciński
andauthored
added RELEASE.md and CONTRIBUTING.md files (#420)
## Description Add RELEASE.md na CONTRIBUTING.md files. ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] Documentation update (improves or adds clarity to existing documentation) ### Tested on - [ ] iOS - [ ] Android ### Testing instructions <!-- Provide step-by-step instructions on how to test your changes. Include setup details if necessary. --> ### Screenshots <!-- Add screenshots here, if applicable --> ### Related issues <!-- Link related issues here using #issue-number --> ### Checklist - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [ ] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. --> --------- Co-authored-by: Mateusz Kopciński <mateusz.kopcinski@swmansnion.com>
1 parent 0f4de4e commit 849056b

3 files changed

Lines changed: 142 additions & 0 deletions

File tree

.cspell-wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ MPNET
5252
QINT
5353
FNUZ
5454
wordlist
55+
jitpack

CONTRIBUTING.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
Thank you for your interest in contributing to react-native-executorch!
2+
3+
# Ways to contribute
4+
5+
There are several ways you can contribute to react-native-executorch
6+
7+
- Submit issues related to bugs or desired new features.
8+
- Fix outstanding issues with the existing code.
9+
- Export new models to ET format
10+
- Contribute to examples or to the documentation
11+
12+
## Submitting a bug-related issue or feature request
13+
14+
Please try to follow those guidelines when creating issues or feature requests. This makes it easier for us to help you with problems or properly consider your suggestions.
15+
For more general questions and discussions please visit our Discord server.
16+
17+
## Found a bug?
18+
19+
Before reporting the issue please check **if a similar issue was previously reported** (use the search bar on GitHub under Issues). This will make it much faster for you and us to help you. We prefer you to create issues here on GitHub rather than on Discord as it makes it easier for others to find them later on and makes it easier to include proper context to the problem. When submitting your issue please select a `🐛 Bug` issue template and fill in the required information, this speeds up our responses significantly.
20+
21+
## Feature request
22+
23+
Have an idea or is there a feature you would like to see added? This can be a specific model, an entire model family, a code functionality or anything else you think might be useful. Feel free to create a PR from a fork 😉. Alternatively if you don't have time for that just create a `🚀 Feature request` issue and fill in the necessary information.
24+
The most important things to include are:
25+
26+
1. What is the motivation behind it? Is it something that is missing but is present in another library? Or maybe you need something more specific for your use case? Or just an idea that popped into your head?
27+
We'd love to hear about this!
28+
29+
2. Describe it - add as much detail as you can. This helps to avoid any miscommunication problems and helps us to better understand it.
30+
31+
3. Provide a code snippet with the example usage (optional).
32+
33+
4. If there is a similar feature somewhere else drop a link (optional).
34+
35+
## Fix outstanding issues
36+
37+
If you found an issue you would like to tackle and it is not assigned to anyone at the moment feel free to start working on it. Drop a comment under it so that we know it is under progress and then open a PR. For a good starting issue look for `good first issue` label.
38+
39+
## Export new models to ET format
40+
41+
Found a model you would like to use in your app but it is not currently supplied by us and got it exported and working with ExecuTorch? We would love you to create a PR on our [🤗 huggingface](https://huggingface.co/spaces/software-mansion/README/discussions?status=open&type=pull_request&sort=recently-created).
42+
43+
## Contributing to examples or documentation
44+
45+
Do you have a neat example use case and want to share it with us? You can just drop us a message on Discord server and/or open a PR to `apps` directory here.
46+
If you found some inconsistencies in our documentation or just something is missing just open a PR with suggested changes (remember to add changes to previous docs versions too, e.g `docs/versioned_docs/version-0.3.x`, `docs/versioned_docs/version-0.4.x`).
47+
48+
# Creating a Pull Request
49+
50+
Before writing any code reach out to us to make sure no one is currently working on it, you can always open an issue first.
51+
52+
1. Fork the [repository](https://github.com/software-mansion/react-native-executorch) by clicking on the **[Fork](https://github.com/software-mansion/react-native-executorch/fork)** button on the repository's page. This creates a copy of the code under your GitHub use account.
53+
54+
2. Clone your fork to your local disc, and add the base repository as a remote:
55+
56+
```
57+
git clone git@github.com:<your Github handle>/react-native-executorch.git
58+
cd react-native-executorch
59+
git remote add upstream https://github.com/software-mansion/react-native-executorch.git
60+
```
61+
62+
3. Create your develop branch
63+
64+
```
65+
git checkout -b a-descriptive-name-for-my-changes
66+
```
67+
68+
> [!CAUTION]
69+
> Do not work on the main branch!
70+
71+
4. Follow installation steps in the [README.md](./README.md)
72+
73+
5. Develop your code.
74+
To keep your fork up to date run
75+
76+
```
77+
git fetch upstream
78+
git rebase upstream/main
79+
```
80+
81+
After you are done writing the code push it to the remote
82+
83+
```
84+
git push -u origin a-descriptive-name-for-my-changes
85+
```
86+
87+
6. Test your changes.
88+
Make sure to test on both Android and IOS. Devices are best, but naturally testing on simulator would be just fine. You can use example apps in the `apps` directory for your testing purposes.
89+
90+
7. Open a pull request
91+
For details on how to open a pull request from a fork please visit [github's documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)

RELEASE.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# General Overview
2+
3+
## Minor version release
4+
5+
The release process of new minor version consists of the following steps:
6+
7+
1. Merge all tickets tracked in a release tracker (i.e. [#356](https://github.com/software-mansion/react-native-executorch/issues/356)) into `main` branch.
8+
2. Bump version in `package.json` to the new version `v{MAJOR}.{MINOR}.0`.
9+
3. Update version tags in `packages/react-native-executorch/src/constants/modelUrls.ts` to point to the proper `MINOR` version and update tags on [🤗 huggingface](https://huggingface.co/software-mansion).
10+
4. Update jitpack version inside `build.gradle` to point to the correct version tag
11+
```
12+
implementation("com.github.software-mansion:react-native-executorch:v{MAJOR}.{MINOR}.{REVISION}")
13+
```
14+
5. Commit with a message 'Release v{MAJOR}.{MINOR}.0'. (We want to keep the latest `MINOR` version on the `main` branch.)
15+
6. Create a new branch release branch `release/{MAJOR}.{MINOR}`and push it to the remote.
16+
7. Stability tests are performed on the release branch and all fixes to the new-found issues are pushed into the main branch and cherry-picked into the release branch. This allows for further development on the main branch without interfering with the release process.
17+
8. Once all tests are passed, tag the release branch with proper version tag `v{MAJOR}.{MINOR}.0` and run `npm publish`.
18+
9. Ensure [jitpack](https://jitpack.io/#software-mansion/react-native-executorch) triggers build properly.
19+
10. Create versioned docs by running from repo root `(cd docs && yarn docusaurus docs:version {MAJOR}.{MINOR}.x)` (the 'x' part is intentional and is not to be substituted).
20+
11. Create a PR with the updated docs.
21+
12. Create the release notes on GitHub.
22+
13. Update README.md with release video, if available.
23+
24+
## Patch release
25+
26+
After the release branch is created and the version is published to npm we only allow for bug fixes and other critical changes to be included into the release branch. For this purpose we use git `cherry-pick` command.
27+
28+
> [!CAUTION]
29+
> Those changes should NOT include documentation changes, as they would be released automatically on the PR's merge and before the code changes are live. Instead create a separate PR with doc changes according to the [Docs update](#docs-update) section.
30+
31+
1. Create a PR to the main branch.
32+
2. Once the PR is merged, `cherry-pick` the commit to the release branch.
33+
3. Bump version in `package.json` to the new version `v{MAJOR}.{MINOR}.{REVISION}`.
34+
Update jitpack version inside `build.gradle` to point to the correct version tag
35+
```
36+
implementation("com.github.software-mansion:react-native-executorch:v{MAJOR}.{MINOR}.{REVISION}")
37+
```
38+
Commit with a message 'Release v{MAJOR}.{MINOR}.0'.
39+
4. Tag release branch with proper version tag `v{MAJOR}.{MINOR}.{REVISION}` and run `npm publish`.
40+
5. Ensure [jitpack](https://jitpack.io/#software-mansion/react-native-executorch) triggers build properly.
41+
6. Create release notes on GitHub.
42+
43+
## Docs update
44+
45+
We are using docusaurus with docs versioning. By default when merging PRs with docs changes to the main branch, a GitHub workflow is started to publish the docs. For this reason those changes should be merged only once the related changes are released.
46+
When updating docs the following steps should be considered.
47+
48+
1. Update the desired doc pages.
49+
2. Check if the changes are applicable to past versions, if so make the same updates to the correct files in versioned docs inside `react-native-executorch/docs/versioned_docs/version-{MAJOR}.{MINOR}.x`.
50+
3. Create a PR to the main branch.

0 commit comments

Comments
 (0)