@loveluthien/carta-frontend 6.0.0-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- package/.github/pull_request_template.md +23 -0
- package/.github/workflows/continuous_integration.yml +139 -0
- package/.github/workflows/deploy.yml +30 -0
- package/.husky/pre-commit +16 -0
- package/.husky/pre-push +42 -0
- package/.prettierignore +1 -0
- package/.prettierrc.json +18 -0
- package/CHANGELOG.md +363 -0
- package/COPYING.md +636 -0
- package/README.md +112 -0
- package/babel.config.json +10 -0
- package/build/ast_wrapper.wasm +0 -0
- package/build/carta_computation.wasm +0 -0
- package/build/carta_icon_128px.png +0 -0
- package/build/carta_logo.png +0 -0
- package/build/gsl_wrapper.wasm +0 -0
- package/build/index.html +147 -0
- package/build/manifest.json +15 -0
- package/build/robots.txt +3 -0
- package/build/static/css/546.aa44a897.css +1 -0
- package/build/static/css/async/359.4d8f6ff7.css +1 -0
- package/build/static/css/async/403.ea9edfac.css +1 -0
- package/build/static/css/async/462.8bde08e0.css +1 -0
- package/build/static/css/index.c1f77b92.css +1 -0
- package/build/static/font/blueprint-icons-16.5fb1af27.woff2 +0 -0
- package/build/static/font/blueprint-icons-16.79f603d1.woff +0 -0
- package/build/static/font/blueprint-icons-16.83d51978.eot +0 -0
- package/build/static/font/blueprint-icons-16.af0c342f.ttf +0 -0
- package/build/static/font/blueprint-icons-20.83fddc09.ttf +0 -0
- package/build/static/font/blueprint-icons-20.9a51bc58.woff +0 -0
- package/build/static/font/blueprint-icons-20.d61315fe.eot +0 -0
- package/build/static/font/blueprint-icons-20.ebf16e9a.woff2 +0 -0
- package/build/static/image/allmaps.03f2ba92.png +0 -0
- package/build/static/image/gamma.6fca425b.png +0 -0
- package/build/static/image/linear.c7941b64.png +0 -0
- package/build/static/image/log.7fce6aee.png +0 -0
- package/build/static/image/power.5dac9727.png +0 -0
- package/build/static/image/sqrt.0ec2b3f1.png +0 -0
- package/build/static/image/squared.798b23aa.png +0 -0
- package/build/static/js/546.b5841ade.js +489 -0
- package/build/static/js/546.b5841ade.js.LICENSE.txt +925 -0
- package/build/static/js/async/359.97257512.js +1 -0
- package/build/static/js/async/403.b00f768c.js +1 -0
- package/build/static/js/async/462.92c07a07.js +1 -0
- package/build/static/js/async/905.70044ee8.js +1 -0
- package/build/static/js/async/907.dc17f1d2.js +1 -0
- package/build/static/js/async/blueprint-icons-16px-paths.e17db832.js +1 -0
- package/build/static/js/async/blueprint-icons-20px-paths.6ad43f5f.js +1 -0
- package/build/static/js/async/blueprint-icons-all-paths-loader.61cc0f7b.js +1 -0
- package/build/static/js/async/blueprint-icons-all-paths.0c699441.js +1 -0
- package/build/static/js/async/blueprint-icons-split-paths-by-size-loader.5cff79f5.js +1 -0
- package/build/static/js/index.8fc34b4d.js +1344 -0
- package/build/static/js/index.9a30d560.worker.js +1 -0
- package/build/static/js/zfp_wrapper.wasm +0 -0
- package/build/static/svg/blueprint-icons-16.130888ef.svg +2097 -0
- package/build/static/svg/blueprint-icons-20.c8456d56.svg +2097 -0
- package/build/zfp_wrapper.wasm +0 -0
- package/declarations.d.ts +18 -0
- package/docs_website/.prettierignore +1 -0
- package/docs_website/api/api.md +13 -0
- package/docs_website/babel.config.js +3 -0
- package/docs_website/docs/assets/enable-code-snippets.png +0 -0
- package/docs_website/docs/code-snippet-tutorial/_category_.json +8 -0
- package/docs_website/docs/code-snippet-tutorial/basics.md +97 -0
- package/docs_website/docs/code-snippet-tutorial/image-blending.mdx +57 -0
- package/docs_website/docs/code-snippet-tutorial/image-fitting.mdx +44 -0
- package/docs_website/docs/code-snippet-tutorial/image-properties.mdx +84 -0
- package/docs_website/docs/code-snippet-tutorial/moment-images.mdx +31 -0
- package/docs_website/docs/code-snippet-tutorial/pv-images.mdx +28 -0
- package/docs_website/docs/code-snippet-tutorial/quick-start.mdx +82 -0
- package/docs_website/docs/code-snippet-tutorial/regions.mdx +49 -0
- package/docs_website/docs/contributing/_category_.json +7 -0
- package/docs_website/docs/contributing/developer-tips.md +61 -0
- package/docs_website/docs/contributing/documentation-guidelines.md +87 -0
- package/docs_website/docs/contributing/github-workflow.md +146 -0
- package/docs_website/docs/contributing/release-guidelines.md +73 -0
- package/docs_website/docs/contributing/unit-test-guidelines.md +79 -0
- package/docs_website/docs/documents.mdx +15 -0
- package/docs_website/docusaurus.config.js +167 -0
- package/docs_website/package-lock.json +16769 -0
- package/docs_website/package.json +121 -0
- package/docs_website/patches/@docusaurus+core+3.9.2.patch +20 -0
- package/docs_website/sidebars.js +33 -0
- package/docs_website/static/.nojekyll +0 -0
- package/docs_website/static/img/carta_icon_128px.png +0 -0
- package/docs_website/versioned_docs/version-4.1.0/api-packages.json +1 -0
- package/docs_website/versioned_docs/version-4.1.0/api-typedoc.json +214112 -0
- package/docs_website/versioned_docs/version-4.1.0/assets/enable-code-snippets.png +0 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/_category_.json +8 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/basics.md +97 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/image-fitting.mdx +42 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/image-properties.mdx +86 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/moment-images.mdx +31 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/pv-images.mdx +28 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/quick-start.mdx +82 -0
- package/docs_website/versioned_docs/version-4.1.0/code-snippet-tutorial/regions.mdx +49 -0
- package/docs_website/versioned_docs/version-4.1.0/contributing/_category_.json +7 -0
- package/docs_website/versioned_docs/version-4.1.0/contributing/developer-tips.md +36 -0
- package/docs_website/versioned_docs/version-4.1.0/contributing/documentation-guidelines.md +87 -0
- package/docs_website/versioned_docs/version-4.1.0/contributing/github-workflow.md +141 -0
- package/docs_website/versioned_docs/version-4.1.0/contributing/release-guidelines.md +73 -0
- package/docs_website/versioned_docs/version-4.1.0/contributing/unit-test-guidelines.md +79 -0
- package/docs_website/versioned_docs/version-4.1.0/documents.mdx +15 -0
- package/docs_website/versioned_docs/version-5.0.0/api-packages.json +1 -0
- package/docs_website/versioned_docs/version-5.0.0/api-typedoc.json +315266 -0
- package/docs_website/versioned_docs/version-5.0.0/assets/enable-code-snippets.png +0 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/_category_.json +8 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/basics.md +97 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/image-blending.mdx +57 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/image-fitting.mdx +44 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/image-properties.mdx +86 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/moment-images.mdx +31 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/pv-images.mdx +28 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/quick-start.mdx +82 -0
- package/docs_website/versioned_docs/version-5.0.0/code-snippet-tutorial/regions.mdx +49 -0
- package/docs_website/versioned_docs/version-5.0.0/contributing/_category_.json +7 -0
- package/docs_website/versioned_docs/version-5.0.0/contributing/developer-tips.md +36 -0
- package/docs_website/versioned_docs/version-5.0.0/contributing/documentation-guidelines.md +87 -0
- package/docs_website/versioned_docs/version-5.0.0/contributing/github-workflow.md +141 -0
- package/docs_website/versioned_docs/version-5.0.0/contributing/release-guidelines.md +73 -0
- package/docs_website/versioned_docs/version-5.0.0/contributing/unit-test-guidelines.md +79 -0
- package/docs_website/versioned_docs/version-5.0.0/documents.mdx +15 -0
- package/docs_website/versioned_sidebars/version-4.1.0-sidebars.json +8 -0
- package/docs_website/versioned_sidebars/version-5.0.0-sidebars.json +8 -0
- package/docs_website/versions.json +4 -0
- package/eslint.config.mjs +86 -0
- package/jest.config.js +101 -0
- package/package.json +186 -0
- package/patches/golden-layout+1.5.9.patch +24 -0
- package/patches/react-split-pane+0.1.92.patch +20 -0
- package/rsbuild.config.ts +75 -0
- package/schemas/.github/workflows/AddToCartaVisProject.yml +23 -0
- package/schemas/.prettierrc.json +18 -0
- package/schemas/CMakeLists.txt +15 -0
- package/schemas/README.md +1 -0
- package/schemas/_config.yml +7 -0
- package/schemas/controller_config_schema_1.json +343 -0
- package/schemas/controller_config_schema_2.json +685 -0
- package/schemas/layout_schema_2.json +440 -0
- package/schemas/preference_backend_schema_1.json +81 -0
- package/schemas/preference_backend_schema_2.json +118 -0
- package/schemas/preference_schema_1.json +410 -0
- package/schemas/preferences_schema_2.json +421 -0
- package/schemas/schemacompiler.c +200 -0
- package/schemas/snippet_schema_1.json +45 -0
- package/schemas/workspace_schema_1.json +573 -0
- package/scripts/make_colormaps.py +161 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# GitHub workflow
|
|
6
|
+
|
|
7
|
+
The workflow for contributing to the codebase.
|
|
8
|
+
|
|
9
|
+
## Creating new issues
|
|
10
|
+
|
|
11
|
+
When creating new issues, please refer to [this page](https://github.com/CARTAvis/carta-frontend/labels) for the available labels that can be added.
|
|
12
|
+
|
|
13
|
+
If the issue is related to bug fixing, please use the [bug report template](https://github.com/CARTAvis/carta-frontend/blob/dev/.github/ISSUE_TEMPLATE/bug_report.md). Please make sure to fill in the template with all the necessary information, including the description, reproduction steps, and platform information. Providing reproduction steps is particularly helpful for resolving issues. Additionally, including testing images can be helpful for reproducing the issue.
|
|
14
|
+
|
|
15
|
+
## Contributing to the codebase
|
|
16
|
+
|
|
17
|
+
### Cloning and building the codebase
|
|
18
|
+
|
|
19
|
+
To clone the codebase to your computer:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
git clone git@github.com:CARTAvis/carta-frontend.git
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
For detailed instructions on building the codebase from source, please refer to the [README file](https://github.com/CARTAvis/carta-frontend/blob/dev/README.md#development).
|
|
26
|
+
|
|
27
|
+
### Creating a branch
|
|
28
|
+
|
|
29
|
+
Before making any changes to the codebase, create and check out to a new branch. It's recommended to use the following format for branch names:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
git checkout -b "[author]/[issue id]_[description_with_underscores]"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If the issue doesn't exist yet, please create a new issue. When you start working on the issue, update the GitHub Project status of the issue to "In Progress".
|
|
36
|
+
|
|
37
|
+
### Pushing changes
|
|
38
|
+
|
|
39
|
+
To stage and commit your changes:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
git add .
|
|
43
|
+
git commit -m "a short description of the change"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
To push the branch to the remote repository:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
git push
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Making a pull request
|
|
53
|
+
|
|
54
|
+
#### Pull request template
|
|
55
|
+
|
|
56
|
+
When making a pull request from your branch, please use the [pull request template](https://github.com/CARTAvis/carta-frontend/blob/dev/.github/pull_request_template.md).
|
|
57
|
+
|
|
58
|
+
In the description section, please provide details about your changes, including linked issues and companion pull requests (if there are), what is implemented or fixed, and how to test it.
|
|
59
|
+
|
|
60
|
+
Each check item in the checklist section is explained below:
|
|
61
|
+
|
|
62
|
+
For linked issues (if there are): this section is for checking the status of the issues that are linked in the above description.
|
|
63
|
+
|
|
64
|
+
- assignee and label added: assign yourself to the issue you are working on. Add labels to the issue.
|
|
65
|
+
|
|
66
|
+
- GitHub Project estimate added: provide an estimate for the time required to complete the issue. This estimation is useful for future development planning.
|
|
67
|
+
|
|
68
|
+
For the pull request: this section is for checking the status of the pull request and reviewing the code changes.
|
|
69
|
+
|
|
70
|
+
- reviewers and assignee added: assign reviewers and an assignee to the pull request. The assignee will be responsible for merging the pull request.
|
|
71
|
+
|
|
72
|
+
- GitHub Project estimate added: provide an estimate for the time required to review the pull request.
|
|
73
|
+
|
|
74
|
+
- changelog updated / no changelog update needed: updating the changelog is required when the issue exists in the latest release and the changes have an impact on users. It is recommended to update the changelog when sending the pull request and to resolve changelog merge conflicts using the GitHub UI.
|
|
75
|
+
|
|
76
|
+
- unit test added (for functions with no dependenies): it is recommended to add unit tests for functions that are related to the code changes.
|
|
77
|
+
|
|
78
|
+
- API documentation added (for public variables and methods in stores): it is recommended to add API documentation for public variables and methods in stores that are related to the code changes. Check [here](./documentation-guidelines/#writing-api-documentation) for adding API documentation.
|
|
79
|
+
|
|
80
|
+
For dependencies: this section is for checking repositories that have dependencies on carta-frontend or are dependencies of carta-frontend.
|
|
81
|
+
|
|
82
|
+
- e2e test passing / corresponding fix added: check if the end-to-end tests are passing. This will be checked during the review.
|
|
83
|
+
|
|
84
|
+
- protobuf version bumped / no protobuf version bumped needed: updating the protobuf version is required when the behavior of the protobuf messages is changed.
|
|
85
|
+
|
|
86
|
+
- protobuf updated to the latest dev commit / no protobuf update needed: updating the protobuf is required when there are changes in the carta-protobuf submodule. This can be done when the pull request is ready for merge. Check [here](#merging-a-pull-request-with-protobuf-changes-required) for the steps.
|
|
87
|
+
|
|
88
|
+
- corresponding ICD test fix added (`BackendService` changed) / no ICD test fix needed (`BackendService` unchanged): updating ICD tests is required when there are changes in `BackendService`.
|
|
89
|
+
|
|
90
|
+
- user manual prepared (for large new features): preparing user manual updates in advance is required for large new features.
|
|
91
|
+
|
|
92
|
+
#### CI checks
|
|
93
|
+
|
|
94
|
+
Please ensure that the CI passes successfully when making the pull request. The CI checks various items:
|
|
95
|
+
|
|
96
|
+
- Codebase formatting: Check [here](./developer-tips/#checking-and-fixing-code-format) for automatic codebase formatting.
|
|
97
|
+
- Production builds with different Node versions: The build will not be successful if the lint check fails. Check [here](./developer-tips/#code-linting) for details.
|
|
98
|
+
- Documentation page formatting: Check [here](./documentation-guidelines/#formatting) for automatic formatting.
|
|
99
|
+
- Production build of the documentation website: Details of building the website locally can be found [here](./documentation-guidelines/#building-documentation).
|
|
100
|
+
|
|
101
|
+
### Merging a pull request
|
|
102
|
+
|
|
103
|
+
The assignee of the pull request is responsible for merging the pull request. When merging the pull request, ensure the following:
|
|
104
|
+
|
|
105
|
+
- Sufficient reviewers have approved the pull request.
|
|
106
|
+
- All items in the checklist are completed.
|
|
107
|
+
- All CI checks have passed successfully.
|
|
108
|
+
|
|
109
|
+
After merging the pull request, make sure to close the linked issue if necessary. GitHub automatically closes issues when they are linked properly. Remember to delete the branch after the merge.
|
|
110
|
+
|
|
111
|
+
#### Merging a pull request with protobuf changes required
|
|
112
|
+
|
|
113
|
+
If the pull request requires changes in the carta-protobuf submodule and is ready for merge, follow these steps:
|
|
114
|
+
|
|
115
|
+
1. Merge the carta-protobuf branch in the repository.
|
|
116
|
+
|
|
117
|
+
2. Check out the frontend branch:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
git checkout [the frontend branch]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
3. Check out the dev branch of the protobuf submodule and pull the latest version:
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
cd protobuf
|
|
127
|
+
git checkout dev
|
|
128
|
+
git pull
|
|
129
|
+
cd ..
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
4. Commit and push the changes:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
git commit -a -m "update protobuf"
|
|
136
|
+
git push
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
5. Finally, you can check the item "protobuf updated to the latest dev commit" in the check list. The pull request is ready for merge if all the other checklist items are completed and the CI checks have passed.
|
|
140
|
+
|
|
141
|
+
6. For the carta-backend repository, follow similar steps for the corresponding backend branch as in steps 2 to 5. Merge the frontend and backend pull requests simultaneously.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 5
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Release guidelines
|
|
6
|
+
|
|
7
|
+
In this document, 123 is a placeholder for the current release number, and 124 for the following release number.
|
|
8
|
+
|
|
9
|
+
## Beta releases
|
|
10
|
+
|
|
11
|
+
### Beta release
|
|
12
|
+
|
|
13
|
+
1. `dev` branch: update `CHANGELOG.md`. Change the `Unreleased` heading to `123.0.0-beta.0`.
|
|
14
|
+
2. `dev` branch: update the user manual URL if necessary.
|
|
15
|
+
3. Create a `release/123.0` branch using the `dev` branch.
|
|
16
|
+
4. `release/123.0` branch: update the `package.json` version string to `123.0.0-beta.0`. Run `npm install` to update `package-lock.json`.
|
|
17
|
+
5. Create a `v123.0.0-beta.0` tag using the release branch.
|
|
18
|
+
6. Test the release branch. Make any required fixes in the `dev` branch, and merge them into the release branch. Ideally, bump the version and create a new tag every time changes are merged. If you don't want to bump the version, remember to destroy and recreate the latest tag.
|
|
19
|
+
7. Create packages from the release branch.
|
|
20
|
+
|
|
21
|
+
### After beta release
|
|
22
|
+
|
|
23
|
+
1. `dev` branch: update `CHANGELOG.md`. Create a new `Unreleased` section.
|
|
24
|
+
2. `dev` branch: update the documentation website ([guidelines](./documentation-guidelines/#versioning)). Create a new version `123.0.0-beta.0`.
|
|
25
|
+
|
|
26
|
+
### Additional beta release
|
|
27
|
+
|
|
28
|
+
This process should be followed if changes have to be made after the beta packages have already been published (or even provided to a limited number of users). If there are significant changes in `dev` that should _not_ be included in the beta release, follow the point release procedure instead (but adjust the version strings as required).
|
|
29
|
+
|
|
30
|
+
1. Make the required fixes in `dev`.
|
|
31
|
+
2. `dev` branch: update `CHANGELOG.md`. Change the `Unreleased` heading to `123.0.0-beta.1`.
|
|
32
|
+
3. `dev` branch: update the user manual URL if necessary.
|
|
33
|
+
4. Merge the `dev` branch into the `release/123.0` branch.
|
|
34
|
+
5. `release/123.0` branch: update the `package.json` version string to `123.0.0-beta.1`. Run `npm install` to update `package-lock.json`.
|
|
35
|
+
6. Create a `v123.0.0-beta.1` tag using the release branch.
|
|
36
|
+
7. Test the release branch. Make any required fixes in the `dev` branch, and merge them into the release branch. Ideally, bump the version and create a new tag every time changes are merged. If you don't want to bump the version, remember to destroy and recreate the latest tag.
|
|
37
|
+
8. Create packages from the release branch.
|
|
38
|
+
|
|
39
|
+
## Stable releases
|
|
40
|
+
|
|
41
|
+
### Final release
|
|
42
|
+
|
|
43
|
+
1. `dev` branch: update `CHANGELOG.md`. Change the `Unreleased` heading to `123.0.0`.
|
|
44
|
+
2. `dev` branch: update the user manual URL if necessary.
|
|
45
|
+
3. Merge the `dev` branch into the `release/123.0` branch.
|
|
46
|
+
4. `release/123.0` branch: update the `package.json` version string to `123.0.0-rc.0`. Run `npm install` to update `package-lock.json`.
|
|
47
|
+
5. Create a `v123.0.0-rc.0` tag using the release branch.
|
|
48
|
+
6. Test the release branch. Make any required fixes in the `dev` branch, and merge them into the release branch. Ideally, bump the version and create a new tag every time changes are merged. If you don't want to bump the version, remember to destroy and recreate the latest tag.
|
|
49
|
+
7. `release/123.0` branch: update the `package.json` version string to `123.0.0`. Run `npm install` to update `package-lock.json`.
|
|
50
|
+
8. Create a `v123.0.0` tag using the release branch.
|
|
51
|
+
9. Create packages from the release branch.
|
|
52
|
+
|
|
53
|
+
### After final release
|
|
54
|
+
|
|
55
|
+
1. `dev` branch: update the `package.json` version string to `124.0.0-dev`. Run `npm install` to update `package-lock.json`.
|
|
56
|
+
2. `dev` branch: update `CHANGELOG.md`. Create a new `Unreleased` section.
|
|
57
|
+
3. `dev` branch: update the documentation website ([guidelines](./documentation-guidelines/#versioning)). Create a new version `123.0.0`.
|
|
58
|
+
|
|
59
|
+
### Point release
|
|
60
|
+
|
|
61
|
+
This process should be followed if important bug fixes have to be released after the final release packages have already been published (or even provided to a limited number of users). If there are no changes in `dev` that should not be included in the point release, follow the additional beta release procedure instead (but adjust the version strings as required).
|
|
62
|
+
|
|
63
|
+
1. Make the required fixes in `dev`. Cherry-pick them into the release branch.
|
|
64
|
+
2. `dev` branch: update `CHANGELOG.md`. Move the cherry-picked changes from the `Unreleased` section to a new `123.0.1` section _under_ `Unreleased`.
|
|
65
|
+
3. `release/123.0` branch: update `CHANGELOG.md`. Copy only the `123.0.1` section from the changelog in the `dev` branch.
|
|
66
|
+
4. `release/123.0` branch: update the `package.json` version string to `123.0.1`. Run `npm install` to update `package-lock.json`.
|
|
67
|
+
5. Create a `v123.0.1` tag using the release branch.
|
|
68
|
+
6. Test the release branch. If an issue affects both `dev` and the release branch, fix it in `dev` and cherry-pick the changes into the release branch. If an issue is caused by changes in `dev` which are not included in the point release, make the minimal required changes in the release branch. Ideally, bump the version and create a new tag every time changes are made. If you don't want to bump the version, remember to destroy and recreate the latest tag.
|
|
69
|
+
7. Create packages from the release branch.
|
|
70
|
+
|
|
71
|
+
### After point release
|
|
72
|
+
|
|
73
|
+
- `dev` branch: update the documentation website ([guidelines](./documentation-guidelines/#versioning)). Replace version `123.0.0` with `123.0.1`.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 3
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Unit test guidelines
|
|
6
|
+
|
|
7
|
+
Guidelines for running and writing unit tests.
|
|
8
|
+
|
|
9
|
+
## Running unit tests
|
|
10
|
+
|
|
11
|
+
1. Install package dependencies:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
npm install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
2. Build carta-protobuf and WebAssembly libraries:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm run build-protobuf
|
|
21
|
+
|
|
22
|
+
npm run build-libs
|
|
23
|
+
npm run build-wrappers
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. Run unit tests:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npm test
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
By default, Jest runs tests related to changed files.
|
|
33
|
+
|
|
34
|
+
To display individual test results, use the `--verbose` flag:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
npm test --verbose
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For more options available in Jest, please refer to the [Jest documentation](https://jestjs.io/docs/cli).
|
|
41
|
+
|
|
42
|
+
## Writing unit tests
|
|
43
|
+
|
|
44
|
+
### Structures
|
|
45
|
+
|
|
46
|
+
- Directory structure: colocate the test file in the same directory and name with `.test.ts/tsx` suffix. For example,
|
|
47
|
+
```
|
|
48
|
+
.
|
|
49
|
+
└── src
|
|
50
|
+
└── components
|
|
51
|
+
└── AComponent
|
|
52
|
+
├── AComponent.tsx
|
|
53
|
+
├── AComponent.scss
|
|
54
|
+
└── AComponent.test.tsx
|
|
55
|
+
└── utilities
|
|
56
|
+
└── math
|
|
57
|
+
├── math.ts
|
|
58
|
+
└── math.test.ts
|
|
59
|
+
```
|
|
60
|
+
- Test code structure: use `describe` to structure the tests. For example,
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
describe("[unit]", () => {
|
|
64
|
+
test("[expected behavior]", () => {});
|
|
65
|
+
|
|
66
|
+
describe("[sub unit]", () => {
|
|
67
|
+
test("[expected behavior]", () => {});
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- Make sure to implement low-level tests that focus on a certain class or function. Mock imported classes and functions with Jest when necessary.
|
|
73
|
+
- TypeScript enum: import TypeScript enum without index files to avoid compile failure.
|
|
74
|
+
|
|
75
|
+
### Testing React components
|
|
76
|
+
|
|
77
|
+
- Avoid mocking blueprint.js objects to prevent having complex setups.
|
|
78
|
+
- Avoid testing snapshots to prevent having large files in the codebase.
|
|
79
|
+
- Follow [the order of priority](https://testing-library.com/docs/queries/about/#priority) suggested by React Testing Library when querying elements.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 1
|
|
3
|
+
slug: /
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Documents
|
|
7
|
+
|
|
8
|
+
### Table of Contents
|
|
9
|
+
|
|
10
|
+
- <DocsIndexLink path="/code-snippet-tutorial">
|
|
11
|
+
<h4>Code snippet tutorial</h4>
|
|
12
|
+
</DocsIndexLink>
|
|
13
|
+
- <DocsIndexLink path="/contributing">
|
|
14
|
+
<h4>Contributing</h4>
|
|
15
|
+
</DocsIndexLink>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"entryPoints":{"index":{"path":"src/index.tsx","entry":"."},"components":{"path":"src/components/index.ts","entry":".","label":"Components"},"components/Dialogs":{"path":"src/components/Dialogs/index.ts","entry":".","label":"Components - Dialogs"},"components/Shared":{"path":"src/components/Shared/index.ts","entry":".","label":"Components - Shared"},"models":{"path":"src/models/index.ts","entry":".","label":"Models"},"services":{"path":"src/services/index.ts","entry":".","label":"Services"},"stores":{"path":"src/stores/index.ts","entry":".","label":"Stores"},"utilities":{"path":"src/utilities/index.ts","entry":".","label":"Utilities"}},"packagePath":".","packageSlug":".","packageName":"carta-frontend","packageVersion":"5.0.0"}]
|