Skip to content

Commit f888231

Browse files
Merge branch 'main' into @ml/ask-for-permissions-tool-calling-example
2 parents a463cc5 + acac022 commit f888231

267 files changed

Lines changed: 1051 additions & 1030 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Check if API reference is up-to-date
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- '.github/workflows/api-reference-up-to-date-check.yml'
10+
pull_request:
11+
branches:
12+
- main
13+
paths:
14+
- 'docs/**'
15+
- '.github/workflows/api-reference-up-to-date-check.yml'
16+
workflow_dispatch:
17+
jobs:
18+
check:
19+
if: github.repository == 'software-mansion/react-native-executorch'
20+
runs-on: ubuntu-latest
21+
concurrency:
22+
group: api-reference-up-to-date-${{ github.ref }}
23+
cancel-in-progress: true
24+
env:
25+
WORKING_DIRECTORY: docs
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v3
29+
with:
30+
ref: ${{ github.event.pull_request.head.sha }}
31+
- name: Use Node.js 20
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
- name: Install root dependencies
36+
run: yarn install --immutable
37+
- name: Install node docs dependencies
38+
working-directory: ${{ env.WORKING_DIRECTORY }}
39+
run: yarn install --immutable
40+
- name: Check TypeDoc is up-to-date
41+
working-directory: ${{ env.WORKING_DIRECTORY }}
42+
run: |
43+
yarn docusaurus generate-typedoc
44+
yarn prettier-api-reference
45+
git status
46+
git diff
47+
if ! git diff --quiet; then
48+
echo "Differences found. Look at the 'git diff' output above."
49+
exit 1
50+
fi

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The release process of new minor version consists of the following steps:
1010
4. Create a new release branch `release/{MAJOR}.{MINOR}`and push it to the remote.
1111
5. 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.
1212
6. Once all tests are passed, tag the release branch with proper version tag `v{MAJOR}.{MINOR}.0` and run `npm publish`.
13-
7. 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). Also, make sure that all the links in `api-reference` are not broken.
13+
7. Create versioned docs by running from repo root `(cd docs && yarn docs:version {MAJOR}.{MINOR}.x)` (the 'x' part is intentional and is not to be substituted). Also, make sure that all the links in `api-reference` are not broken.
1414
8. Create a PR with the updated docs.
1515
9. Create the release notes on GitHub.
1616
10. Update README.md with release video, if available.

docs/docs/06-api-reference/classes/ClassificationModule.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Class: ClassificationModule
22

3-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L13)
3+
Defined in: [modules/computer_vision/ClassificationModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L13)
44

55
Module for image classification tasks.
66

@@ -28,7 +28,7 @@ Module for image classification tasks.
2828

2929
> **nativeModule**: `any` = `null`
3030
31-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
31+
Defined in: [modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
3232

3333
Native module instance
3434

@@ -42,7 +42,7 @@ Native module instance
4242

4343
> **delete**(): `void`
4444
45-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
45+
Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
4646

4747
Unloads the model from memory.
4848

@@ -60,7 +60,7 @@ Unloads the model from memory.
6060

6161
> **forward**(`imageSource`): `Promise`\<\{\[`category`: `string`\]: `number`; \}\>
6262
63-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L51)
63+
Defined in: [modules/computer_vision/ClassificationModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L51)
6464

6565
Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string.
6666

@@ -84,7 +84,7 @@ The classification result.
8484

8585
> `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\>
8686
87-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
87+
Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
8888

8989
Runs the model's forward method with the given input tensors.
9090
It returns the output tensors that mimic the structure of output from ExecuTorch.
@@ -113,7 +113,7 @@ Array of output tensors.
113113

114114
> **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\>
115115
116-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
116+
Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
117117

118118
Gets the input shape for a given method and index.
119119

@@ -147,7 +147,7 @@ The input shape as an array of numbers.
147147

148148
> **load**(`model`, `onDownloadProgressCallback`): `Promise`\<`void`\>
149149
150-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L21)
150+
Defined in: [modules/computer_vision/ClassificationModule.ts:21](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ClassificationModule.ts#L21)
151151

152152
Loads the model, where `modelSource` is a string that specifies the location of the model binary.
153153
To track the download progress, supply a callback function `onDownloadProgressCallback`.

docs/docs/06-api-reference/classes/ExecutorchModule.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Class: ExecutorchModule
22

3-
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L14)
3+
Defined in: [modules/general/ExecutorchModule.ts:14](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L14)
44

55
General module for executing custom Executorch models.
66

@@ -28,7 +28,7 @@ General module for executing custom Executorch models.
2828

2929
> **nativeModule**: `any` = `null`
3030
31-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
31+
Defined in: [modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
3232

3333
Native module instance
3434

@@ -42,7 +42,7 @@ Native module instance
4242

4343
> **delete**(): `void`
4444
45-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
45+
Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
4646

4747
Unloads the model from memory.
4848

@@ -60,7 +60,7 @@ Unloads the model from memory.
6060

6161
> **forward**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\>
6262
63-
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L51)
63+
Defined in: [modules/general/ExecutorchModule.ts:51](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L51)
6464

6565
Executes the model's forward pass, where input is an array of `TensorPtr` objects.
6666
If the inference is successful, an array of tensor pointers is returned.
@@ -85,7 +85,7 @@ An array of output tensor pointers.
8585

8686
> `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\>
8787
88-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
88+
Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
8989

9090
Runs the model's forward method with the given input tensors.
9191
It returns the output tensors that mimic the structure of output from ExecuTorch.
@@ -114,7 +114,7 @@ Array of output tensors.
114114

115115
> **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\>
116116
117-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
117+
Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
118118

119119
Gets the input shape for a given method and index.
120120

@@ -148,7 +148,7 @@ The input shape as an array of numbers.
148148

149149
> **load**(`modelSource`, `onDownloadProgressCallback`): `Promise`\<`void`\>
150150
151-
Defined in: [packages/react-native-executorch/src/modules/general/ExecutorchModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L22)
151+
Defined in: [modules/general/ExecutorchModule.ts:22](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/general/ExecutorchModule.ts#L22)
152152

153153
Loads the model, where `modelSource` is a string, number, or object that specifies the location of the model binary.
154154
Optionally accepts a download progress callback.

docs/docs/06-api-reference/classes/ImageEmbeddingsModule.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Class: ImageEmbeddingsModule
22

3-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L13)
3+
Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:13](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L13)
44

55
Module for generating image embeddings from input images.
66

@@ -28,7 +28,7 @@ Module for generating image embeddings from input images.
2828

2929
> **nativeModule**: `any` = `null`
3030
31-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
31+
Defined in: [modules/BaseModule.ts:8](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L8)
3232

3333
Native module instance
3434

@@ -42,7 +42,7 @@ Native module instance
4242

4343
> **delete**(): `void`
4444
45-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
45+
Defined in: [modules/BaseModule.ts:41](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L41)
4646

4747
Unloads the model from memory.
4848

@@ -60,7 +60,7 @@ Unloads the model from memory.
6060

6161
> **forward**(`imageSource`): `Promise`\<`Float32Array`\<`ArrayBufferLike`\>\>
6262
63-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:50](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L50)
63+
Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:50](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L50)
6464

6565
Executes the model's forward pass. Returns an embedding array for a given sentence.
6666

@@ -84,7 +84,7 @@ A Float32Array containing the image embeddings.
8484

8585
> `protected` **forwardET**(`inputTensor`): `Promise`\<[`TensorPtr`](../interfaces/TensorPtr.md)[]\>
8686
87-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
87+
Defined in: [modules/BaseModule.ts:23](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L23)
8888

8989
Runs the model's forward method with the given input tensors.
9090
It returns the output tensors that mimic the structure of output from ExecuTorch.
@@ -113,7 +113,7 @@ Array of output tensors.
113113

114114
> **getInputShape**(`methodName`, `index`): `Promise`\<`number`[]\>
115115
116-
Defined in: [packages/react-native-executorch/src/modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
116+
Defined in: [modules/BaseModule.ts:34](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/BaseModule.ts#L34)
117117

118118
Gets the input shape for a given method and index.
119119

@@ -147,7 +147,7 @@ The input shape as an array of numbers.
147147

148148
> **load**(`model`, `onDownloadProgressCallback`): `Promise`\<`void`\>
149149
150-
Defined in: [packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/a6b2b6f4f1622166e3517338d42680655383a3be/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L20)
150+
Defined in: [modules/computer_vision/ImageEmbeddingsModule.ts:20](https://github.com/software-mansion/react-native-executorch/blob/main/packages/react-native-executorch/src/modules/computer_vision/ImageEmbeddingsModule.ts#L20)
151151

152152
Loads the model, where `modelSource` is a string that specifies the location of the model binary.
153153

0 commit comments

Comments
 (0)