Skip to content

Commit

Permalink
chore: merge and make CI buildable (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonywu6 authored Nov 23, 2023
1 parent 5e49ea7 commit 2ac1fc2
Show file tree
Hide file tree
Showing 197 changed files with 17,402 additions and 7,343 deletions.
4 changes: 2 additions & 2 deletions .changeset/blue-crabs-argue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'@secretflow/notebook-pyproject-secretnote': patch
'@secretflow/notebook-pyproject-spu-stubs': patch
'secretnote': patch
'spu-stubs': patch
---

Initial publish
9 changes: 9 additions & 0 deletions .changeset/loud-kids-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@secretflow/secretnote-ui': minor
'secretnote': minor
'spu-stubs': minor
'@secretflow/repo-utils': minor
'@secretflow/secretnote': minor
---

Include SecretNote server application
6 changes: 3 additions & 3 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"mode": "pre",
"tag": "dev",
"initialVersions": {
"tsup-utils": "0.1.0",
"@secretflow/notebook-pyproject-secretnote": "0.0.0",
"@secretflow/notebook-pyproject-spu-stubs": "0.0.0"
"@secretflow/repo-utils": "0.1.0",
"secretnote": "0.0.0",
"spu-stubs": "0.0.0"
},
"changesets": ["blue-crabs-argue"]
}
14 changes: 1 addition & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "notebook",
"build": {
"dockerfile": "./Dockerfile"
"dockerfile": "../docker/devcontainer.Dockerfile"
},
"mounts": [
{
Expand All @@ -21,7 +21,6 @@
"waitFor": "postCreateCommand",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
Expand All @@ -39,16 +38,5 @@
"tamasfe.even-better-toml"
]
}
},
"forwardPorts": [3000, 8000],
"portsAttributes": {
"3000": {
"label": "Docusaurus",
"onAutoForward": "notify"
},
"8000": {
"label": "Umi",
"onAutoForward": "notify"
}
}
}
15 changes: 11 additions & 4 deletions .devcontainer/scripts/create-venv.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
#!/usr/bin/env bash

PYTHON_VENV_VERSION=$(cat .python-version | tr -d " \t\n\r")
PYTHON_VERSION="3.8.17"
REPO_ROOT=$(git rev-parse --show-toplevel)

rye fetch $PYTHON_VENV_VERSION
# Download Python
rye fetch $PYTHON_VERSION

# Remove current virtual environment
find .venv -exec rm -rf {} + 2> /dev/null

# Create new virtual environment
cd "$REPO_ROOT"/..
python +$PYTHON_VERSION -m venv "$REPO_ROOT/.venv"

python +$PYTHON_VENV_VERSION -m venv "$REPO_ROOT/.venv"
printf '{"python": "%s"}' "$PYTHON_VENV_VERSION" > "$REPO_ROOT/.venv/rye-venv.json"
# Write auxiliary files for Rye
printf '{"python": "%s"}\n' "$PYTHON_VERSION" > "$REPO_ROOT/.venv/rye-venv.json"
printf '%s\n' "$PYTHON_VERSION" > "$REPO_ROOT/.python-version"
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@ indent_size = 4
[*.ipynb]
indent_size = 4

[*.bazel]
indent_size = 4

[*.BUILD]
indent_size = 4

[Makefile]
indent_style = tab
10 changes: 2 additions & 8 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
root: true,

env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
Expand All @@ -11,14 +12,7 @@ module.exports = {
],
plugins: ['import'],

env: {
node: true,
},
settings: {
react: {
version: '18',
},
},
ignorePatterns: ['dist', '.eslintrc.*'],

rules: {
// common pitfalls
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.node.js → .eslintrc.node.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: [require.resolve('./.eslintrc.js')],
extends: [require.resolve('./.eslintrc.cjs')],
rules: {
'no-console': 'off',
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- uses: docker/build-push-action@v4
with:
push: false
file: ./docker/notebook.Dockerfile
file: ./docker/ci.Dockerfile
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ jobs:
uses: secretflow/web-ci/.github/workflows/ci-javascript.yml@main
with:
node-version: ${{ matrix.node-version }}
python-version: '3.8'
strategy:
fail-fast: false
matrix:
node-version: ['16.20.x']
node-version: ['18', '20']

ci-python:
name: 'CI: Python'
uses: secretflow/web-ci/.github/workflows/ci-python.yml@main
with:
node-version: '18'
python-version: ${{ matrix.python-version }}
strategy:
fail-fast: false
matrix:
python-version: ['3.8.x']
python-version: ['3.8']
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions: {}
jobs:
changesets:
# prevents this action from running on forks
if: github.repository == 'secretflow/notebook'
if: github.repository == 'secretflow/secretnote'

name: Changesets
uses: secretflow/web-ci/.github/workflows/release-changesets.yml@main
Expand Down
24 changes: 19 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ venv/
ENV/
env.bak/
venv.bak/
# .python-version
.python-version

# Env files
.env.*
Expand Down Expand Up @@ -303,13 +303,27 @@ dist
**/.dumi/tmp
**/.dumi/tmp-production

# Umi
.umi/
.umi-production/
.umi-test/

# macOS stuff
.DS_Store

# Personalization
.vscode/launch.json

#umi
.umi/
.umi-production/
.umi-test/
# gitignore template for Bazel build system
# website: https://bazel.build/

# Ignore all bazel-* symlinks. There is no full list since this can change
# based on the name of the directory bazel is cloned into.
/bazel-*

# Directories for the Bazel IntelliJ plugin containing the generated
# IntelliJ project files and plugin configuration. Seperate directories are
# for the IntelliJ, Android Studio and CLion versions of the plugin.
/.ijwb/
/.aswb/
/.clwb/
3 changes: 2 additions & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
'*': ['prettier --ignore-unknown --check'],
'*.*': ['prettier --ignore-unknown --check'],
'*.{css,less}': ['stylelint'],
'*.{js,jsx,ts,tsx,mjs,mts,cjs,cts,mtsx,ctsx,mjsx,cjsx}': ['eslint'],
'*.{py,pyi}': ['black --check', 'ruff check', 'pyright'],
'*.ipynb': ['black --check', 'ruff check' /* 'pyright' */],
};
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pnpm-lock.yaml
**/.dumi/tmp
**/.dumi/tmp-production
**/.docusaurus
**/.openapi-stubs

# protobuf
**/*_pb.ts
Expand Down
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

6 changes: 6 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ module.exports = {
'selector-class-pattern': null,
'no-invalid-double-slash-comments': null,
},
overrides: [
{
files: ['*.less', '**/*.less'],
customSyntax: 'postcss-less',
},
],
};
23 changes: 22 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,43 @@
"arange",
"astd",
"awatch",
"consts",
"coro",
"cpus",
"dagre",
"dbaeumer",
"difizen",
"elkjs",
"elts",
"ename",
"endent",
"fdpexpect",
"fdspawn",
"getipython",
"grpcio",
"ifaddresses",
"iloc",
"INET",
"infeed",
"ipywidgets",
"jaxpr",
"jsonlines",
"kuscia",
"lasti",
"libro",
"libspu",
"lucide",
"lumino",
"mfsu",
"nbclient",
"nbformat",
"ndarray",
"netifaces",
"networkx",
"noopener",
"noreferrer",
"nrwl",
"otlp",
"pbar",
"pbars",
"pphlo",
Expand All @@ -49,14 +63,21 @@
"pyright",
"pytest",
"remarkrc",
"retvals",
"rjsf",
"Roboto",
"scql",
"SPUIO",
"tablefmt",
"teeu",
"tqdm",
"tsup",
"ultratb",
"unflatten",
"vercel",
"vitest",
"webp"
"webp",
"Yao's"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
Expand Down
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"streetsidesoftware.code-spell-checker",
"ms-python.python",
"ms-python.vscode-pylance",
// "ms-python.flake8",
"charliermarsh.ruff",
"ms-python.black-formatter",
"ms-vscode-remote.remote-containers"
"ms-vscode-remote.remote-containers",
"nrwl.angular-console"
],
"unwantedRecommendations": []
}
Loading

0 comments on commit 2ac1fc2

Please sign in to comment.