Skip to content

Commit 3bc934e

Browse files
committed
appease linter
1 parent 8d39eef commit 3bc934e

File tree

6 files changed

+60
-16
lines changed

6 files changed

+60
-16
lines changed

.github/workflows/app-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Client App Build and Test
33

4-
on:
4+
'on':
55
push:
66
branches:
77
- main
@@ -47,7 +47,7 @@ jobs:
4747
npm run build
4848
npm run electron &
4949
ELECTRON_PID=$!
50-
sleep 150
50+
sleep 150
5151
if ps -p "$ELECTRON_PID" > /dev/null; then
5252
echo 'Electron app is still running, Ending the process.'
5353
kill "$ELECTRON_PID"

.github/workflows/docker-test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Build and Smoke Test
33

4-
on:
4+
'on':
55
push:
66
branches:
77
- main
@@ -38,11 +38,17 @@ jobs:
3838

3939
- name: Build backend image
4040
working-directory: pytc-client
41-
run: docker build -t pytc-backend .
41+
run: |
42+
docker build -t pytc-backend .
4243
4344
- name: Run backend container
4445
working-directory: pytc-client
45-
run: docker run -d --name pytc-backend -p 4242:4242 -p 4243:4243 pytc-backend
46+
run: |
47+
docker run -d \
48+
--name pytc-backend \
49+
-p 4242:4242 \
50+
-p 4243:4243 \
51+
pytc-backend
4652
4753
- name: Wait for API health
4854
run: |
@@ -59,7 +65,10 @@ jobs:
5965
6066
- name: Check PyTC service
6167
run: |
62-
curl -fsS http://localhost:4243/hello || (docker logs pytc-backend && exit 1)
68+
if ! curl -fsS http://localhost:4243/hello; then
69+
docker logs pytc-backend || true
70+
exit 1
71+
fi
6372
6473
- name: Cleanup container
6574
if: always()

.github/workflows/superlinter.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
name: Super-Linter
33

4-
on: push
4+
'on':
5+
push: {}
56

67
jobs:
78
super-lint:

.yamllint

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
extends: default
3+
4+
ignore: |
5+
.venv/
6+
node_modules/
7+
outputs/
8+
pytorch_connectomics/

README.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
## Recommended Setup (uv)
44

5-
We strongly recommend using [uv](https://docs.astral.sh/uv/) because it bundles Python 3.11, installs dependencies in seconds, and keeps the workflow to two commands.
5+
We strongly recommend using [uv](https://docs.astral.sh/uv/) because it bundles
6+
Python 3.11, installs dependencies in seconds, and keeps the workflow to two
7+
commands.
8+
9+
### Requirements (uv)
610

7-
**Prerequisites**
811
- [git](https://git-scm.com/)
912
- [uv](https://docs.astral.sh/uv/)
1013
- [Node.js](https://nodejs.org/) 18+ (includes npm)
@@ -23,26 +26,36 @@ scripts\bootstrap.ps1 # Windows PowerShell
2326
start.bat # Windows CMD
2427
```
2528

26-
This starts both FastAPI services under uv, runs the Electron client, and cleans up the servers when you close the UI. Re-run the bootstrap script any time you need to refresh dependencies.
29+
This starts both FastAPI services under uv, runs the Electron client, and cleans
30+
up the servers when you close the UI. Re-run the bootstrap script any time you
31+
need to refresh dependencies.
2732

2833
## Containerized Backend (Docker)
2934

30-
Prefer to keep everything in a container? The provided image uses uv inside the container so the backend is ready in one build step. This target runs the FastAPI API (`:4242`), the PyTC worker service (`:4243`), the Neuroglancer bridge (`:4244`), and TensorBoard (`:6006`). Electron is not included—use your local client or Electron build to talk to the containerised backend.
35+
Prefer to keep everything in a container? The provided image uses uv inside the
36+
container so the backend is ready in one build step. This target runs the
37+
FastAPI API (`:4242`), the PyTC worker service (`:4243`), the Neuroglancer
38+
bridge (`:4244`), and TensorBoard (`:6006`). Electron is not included—use your
39+
local client or Electron build to talk to the containerised backend.
40+
41+
### Requirements (Docker)
3142

32-
**Prerequisites**
3343
- Docker with Compose V2 (`docker compose`)
3444

35-
**Build the image**
45+
### Build the image
46+
3647
```bash
3748
docker compose build backend
3849
```
3950

40-
**Run the backend services**
51+
### Run the backend services
52+
4153
```bash
4254
docker compose up backend
4355
```
4456

4557
When you are done:
58+
4659
```bash
4760
docker compose down
4861
```
@@ -51,39 +64,51 @@ You can now point the desktop client at `http://localhost:4242`.
5164

5265
## Legacy Manual Setup (without uv)
5366

54-
If you prefer to manage Python environments yourself, follow the steps below. Expect a slower install and more moving pieces.
67+
If you prefer to manage Python environments yourself, follow the steps below.
68+
Expect a slower install and more moving pieces.
69+
70+
### Requirements (manual)
5571

56-
**Prerequisites**
5772
- Python 3.9–3.11 (conda, pyenv, or system Python)
5873
- [git](https://git-scm.com/)
5974
- [Node.js](https://nodejs.org/) 18+ (includes npm)
6075

6176
1. **Create / activate an environment**
77+
6278
```bash
6379
python -m venv .venv
6480
source .venv/bin/activate # Windows: .\.venv\Scripts\activate
6581
```
82+
6683
2. **Install backend dependencies**
84+
6785
```bash
6886
pip install -r server_api/requirements.txt
6987
```
88+
7089
3. **Download & install pytorch_connectomics**
90+
7191
```bash
7292
./setup_pytorch_connectomics.sh
7393
pip install -e pytorch_connectomics
7494
```
95+
7596
4. **Install frontend dependencies**
97+
7698
```bash
7799
cd client
78100
npm install
79101
cd ..
80102
```
103+
81104
5. **Run the app (three terminals or background processes)**
105+
82106
```bash
83107
python server_api/main.py
84108
python server_pytc/main.py
85109
cd client && npm run electron
86110
```
87111

88112
## Video Demo
113+
89114
[Video walkthrough](https://www.loom.com/share/45c09b36bf37408fb3e5a9172e427deb?sid=2777bf8f-a705-4d47-b17a-adf882994168)

docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: "3.9"
23

34
services:

0 commit comments

Comments
 (0)