forked from LAION-AI/Open-Assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
240 changed files
with
49,750 additions
and
24,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# devcontainer | ||
|
||
## example usage | ||
|
||
Below are some example use cases you might want to run from within the | ||
devcontainer (either | ||
[within VSCode locally](https://code.visualstudio.com/docs/devcontainers/create-dev-container#_create-a-devcontainerjson-file) | ||
or in your browser via | ||
[GitHub Codespaces](https://github.com/features/codespaces)). | ||
|
||
### Run pre-commit | ||
|
||
```bash | ||
# run pre-commit | ||
pre-commit run --all-files | ||
``` | ||
|
||
A successfull run should look something like this: | ||
|
||
``` | ||
@andrewm4894 ➜ /workspaces/Open-Assistant (devcontainer-improvements) $ pre-commit run --all-files | ||
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. | ||
[INFO] Initializing environment for https://github.com/psf/black. | ||
[INFO] Initializing environment for https://github.com/psf/black:.[jupyter]. | ||
[INFO] Initializing environment for https://github.com/pycqa/flake8. | ||
[INFO] Initializing environment for https://github.com/pycqa/isort. | ||
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier. | ||
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier:prettier@2.7.1. | ||
[INFO] Initializing environment for local. | ||
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. | ||
[INFO] Once installed this environment will be reused. | ||
[INFO] This may take a few minutes... | ||
[INFO] Installing environment for https://github.com/psf/black. | ||
[INFO] Once installed this environment will be reused. | ||
[INFO] This may take a few minutes... | ||
[INFO] Installing environment for https://github.com/pycqa/flake8. | ||
[INFO] Once installed this environment will be reused. | ||
[INFO] This may take a few minutes... | ||
[INFO] Installing environment for https://github.com/pycqa/isort. | ||
[INFO] Once installed this environment will be reused. | ||
[INFO] This may take a few minutes... | ||
[INFO] Installing environment for https://github.com/pre-commit/mirrors-prettier. | ||
[INFO] Once installed this environment will be reused. | ||
[INFO] This may take a few minutes... | ||
[INFO] Installing environment for local. | ||
[INFO] Once installed this environment will be reused. | ||
[INFO] This may take a few minutes... | ||
trim trailing whitespace.................................................Passed | ||
check python ast.........................................................Passed | ||
check yaml...............................................................Passed | ||
check json...............................................................Passed | ||
check for case conflicts.................................................Passed | ||
detect private key.......................................................Passed | ||
fix python encoding pragma...............................................Passed | ||
forbid submodules....................................(no files to check)Skipped | ||
mixed line ending........................................................Passed | ||
fix requirements.txt.....................................................Passed | ||
check that executables have shebangs.....................................Passed | ||
check that scripts with shebangs are executable..........................Passed | ||
check BOM - deprecated: use fix-byte-order-marker........................Passed | ||
check for broken symlinks............................(no files to check)Skipped | ||
check for merge conflicts................................................Passed | ||
check for added large files..............................................Passed | ||
fix end of files.........................................................Passed | ||
black-jupyter............................................................Passed | ||
flake8...................................................................Passed | ||
isort....................................................................Passed | ||
prettier.................................................................Passed | ||
Lint website.............................................................Passed | ||
``` | ||
|
||
### Docker compose | ||
|
||
```bash | ||
# build the image | ||
docker compose up --build | ||
``` | ||
|
||
You should see some docker containers being pulled and activated. | ||
|
||
Once you see a line like: | ||
|
||
``` | ||
open-assistant-web-1 | Listening on port 3000 url: http://localhost:3000 | ||
``` | ||
|
||
you should be able to access that port like below: | ||
|
||
<img width="640" alt="image" src="https://user-images.githubusercontent.com/2178292/210395676-e9c2aab5-cb54-4ae6-b1eb-ac929fd73607.png"> | ||
|
||
this port can then be forwarded to a browser tab like below: | ||
|
||
<img width="640" alt="image" src="https://user-images.githubusercontent.com/2178292/210396207-1b2e259f-4d5d-475d-b225-91e2bd004071.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "Open-Assistant", | ||
"image": "mcr.microsoft.com/vscode/devcontainers/universal", | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/pre-commit:2": { | ||
"version": "latest" | ||
} | ||
}, | ||
"postCreateCommand": "bash .devcontainer/post_create_command.sh", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["GitHub.copilot"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ensure pre-commit is installed | ||
pre-commit install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test API Contract | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
test-contract: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- run: cd oasst-shared && pip install -e . | ||
|
||
- run: cd oasst-shared && pip install -r requirements.dev.txt | ||
|
||
- run: cd backend && pip install -r requirements.txt | ||
|
||
- run: ./scripts/backend-development/start-mock-server.sh | ||
|
||
- name: Run contract tests | ||
run: ./scripts/oasst-shared-development/test.sh | ||
|
||
- run: ./scripts/backend-development/stop-mock-server.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
*.egg-info | ||
__pycache__ | ||
.DS_Store | ||
|
||
# Generated files | ||
backend/oasst-openapi.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
* @yk @andreaskoepf | ||
/website/ @fozziethebeat @k-nearest-neighbor @AbdBarho | ||
/model/ @theblackcat102 @sanagno | ||
/copilot/ @fozziethebeat @andreaskoepf @yk |
Oops, something went wrong.