Skip to content

Commit

Permalink
Merge pull request #4 from secretflow/feat/tee
Browse files Browse the repository at this point in the history
Feat/tee
  • Loading branch information
bigdadel authored Dec 11, 2023
2 parents 8e59cb6 + 35a8c65 commit a733be8
Show file tree
Hide file tree
Showing 202 changed files with 8,668 additions and 1,696 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:
id: create_tar
shell: bash
run: |
tar -cvf ./apps/platform/${{ github.ref_name }}.tar ./apps/platform/dist
tar -cvf ./packages/dag/${{ github.ref }}.tar ./packages/dag/dist
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
generate_release_notes: true
files: ./apps/platform/${{ github.ref_name }}.tar
files: ./packages/dag/${{ github.ref }}.tar
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ yarn-error.log*

.env

repo_sync/*
repo_sync
115 changes: 89 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,105 @@ English (US) | [简体中文](CONTRIBUTING.zh-Hans.md)

# Contributing

## collaboration
## Development

### Submit Information
Make sure you have [pnpm](https://pnpm.io/installation) and
[Turborepo](https://turbo.build/repo/docs/installing) installed globally.

We use
[Angular's Commit Specification](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commit-message-format).
```bash
npm -g install pnpm nx
npm -g exec pnpm setup
```

### First time setup

The format of the title is `type: subject`:
```bash
pnpm bootstrap
```

- `type` a label indicating what kind of commit this is (what changes are involved)
- A one-sentence description of the `subject` submission
- Use English imperative sentences (what this commit will do); lowercase initials; do not use periods
- (We don't use `scope` for now)
> This will install deps with `pnpm install`, ant then setup all packages with
> `nx run-many setup`.
Commonly used `type`:
### Starting the dev server

- `fix` This is a commit that fixes a bug
- `feat` This is a commit that adds a new feature
- `refactor` This is a commit that refactors an existing feature
- `docs` This commit updates the docs (README/comments/…)
- `ci` commits changes to CI (changed ESLint rules/updated testing tools/updated GitHub
Actions...)
- `chore` Other changes that do not meet the above description (such as regular dependency updates)
```bash
pnpm dev
```

**If you find that your commit satisfies multiple tags at the same time, your commit needs to be split into multiple. **
The example app will be available at http://localhost:8000 by default.

Example:
### Formatting

```bash
pnpm fix
# run ESLint/Stylelint/Prettier and attempt to fix found issues
```
feat: add ahooks
ci: update tooling config
refactor: remove useless ide-scql
docs: make issues/PR templates bilingual

### Linting and testing

```bash
pnpm lint
pnpm test
```

### source branch
### Building

```bash
pnpm build
```

Branch naming follows a similar convention to commit messages. The format is `type/subject`, where `subject` uses
`kebab-case` (all lower case, use - as hyphen), **branch name does not need to add your name. **
You may then serve the built app with `pnpm serve`.

### Per-package operations

[https://pnpm.io/filtering](https://pnpm.io/filtering)

Use either the package name (the `"name"` field in `package.json`) or the **relative**
path to the package's folder (must be prefixed with `./`) to specify the package(s) on
which the command should be run.

```bash
pnpm --filter <package> <command> [...]

pnpm --filter web add react react-dom
pnpm --filter ./apps/web add react react-dom
# add react and react-dom as dependencies to the package named "web"
# whose folder is located at ./apps/web

pnpm --filter "@scope/*" run clean
pnpm --filter "./packages/*" run clean
# use glob to select multiple packages, the pattern must be quoted
```

#### Adding dependencies

[https://pnpm.io/cli/add](https://pnpm.io/cli/add)

`add` for normal dependencies `dependencies`

```bash
pnpm --filter <package> add [dependency ...]
# pnpm --filter web add react react-dom
```

`add -D` for development dependencies `devDependencies`

```bash
pnpm --filter <package> add -D [dependency ...]
# pnpm --filter web add -D jest
```

`add --save-peer` for peer dependencies `peerDependencies`

```bash
pnpm --filter <package> add --save-peer [dependency ...]
# pnpm --filter ui add --save-peer react "monaco-editor@^0.31.0"
```

💡 for adding workspace packages as dependencies, use the same command as above, but
append `--workspace`

```bash
pnpm --filter <package> add [--save-dev|--save-peer] [dependency ...] --workspace
# pnpm --filter web add -D eslint-config-project --workspace
```
101 changes: 101 additions & 0 deletions CONTRIBUTING.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,107 @@

# 贡献指南

## 开发

请确保有安装 [pnpm](https://pnpm.io/installation)
[Nx](https://turbo.build/repo/docs/installing)

```bash
npm -g install pnpm nx
npm -g exec pnpm setup
```

### 首次运行

```bash
pnpm bootstrap
```

> 这会 `pnpm install` 安装依赖,然后 `nx run-many --target=setup` 初始化所有包。
### 启动开发服务器

```bash
pnpm dev
```

默认在 http://localhost:8000 启动

### 代码格式化

```bash
pnpm fix
# 运行 ESLint/Stylelint/Prettier 并且尝试自动修正问题
```

### 检查及测试

```bash
pnpm lint
pnpm test
```

### 构建

```bash
pnpm build
```

构建产物可以通过 `pnpm serve` 命令进行预览。

### 对单个 package 进行操作

[https://pnpm.io/filtering](https://pnpm.io/filtering)

使用 package 的名称(`package.json` 中的 `"name"` 字段)或者 **相对路径**(必须以 `./`
开头)来指定要操作的 package.

```bash
pnpm --filter <package> <command> [...]

pnpm --filter web add react react-dom
pnpm --filter ./apps/web add react react-dom
# 将 react 和 react-dom 作为 dependencies 加到名为 web 的 package 中,其路径为 ./apps/web

pnpm --filter "@scope/*" run clean
pnpm --filter "./packages/*" run clean
# 使用 glob 来选择多个 package,表达式必须使用双引号包裹
```

#### 安装新依赖

[https://pnpm.io/cli/add](https://pnpm.io/cli/add)

使用以下命令:

`add` 安装普通依赖 `dependencies`

```bash
pnpm --filter <package> add [dependency ...]
# pnpm --filter web add react react-dom
```

`add -D` 安装开发依赖 `devDependencies`

```bash
pnpm --filter <package> add -D [dependency ...]
# pnpm --filter web add -D jest
```

`add --save-peer` 安装同伴依赖 `peerDependencies`

```bash
pnpm --filter <package> add --save-peer [dependency ...]
# pnpm --filter ui add --save-peer react "monaco-editor@^0.31.0"
```

💡 将内部 package 作为依赖,请使用与上面相同的命令并在命令末尾加上 `--workspace`

```bash
pnpm --filter <package> add [--save-dev|--save-peer] [dependency ...] --workspace
# pnpm --filter web add -D eslint-config-project --workspace
```

## 协作

### 提交信息
Expand Down
98 changes: 1 addition & 97 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,12 @@
English (US) | [简体中文](README.zh-Hans.md)

# SecretFlow Frontend
# SecretFlow Platform

## Development

Make sure you have [pnpm](https://pnpm.io/installation) and
[Turborepo](https://turbo.build/repo/docs/installing) installed globally.

```bash
npm -g install pnpm nx
npm -g exec pnpm setup
```

### First time setup

```bash
pnpm bootstrap
```

> This will install deps with `pnpm install`, ant then setup all packages with
> `nx run-many setup`.
### Starting the dev server

```bash
pnpm dev
```

The example app will be available at http://localhost:8000 by default.

### Formatting

```bash
pnpm fix
# run ESLint/Stylelint/Prettier and attempt to fix found issues
```

### Linting and testing

```bash
pnpm lint
pnpm test
```

### Building

```bash
pnpm build
```

You may then serve the built app with `pnpm serve`.

### Per-package operations

[https://pnpm.io/filtering](https://pnpm.io/filtering)

Use either the package name (the `"name"` field in `package.json`) or the **relative**
path to the package's folder (must be prefixed with `./`) to specify the package(s) on
which the command should be run.

```bash
pnpm --filter <package> <command> [...]

pnpm --filter web add react react-dom
pnpm --filter ./apps/web add react react-dom
# add react and react-dom as dependencies to the package named "web"
# whose folder is located at ./apps/web

pnpm --filter "@scope/*" run clean
pnpm --filter "./packages/*" run clean
# use glob to select multiple packages, the pattern must be quoted
```

#### Adding dependencies

[https://pnpm.io/cli/add](https://pnpm.io/cli/add)

`add` for normal dependencies `dependencies`

```bash
pnpm --filter <package> add [dependency ...]
# pnpm --filter web add react react-dom
```

`add -D` for development dependencies `devDependencies`

```bash
pnpm --filter <package> add -D [dependency ...]
# pnpm --filter web add -D jest
```

`add --save-peer` for peer dependencies `peerDependencies`

```bash
pnpm --filter <package> add --save-peer [dependency ...]
# pnpm --filter ui add --save-peer react "monaco-editor@^0.31.0"
```

💡 for adding workspace packages as dependencies, use the same command as above, but
append `--workspace`

```bash
pnpm --filter <package> add [--save-dev|--save-peer] [dependency ...] --workspace
# pnpm --filter web add -D eslint-config-project --workspace
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for more info.
Loading

0 comments on commit a733be8

Please sign in to comment.