To work on OpenSearch-Dashboards(OSD) plugins, you must have OpenSearch and OpenSearch-Dashboards running.
- Follow this link to setup OpenSearch, you can easily get OpenSearch up and running with Docker
- You also need to run OSD dev server, check this link to setup local development environment
- Fork this repository
- Change working directory to OSD
/plugins
folder:cd OpenSearch-Dashboards/plugins
- Clone this repo to plugins folder,
git clone git@github.com:<your-github-username>/ml-commons-dashboards.git ./
# install dependencies in OpenSearch-Dashboards/plugins/ml-commons-dashboards
cd ml-commons-dashboards
yarn osd bootstrap
# Go to OSD project root and run bootstrap to make sure all deps are installed
yarn osd bootstrap
# start OSD dev server
yarn start
If everything went well, OSD will be available on http://localhost:5601/
In plugins/ml-commons-dashboards
folder
# run tests
yarn test:jest
# or in watch mode
yarn test:jest --watch
NOTE: Before creating a pull request, please make sure all tests are passed. You’re also encouraged to write tests to cover the code changes you made.
When contributing the codes, please read OpenSearch-Dashboards general conventions and the following project conventions.
We are following conventional commit, these commit type are used by this project:
feat:
Adding a new featurefix:
Fixing a bugtest:
Adding new tests or correct existing testsrefactor:
A code refactor which only contains non-functional changesdocs:
Adding documentationbuild:
Changes that will affect the build system, such as webpack configuration, build scriptsci:
Changes to the CI configurations, such as GitHub Actions config changechore:
Changes that will not affect the meaning of the code, such as code formatting, code prettier, removing trailing white-space
It it recommended to use "Squash and merge" strategy to merge a PR. If the PR contains commits which are logically isolated, you are encouraged to squash the commits into several different ones and use "Rebase and merge" strategy in this case.