From 1d1f1ce4d384e1be0e90e0bc705630e873a3ce8e Mon Sep 17 00:00:00 2001 From: debuggy Date: Fri, 27 Mar 2020 15:21:17 +0800 Subject: [PATCH] Edit readme --- README.md | 26 ++++++++++++++++++++------ rest_server/README.md | 6 +++--- webportal_plugin/README.md | 2 +- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5ae915d6..2330d5d9 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,33 @@ A marketplace which stores examples and job templates of openpai. Users could use openpaimarketplace to share their jobs or run-and-learn others' sharing job. -## get started +## Components -1. [start rest server](./rest_server/README.md) +There are two components of openpaimarketplace, [rest server](./rest_server/README.md) and [webportal plugin](./webportal_plugin/README.md), which are responsible for backend service and frontend usage seperately. Please could check the two folders for more detail. -2. [start webportal plugin](./webportal_plugin/README.md) +## Get started -3. configure in pai webportal and use +- [start rest server](./rest_server/README.md) -When deploy pai webportal, configure marketplace webportal plugin in advance, then the marketplace could be used through pai webportal. For more detail, please refer to [webportal configuration doc](https://github.com/microsoft/pai/blob/master/docs/webportal/PLUGINS.md) +- [start webportal plugin](./webportal_plugin/README.md) + +- configure in pai webportal + + When deploy pai webportal, configure marketplace webportal plugin in advance, then the marketplace could be used through pai webportal. For more detail, please refer to [webportal configuration doc](https://github.com/microsoft/pai/blob/master/docs/webportal/PLUGINS.md) + +## Code style check of webportal + +This project use eslint with standard config as linter and prettier as code formatter. + +Pleae refer to eslint config file and prettier config file for details. Make sure to run yarn lint command every time before you push your code, and resolve all the errors and warnings. Otherwise it will break the CI check when you submit your pull request. + +If you use modern editors like VS Code. It is highly recommends to install eslint and prettier extensions. + + How to do code format with prettier? You could use cli like prettier --write 'src/**/*.js' 'src/**/*.jsx' or use prettier extension in vscode. ## Contributing -This project welcomes contributions and suggestions. Most contributions require you to agree to a +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . diff --git a/rest_server/README.md b/rest_server/README.md index f2dff43a..f778d28f 100644 --- a/rest_server/README.md +++ b/rest_server/README.md @@ -2,9 +2,9 @@ The rest server of openpai-marketplace. It is the api service to use openpai marketplace. -## get started +## Get started -1. deployment +- deployment The rest server uses PostgreSQL database as storage. So you should firstly ensure a working PostgreSQL database and set the connection string in rest server .env file. For install and start postgre database, please refer to [official doc](https://www.postgresql.org/download/) @@ -16,6 +16,6 @@ The rest server uses PostgreSQL database as storage. So you should firstly ensur - yarn start ``` -2. test api +- api specification Please refer to [openapi spec](./marketplace_api_spec_3.0.yaml) for marketplace api. diff --git a/webportal_plugin/README.md b/webportal_plugin/README.md index d2582e5d..b906425f 100644 --- a/webportal_plugin/README.md +++ b/webportal_plugin/README.md @@ -2,7 +2,7 @@ The rest server of openpai-marketplace. It is the main entrance for pai user to use openpai marketplace. -## get started +## Get started The deployment of webportal plugin used webpack-dev-server to hold static plugin.js file by default. However you could use webpack to build plugin.js file and render it by your own service.