From c66af067aa57a52b28d53507da619691d9c23b5c Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Mon, 21 Oct 2019 11:20:10 +0800 Subject: [PATCH 1/3] docs(contrib): add first commit guideline --- CONTRIBUTING.md | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49e7a898..27a94c90 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,10 +2,26 @@ 🙇 Thanks for your interest in contributing! GNES always welcome the contribution from the open-source community, individual committers and other partners. Without you, GNES can't be successful. -Currently there are three major directions of contribution: -- **Porting state-of-the-art models to GNES**. This includes new preprocessing algorithms, new DNN networks for encoding, and new high-performance index. Believe me, it is super easy to wrap an algorithm and use it in GNES. Checkout this example. -- **Adding tutorial and learning experience**. What is good and what can be improved? If you apply GNES in your domain, whether it's about NLP or CV, whether it's a blog post or a Reddit/Twitter thread, we are always eager to hear your thoughts. -- **Completing the user experience of other programming languages**. GNES offers a generic interface with gRPC and protobuf, therefore it is easy to add an interface for other languages, e.g. Java, C, Go. +## ❤️ Making Your First Commit + +The beginning is always the hardest. But fear not, even if you find a typo, a missing docstring or unit test, you can simply correct them by making a commit to GNES. Here are the steps: + +1. Create a new branch, say `fix-gnes-typo-1` +2. Fix/improve the codebase +3. Commit the changes. Note the **commit message must follow [the naming style]((#commit-message-naming))**, say `fix(readme): improve the readability and move sections` +4. Make a pull request. Note the **commit message must follow [the naming style]((#commit-message-naming))**. It can simply be one of your commit messages, just copy paste it, e.g. `fix(readme): improve the readability and move sections` +5. Submit your pull request and wait for all checks passed (usually 10 minutes) + - Coding style + - Commit and PR styles check + - All unit tests +6. Request reviews from one of the developers from our core team. +7. Get a LGTM 👍 and PR gets merged. + +Well done! Once a PR gets merged, here are the things happened next: +- all Docker images tagged with `-latest` will be automatically updated in an hour. You may check the [its building status at here](https://github.com/gnes-ai/gnes/#install-gnes-via-pip) +- on every Friday when a new release is published, PyPi packages and all Docker images tagged with `-stable` will be updated accordindly. +- your contribution and commits will be included in [our weekly release note](https://github.com/gnes-ai/gnes/blob/master/CHANGELOG.md). 🍻 + ## Table of Content @@ -14,6 +30,7 @@ Currently there are three major directions of contribution: * [Release Process](#release-process) - [Major and minor version increments](#major-and-minor-version-increments) * [Testing Locally](#testing-locally) +* [Interesting Points](#intersting-points) ## Commit Message Naming @@ -60,19 +77,21 @@ After the merging is triggered, the build will be delivered to the followings: - **Docker Hub**: `gnes:latest` will be updated. - **Tencent Container Service**: `gnes:latest` will be updated. - **ReadTheDoc**: `latest` will be updated. +- **Benchmark**: [speed test](https://github.com/gnes-ai/benchmark) will be updated. Note that merging into master does not mean an official releasing. For the releasing process, please refer to the next section. ## Release Process -A new release is scheduled on every Friday (triggered and approved by Han Xiao) summarizing all new commits since the last release. The release will increment the third (revision) part of the version number, i.e. from `0.0.24` to `0.0.25`. +A new release is scheduled on every Friday (triggered and approved by [Han Xiao](https://github.com/hanxiao)) summarizing all new commits since the last release. The release will increment the third (revision) part of the version number, i.e. from `0.0.24` to `0.0.25`. After a release is triggered, the build will be delivered to the followings: - **Docker Hub**: a new image with the release version tag will be created, `gnes:latest` will be updated. - **Tencent Container Service**: a new image with the release version tag will be created, `gnes:latest` will be updated. - **PyPi Package**: a new version of Python package is uploaded to Pypi, allowing one to `pip install -U gnes` -- **ReadTheDoc**: a new version of the document will be built, `latest` will be updated and the old version will be achieved. +- **ReadTheDoc**: a new version of the document will be built, `latest` will be updated and the old version will be achieved +- **Benchmark**: [speed test](https://github.com/gnes-ai/benchmark) will be updated. Meanwhile, a new pull request containing the updated [CHANGELOG](./CHANGELOG.md) and the new version number will be made automatically, pending for review and merge. @@ -103,4 +122,11 @@ docker run --network=host --rm --entrypoint "/bin/bash" -it gnes/ci-base # first sync your local modification, then pip install -e .[all] python -m unittest tests/*.py -``` \ No newline at end of file +``` + +## Interesting Points + +Currently there are three major directions of contribution: +- **Porting state-of-the-art models to GNES**. This includes new preprocessing algorithms, new DNN networks for encoding, and new high-performance index. Believe me, it is super easy to wrap an algorithm and use it in GNES. Checkout this example. +- **Adding tutorial and learning experience**. What is good and what can be improved? If you apply GNES in your domain, whether it's about NLP or CV, whether it's a blog post or a Reddit/Twitter thread, we are always eager to hear your thoughts. +- **Completing the user experience of other programming languages**. GNES offers a generic interface with gRPC and protobuf, therefore it is easy to add an interface for other languages, e.g. Java, C, Go. From 139769cc59b7b3cedc7036c3bfd50dc64ce656c3 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Mon, 21 Oct 2019 11:23:56 +0800 Subject: [PATCH 2/3] docs(readme): fix contrib section in readme --- README.md | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 83463e7d..4bf2cfa0 100644 --- a/README.md +++ b/README.md @@ -466,20 +466,25 @@ We have setup [this repository](https://github.com/gnes-ai/benchmark) to track t

Contributing

-Thanks for your interest in contributing! GNES always welcome the contribution from the open-source community, individual committers and other partners. Without you, GNES can't be successful. - -Currently there are three major directions of contribution: -- **Porting state-of-the-art models to GNES**. This includes new preprocessing algorithms, new DNN networks for encoding, and new high-performance index. Believe me, it is super easy to wrap an algorithm and use it in GNES. Checkout this example. -- **Adding tutorial and learning experience**. What is good and what can be improved? If you apply GNES in your domain, whether it's about NLP or CV, whether it's a blog post or a Reddit/Twitter thread, we are always eager to hear your thoughts. -- **Completing the user experience of other programming languages**. GNES offers a generic interface with gRPC and protobuf, therefore it is easy to add an interface for other languages, e.g. Java, C, Go. - -Make sure to read the contributor guidelines before your first commit. - -- [Contributor guidelines](./CONTRIBUTING.md) -- [Open issues](/issues) -- [Release notes](./CHANGELOG.md) - -For contributors looking to get deeper into the API we suggest cloning the repository and checking out the unit tests for examples of how to call methods. +❤️ The beginning is always the hardest. But fear not, even if you find a typo, a missing docstring or unit test, you can simply correct them by making a commit to GNES. Here are the steps: + +1. Create a new branch, say `fix-gnes-typo-1` +2. Fix/improve the codebase +3. Commit the changes. Note the **commit message must follow [the naming style]((#commit-message-naming))**, say `fix(readme): improve the readability and move sections` +4. Make a pull request. Note the **commit message must follow [the naming style]((#commit-message-naming))**. It can simply be one of your commit messages, just copy paste it, e.g. `fix(readme): improve the readability and move sections` +5. Submit your pull request and wait for all checks passed (usually 10 minutes) + - Coding style + - Commit and PR styles check + - All unit tests +6. Request reviews from one of the developers from our core team. +7. Get a LGTM 👍 and PR gets merged. + +Well done! Once a PR gets merged, here are the things happened next: +- all Docker images tagged with `-latest` will be automatically updated in an hour. You may check the [its building status at here](https://github.com/gnes-ai/gnes/#install-gnes-via-pip) +- on every Friday when a new release is published, PyPi packages and all Docker images tagged with `-stable` will be updated accordindly. +- your contribution and commits will be included in [our weekly release note](https://github.com/gnes-ai/gnes/blob/master/CHANGELOG.md). 🍻 + +More details can be found in the [contributor guidelines](./CONTRIBUTING.md).

Citing GNES

From f6d099e8a1e7f7603ebdba0d703baf68295ebbd2 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Mon, 21 Oct 2019 11:35:03 +0800 Subject: [PATCH 3/3] docs(readme): fix typo --- README.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4bf2cfa0..6e16fae4 100644 --- a/README.md +++ b/README.md @@ -145,12 +145,11 @@ Besides the `alpine` image optimized for the space, we also provide Buster (Debi -We also provide a public mirror hosted on Tencent Cloud and [Github packages](https://github.com/gnes-ai/gnes/packages/). Select the mirror that serves you well. +> ⚠️ Since 2019/10/21, we have stopped hosting the public mirror Tencent Cloud. The old Docker images still exist, but there won't be new images available on Tencent Cloud anymore. + +We also provide a public mirror [Github packages](https://github.com/gnes-ai/gnes/packages/). Select the mirror that serves you well. ```bash -docker login --username=xxx ccr.ccs.tencentyun.com # login to Tencent Cloud so that we can pull from it -docker run ccr.ccs.tencentyun.com/gnes/gnes:latest-alpine -# OR via Github package docker login --username=xxx docker.pkg.github.com/gnes-ai/gnes # login to github package so that we can pull from it docker run docker.pkg.github.com/gnes-ai/gnes/gnes:latest-alpine ``` @@ -167,10 +166,6 @@ The table below shows the status of the build pipeline. Github Package
docker.pkg.github.com/gnes-ai/gnes/gnes:[tag] - -Tencent Cloud
ccr.ccs.tencentyun.com/gnes/gnes:[tag] - - ### Install GNES via `pip` @@ -226,9 +221,9 @@ Either way, if you end up reading the following message after `$ gnes` or `$ doc - [🐣 Preliminaries](#-preliminaries) * [Microservice](#microservice) - * [Runtime](#runtime) + * [Workflow](#workflow) - [Building a flower search engine in 3 minutes](#building-a-flower-search-engine-in-3-minutes) - * [Define the indexing workflow:](#define-the-indexing-workflow-) + * [Define the indexing workflow](#define-the-indexing-workflow) * [Indexing flower image data](#indexing-flower-image-data) * [Querying similar flowers](#querying-similar-flowers) - [Elastic made easy](#elastic-made-easy) @@ -239,7 +234,7 @@ Either way, if you end up reading the following message after `$ gnes` or `$ doc ### 🐣 Preliminaries -Before we start, let me first introduce two important concepts serving as the backbone of GNES: **microservice** and **workflow**. +Before we start, let me first introduce two important concepts in GNES: **microservice** and **workflow**. #### Microservice @@ -268,7 +263,7 @@ These three tasks correspond to three different **workflows** in GNES. In this example, we will use the new `gnes.flow` API (`gnes >= 0.0.46` is required) to build a toy image search system for indexing and retrieving [flowers](http://www.robots.ox.ac.uk/~vgg/data/flowers/17/) based on their similarities. -#### Define the indexing workflow: +#### Define the indexing workflow Let's first define the indexing workflow by: @@ -471,7 +466,7 @@ We have setup [this repository](https://github.com/gnes-ai/benchmark) to track t 1. Create a new branch, say `fix-gnes-typo-1` 2. Fix/improve the codebase 3. Commit the changes. Note the **commit message must follow [the naming style]((#commit-message-naming))**, say `fix(readme): improve the readability and move sections` -4. Make a pull request. Note the **commit message must follow [the naming style]((#commit-message-naming))**. It can simply be one of your commit messages, just copy paste it, e.g. `fix(readme): improve the readability and move sections` +4. Make a pull request. Note the **pull request must follow [the naming style]((#commit-message-naming))**. It can simply be one of your commit messages, just copy paste it, e.g. `fix(readme): improve the readability and move sections` 5. Submit your pull request and wait for all checks passed (usually 10 minutes) - Coding style - Commit and PR styles check