diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11068ca7e1c0e46ee212c348c2dbc1e729a7516c..475387c319a9220b74fad0dbd91b295ed4097913 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to Milvus -First of all, thanks for taking the time to contribute to Milvus! It's people like you that help Milvus come to fruition. +First of all, thanks for taking the time to contribute to Milvus! It's people like you that help Milvus come to fruition. :tada: The following are a set of guidelines for contributing to Milvus. Following these guidelines helps contributing to this project easy and transparent. These are mostly guideline, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. @@ -11,8 +11,8 @@ As for everything else in the project, the contributions to Milvus are governed Before you make any contributions, make sure you follow this list. - Read [Contributing to Milvus](CONTRIBUTING.md). -- Check if the changes are consistent with the [coding style](CONTRIBUTING.md#coding-style). -- Run [unit tests](CONTRIBUTING.md#run-unit-test). +- Check if the changes are consistent with the [coding style](CONTRIBUTING.md#coding-style), and format your code accordingly. +- Run [unit tests](CONTRIBUTING.md#run-unit-test-with-code-coverage) and check your code coverage rate. ## What contributions can I make? @@ -68,15 +68,51 @@ And we made the following changes based on the guide: - 120-character line length - Camel-Cased file names +### Format code -## Run unit test +Install clang-format +```shell +$ sudo apt-get install clang-format +$ rm cmake_build/CMakeCache.txt +``` +Check code style +```shell +$ ./build.sh -l +``` +To format the code +```shell +$ cd cmake_build +$ make clang-format +``` -We use Google Test framework for test running. -To run unit test for Milvus under C++, please use the following command: +## Run unit test with code coverage +Before submitting your PR, make sure you have run unit test, and your code coverage rate is >= 90%. + +Install lcov ```shell -# Run unit test for Milvus -$ ./build.sh -u +$ sudo apt-get install lcov +``` +Run unit test and generate code for code coverage check +```shell +$ ./build.sh -u -c ``` +Run MySQL docker +```shell +docker pull mysql:latest +docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest +``` + +Run code coverage + +```shell +$ ./coverage.sh -u root -p 123456 -t 127.0.0.1 +``` + +Or start your own MySQL server, and then run code coverage + +```shell +$ ./coverage.sh -u ${MYSQL_USERNAME} -p ${MYSQL_PASSWORD} -t ${MYSQL_SERVER_IP} +``` diff --git a/README.md b/README.md index ce3cd77f37d1de15381672eb9ad1f09c8230c653..08760798e2a5016d19af445a633b30535072ce9b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ # Welcome to Milvus -Firstly, welcome, and thanks for your interest in [Milvus](https://milvus.io)! No matter who you are, what you do, we greatly appreciate your contribution to help us reinvent data science with Milvus. +Firstly, welcome, and thanks for your interest in [Milvus](https://milvus.io)! ​​No matter who you are, what you do, we greatly appreciate your contribution to help us reinvent data science with Milvus. ## What is Milvus @@ -28,14 +28,14 @@ Keep up-to-date with newest releases and latest updates by reading Milvus [relea - Intelligent index - With a “Decide Your Own Algorithm” approach, you can embed machine learning and advanced algorithms into Milvus without the headache of complex data engineering or migrating data between disparate systems. Milvus is built on optimized indexing algorithm based on quantization indexing, tree-based and graph indexing methods. + With a "Decide Your Own Algorithm" approach, you can embed machine learning and advanced algorithms into Milvus without the headache of complex data engineering or migrating data between disparate systems. Milvus is built on optimized indexing algorithm based on quantization indexing, tree-based and graph indexing methods. - Strong scalability The data is stored and computed on a distributed architecture. This lets you scale data sizes up and down without redesigning the system. ## Architecture -![Milvus_arch](https://github.com/milvus-io/docs/blob/branch-0.5.0/assets/milvus_arch.png) +![Milvus_arch](https://github.com/milvus-io/docs/blob/branch-0.5.0/assets/milvus_arch.jpg) ## Get started @@ -72,55 +72,6 @@ $ ./build.sh -t Release When the build is completed, all the stuff that you need in order to run Milvus will be installed under `[Milvus root path]/core/milvus`. -#### Code format and linting - -Install clang-format -```shell -$ sudo apt-get install clang-format -$ rm cmake_build/CMakeCache.txt -``` -Check code style -```shell -$ ./build.sh -l -``` -To format the code -```shell -$ cd cmake_build -$ make clang-format -``` - -#### Run unit test - -```shell -$ ./build.sh -u -``` - -#### Run code coverage - -Install lcov -```shell -$ sudo apt-get install lcov -``` -```shell -$ ./build.sh -u -c -``` -Run MySQL docker -```shell -docker pull mysql:latest -docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest -``` -Run code coverage - -```shell -$ ./coverage.sh -u root -p 123456 -t 127.0.0.1 -``` - -Or start your own MySQL server, and then run code coverage - -```shell -$ ./coverage.sh -u ${MYSQL_USERNAME} -p ${MYSQL_PASSWORD} -t ${MYSQL_SERVER_IP} -``` - #### Launch Milvus server ```shell