Skip to content

Commit ae5dd64

Browse files
committed
Move development documentation into separate document
1 parent 63b30a7 commit ae5dd64

File tree

2 files changed

+83
-79
lines changed

2 files changed

+83
-79
lines changed

README.md

Lines changed: 3 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -117,86 +117,10 @@ http {
117117
NGINX compression is disabled by default.
118118
With compression enabled, the amount of data transferred can be significantly reduced, resulting in a reduction in transfer time, especially on slow networks.
119119

120-
## Development
120+
## Documentation
121121

122-
The following software is required:
123-
124-
- Python 3
125-
- [uv](https://github.com/astral-sh/uv)
126-
- Rust toolchain
127-
- tmux (optional)
128-
129-
### Setting up the development environment
130-
131-
Add the WebAssembly target to the Rust toolchain.
132-
133-
```console
134-
$ rustup target add wasm32-unknown-unknown
135-
```
136-
137-
Install the Rust development tools.
138-
139-
```console
140-
$ cargo install --locked trunk cargo-llvm-cov cargo-nextest
141-
```
142-
143-
Install the Python project and development tools.
144-
145-
```console
146-
$ uv sync
147-
```
148-
149-
### Running development servers
150-
151-
The current codebase can be executed by running development servers for the frontend and the backend. The development servers will automatically reload when the codebase is changed.
152-
153-
Start both development servers at the same time (requires an active tmux session):
154-
155-
```console
156-
$ make run
157-
```
158-
159-
Alternatively, start the development servers for the frontend and the backend separately:
160-
161-
```console
162-
$ make run_frontend
163-
```
164-
165-
```console
166-
$ make run_backend
167-
```
168-
169-
After a successful start of the development servers, the web app can be reached on `http://127.0.0.1:8000`.
170-
171-
### Building a distribution package
172-
173-
```console
174-
$ make dist
175-
```
176-
177-
### Deploying the application
178-
179-
Deploy the latest distribution package.
180-
181-
```console
182-
$ fab -H user@host deploy
183-
```
184-
185-
### Changing the database schema
186-
187-
Create a migration script after changing the SQLAlchemy ORM model.
188-
189-
```console
190-
$ VALENS_CONFIG=$PWD/build/config.py alembic revision --autogenerate -m "Add foo table"
191-
```
192-
193-
The automatically generated migration script may be incomplete.
194-
195-
Upgrade the database schema to the latest revision.
196-
197-
```console
198-
$ VALENS_CONFIG=$PWD/build/config.py alembic upgrade head
199-
```
122+
- [Development](https://github.com/treiher/valens/blob/main/doc/DEVELOPMENT.md)
123+
- [Architecture](https://github.com/treiher/valens/blob/main/doc/ARCHITECTURE.md)
200124

201125
## License
202126

doc/DEVELOPMENT.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Development
2+
3+
The following software is required:
4+
5+
- Python 3
6+
- [uv](https://github.com/astral-sh/uv)
7+
- Rust toolchain
8+
- tmux (optional)
9+
10+
## Setting up the development environment
11+
12+
Add the WebAssembly target to the Rust toolchain.
13+
14+
```console
15+
$ rustup target add wasm32-unknown-unknown
16+
```
17+
18+
Install the Rust development tools.
19+
20+
```console
21+
$ cargo install --locked trunk cargo-llvm-cov cargo-nextest
22+
```
23+
24+
Install the Python project and development tools.
25+
26+
```console
27+
$ uv sync
28+
```
29+
30+
## Running development servers
31+
32+
The current codebase can be executed by running development servers for the frontend and the backend. The development servers will automatically reload when the codebase is changed.
33+
34+
Start both development servers at the same time (requires an active tmux session):
35+
36+
```console
37+
$ make run
38+
```
39+
40+
Alternatively, start the development servers for the frontend and the backend separately:
41+
42+
```console
43+
$ make run_frontend
44+
```
45+
46+
```console
47+
$ make run_backend
48+
```
49+
50+
After a successful start of the development servers, the web app can be reached on `http://127.0.0.1:8000`.
51+
52+
## Building a distribution package
53+
54+
```console
55+
$ make dist
56+
```
57+
58+
## Deploying the application
59+
60+
Deploy the latest distribution package.
61+
62+
```console
63+
$ fab -H user@host deploy
64+
```
65+
66+
## Changing the database schema
67+
68+
Create a migration script after changing the SQLAlchemy ORM model.
69+
70+
```console
71+
$ VALENS_CONFIG=$PWD/build/config.py alembic revision --autogenerate -m "Add foo table"
72+
```
73+
74+
The automatically generated migration script may be incomplete.
75+
76+
Upgrade the database schema to the latest revision.
77+
78+
```console
79+
$ VALENS_CONFIG=$PWD/build/config.py alembic upgrade head
80+
```

0 commit comments

Comments
 (0)