Skip to content

Commit 7104537

Browse files
Cleanup README
1 parent 2b0c15d commit 7104537

2 files changed

Lines changed: 9 additions & 22 deletions

File tree

.devcontainer/install-dependencies.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@ pip install uv
33
uv sync --directory ./backend --extra pg
44

55
cp ./backend/.env.example ./backend/.env
6-
echo "ARCS_API_BASE_URI=https://api-arcs-prod.radix.equinor.com">>./backend/.env
76
if [ -n "$CODESPACE_NAME" ]; then
8-
echo "FRONTEND_URI=https://$CODESPACE_NAME-5173.app.github.dev">>./backend/.env
7+
echo "FRONTEND_URI=https://$CODESPACE_NAME-5173.app.github.dev" >>./backend/.env
98
fi
109

1110
cp ./frontend/.env.example ./frontend/.env
1211
if [ -n "$CODESPACE_NAME" ]; then
13-
echo "VITE_API_URL=https://$CODESPACE_NAME-8001.app.github.dev">>./frontend/.env
12+
echo "VITE_API_URL=https://$CODESPACE_NAME-8001.app.github.dev" >>./frontend/.env
1413
fi
1514

1615
cd frontend
1716

1817
npm install
19-
20-

README.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ The production version of AcidWatch is found at https://acidwatch.radix.equinor.
1717
## Developing
1818

1919
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).
2120

2221
### Running with Docker Compose
2322

@@ -53,18 +52,13 @@ The backend is written using FastAPI and SQLAlchemy.
5352
Using uv, install AcidWatch's backend using the following command:
5453

5554
```sh
56-
uv --directory backend sync
55+
uv sync
5756
```
5857

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-
6458
Then, run the backend in development mode using the following command:
6559

6660
```sh
67-
uv --directory backend run python -m acidwatch_api
61+
uv run python -m acidwatch_api
6862
```
6963

7064
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
10195
dependency group. This installs the recommended SQLAlchemy driver:
10296

10397
```sh
104-
uv --directory backend sync --extra pg
98+
uv sync --package acidwatch-api --extra pg
10599
```
106100

107101
Then, set the `ACIDWATCH_DATABASE` as described in the [SQLite section](#SQLite) to the following:
@@ -117,8 +111,7 @@ ACIDWATCH_DATABASE=postgresql:///[database]?host=[path]
117111
ACIDWATCH_DATABASE=postgresql://postgres:password@localhost:5432/acidwatch
118112
```
119113

120-
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.
122115

123116
Don't have a postgres running? Here's a simple docker setup, that will create the necessary
124117
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
192185
Open a terminal and write following commands to run frontend.
193186

194187
```sh
195-
cd /frontend
188+
cd frontend
196189
npm run dev
197190
```
198191

@@ -201,14 +194,11 @@ npm run dev
201194
Open another terminal and run the backend with uv:
202195

203196
```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
206199
```
207200

208201
#### 3. Toggle port visibility
209202

210203
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.
211204

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

Comments
 (0)