Skip to content

Commit 1753388

Browse files
committed
Improve internal development documentation
1 parent 00d59d6 commit 1753388

File tree

7 files changed

+42
-24
lines changed

7 files changed

+42
-24
lines changed

docs/internal/ci.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CI
2+
3+
We use GitHub actions. For all third-party GitHub actions, we must pin it to a specific hash to comply with internal policies.

docs/development.md renamed to docs/internal/development.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,6 @@ $ pip install -r optic/requirements_lock.txt
9393

9494
> NOTE: You may need to run the command with `sudo` if you get a permission denied error, particularly with "\_distutils_hack".
9595
96-
### Type-checking (pyright)
97-
98-
We use [pyright](https://github.com/microsoft/pyright) for type-checking our Python code because it has excellent IDE support (particularly for VS Code).
99-
100-
To run type-checking, please follow the above steps to setup the venv and activate it in your shell session.
101-
102-
**Pre-requisite:**
103-
104-
- You will need to run `$ setup_proto_py_modules.sh`.
105-
106-
**Command:**
107-
108-
```sh
109-
$ pyright
110-
```
111-
11296
## Commit hooks
11397

11498
We use [pre-commit](https://pre-commit.com/) to automatically format, lint code before committing.
@@ -118,10 +102,6 @@ _Setup:_
118102
1. [Install pre-commit](https://pre-commit.com/#installation).
119103
1. Setup git hook: `pre-commit install`
120104

121-
## Web (Angular)
122-
123-
<TODO>
124-
125105
## Docs
126106

127107
We use [Mkdocs Material](https://squidfunk.github.io/mkdocs-material/) to generate our docs site.
File renamed without changes.

docs/internal/testing.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Testing
2+
3+
We use [Playwright](https://playwright.dev/) as our e2e test framework. Unlike most of the stack, this isn't Bazel-ified although we'd like to eventually do this.
4+
5+
## Run tests
6+
7+
```shell
8+
$ yarn playwright test
9+
```
10+
11+
## Debug tests
12+
13+
```shell
14+
$ yarn playwright test --debug
15+
```

docs/internal/toolchain.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Toolchain
2+
3+
We rely heavily on Angular's toolchain, particularly around Bazel integration. Many of the Bazel rules, particularly for Angular/TS code was forked from [github.com/angular/components](https://github.com/angular/components).

docs/internal/type_checking.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Type Checking
2+
3+
## Python Type Checking
4+
5+
For our Python code, we use [pyright](https://github.com/microsoft/pyright) as our static type checker because it has excellent IDE support in VS Code via [pylance](https://github.com/microsoft/pylance-release).
6+
7+
To run Python type-checking, run:
8+
9+
```shell
10+
$ ./scripts/run_py_typecheck.sh
11+
```
12+
13+
This will setup the pre-requisites needed for type-checking.

mkdocs.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ nav:
99
- Checkbox: components/checkbox.md
1010
- Text: components/text.md
1111
- Deployment: deployment.md
12-
- Goals: goals.md
1312
- Troubleshooting: troubleshooting.md
14-
- Advanced:
15-
- New component: new_component.md
16-
- Development: development.md
13+
- Developing Optic:
14+
- Goals: goals.md
15+
- New component: internal/new_component.md
16+
- Development: internal/development.md
17+
- Testing: internal/testing.md
18+
- Type checking: internal/type_checking.md
19+
- CI: internal/ci.md
20+
- Toolchain: internal/toolchain.md
1721
theme:
1822
name: material
1923
logo: assets/logo.png

0 commit comments

Comments
 (0)