You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-17Lines changed: 7 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ The production version of AcidWatch is found at https://acidwatch.radix.equinor.
17
17
## Developing
18
18
19
19
AcidWatch uses Python in the backend and Javascript in the frontend.
20
-
Additionally, some features require a reasonably up-to-date Java version. Ensure that you have Python 3.12 or later, [uv](https://docs.astral.sh/uv/), NodeJS and Java (eg. OpenJDK 21).
21
20
22
21
### Running with Docker Compose
23
22
@@ -53,18 +52,13 @@ The backend is written using FastAPI and SQLAlchemy.
53
52
Using uv, install AcidWatch's backend using the following command:
54
53
55
54
```sh
56
-
uv --directory backend sync
55
+
uv sync
57
56
```
58
57
59
-
> [!NOTE]
60
-
> Here, `--directory backend` instructs `uv` to enter the `backend/` directory before
61
-
> doing anything. If you enter the `backend` directory (eg. via `cd backend`), you
62
-
> can drop writing `--directory backend` for each command.
63
-
64
58
Then, run the backend in development mode using the following command:
65
59
66
60
```sh
67
-
uv --directory backend run python -m acidwatch_api
61
+
uv run python -m acidwatch_api
68
62
```
69
63
70
64
To change the settings, first copy `backend/.env.example` to `backend/.env` and
@@ -101,7 +95,7 @@ First, ensure that the backend is installed with the `pg` (PostgreSQL) optional
101
95
dependency group. This installs the recommended SQLAlchemy driver:
102
96
103
97
```sh
104
-
uv --directory backend sync --extra pg
98
+
uv sync --package acidwatch-api --extra pg
105
99
```
106
100
107
101
Then, set the `ACIDWATCH_DATABASE` as described in the [SQLite section](#SQLite) to the following:
AcidWatch uses SQLAlchemy's Alembic to handle migrations. Run `uv --directory backend
121
-
run alembic upgrade head` to migrate the database to the current schema.
114
+
AcidWatch uses SQLAlchemy's Alembic to handle migrations. Run `uv run alembic upgrade head` to migrate the database to the current schema.
122
115
123
116
Don't have a postgres running? Here's a simple docker setup, that will create the necessary
124
117
database to work with the example above:
@@ -192,7 +185,7 @@ If someone fancies using codespaces and wants to break out of the tedious local
192
185
Open a terminal and write following commands to run frontend.
193
186
194
187
```sh
195
-
cd/frontend
188
+
cd frontend
196
189
npm run dev
197
190
```
198
191
@@ -201,14 +194,11 @@ npm run dev
201
194
Open another terminal and run the backend with uv:
202
195
203
196
```sh
204
-
uv --directory backend sync
205
-
uv --directory backend run python -m acidwatch_api
197
+
uv sync
198
+
uv run python -m acidwatch_api
206
199
```
207
200
208
201
#### 3. Toggle port visibility
209
202
210
203
Kudos! Now frontend is running on port 5173, and backend is on 8001. Toggle the port for backend only to be public so it's accessible by frontend.
211
204
212
-
#### 4. Point to a different deployment environment
213
-
214
-
Now open source models can be run and tested. To point to a different instance of deployment (dev, prod or local) install-dependencies.sh can be updated.
0 commit comments