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
+70Lines changed: 70 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,13 @@ The structure of this project is modular. Hyperion has a core that performs vita
10
10
11
11
## 1. Creating a virtual environment for Python 3.12
12
12
13
+
<details>
14
+
<summary>
15
+
13
16
### Windows
14
17
18
+
</summary>
19
+
15
20
Create the virtual environment
16
21
17
22
> You need to be in Hyperion main folder
@@ -38,8 +43,15 @@ Activate it
38
43
.\.venv\Scripts\activate
39
44
```
40
45
46
+
</details>
47
+
48
+
<details>
49
+
<summary>
50
+
41
51
### macOS (using Pyenv)
42
52
53
+
</summary>
54
+
43
55
Install Pyenv
44
56
45
57
```bash
@@ -66,6 +78,8 @@ Activate it
66
78
pyenv activate hyperion
67
79
```
68
80
81
+
</details>
82
+
69
83
## 2. Install dependencies
70
84
71
85
### About Jellyfish and Rust
@@ -140,8 +154,13 @@ None (not so heavy, configuration not so hard).
140
154
141
155
#### Configuration
142
156
157
+
<details>
158
+
<summary>
159
+
143
160
##### Without Docker: native binaries
144
161
162
+
</summary>
163
+
145
164
1. Download the installer: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
146
165
2. Launch it and trust the wizard
147
166
- Keep the default folders and ports, install it all, etc...
@@ -170,8 +189,15 @@ then running SQL or Postgres commands in this shell, or
170
189
psql -U postgres -d hyperion -c "select firstname from core_user;"
171
190
```
172
191
192
+
</details>
193
+
194
+
<details>
195
+
<summary>
196
+
173
197
##### With Docker
174
198
199
+
</summary>
200
+
175
201
> [!WARNING]
176
202
> Work in progress
177
203
@@ -198,6 +224,8 @@ services:
198
224
- ./hyperion-db:/var/lib/postgresql/data
199
225
```
200
226
227
+
</details>
228
+
201
229
## 4. Complete the dotenv (`.env`) and the `config.yaml`
202
230
203
231
> [!IMPORTANT]
@@ -217,8 +245,13 @@ The `.env` contains environment variables which need to be accessed by the OS or
217
245
218
246
Again there's nothing to do.
219
247
248
+
<details>
249
+
<summary>
250
+
220
251
#### With PostgreSQL
221
252
253
+
</summary>
254
+
222
255
Set your user, password, host and db.
223
256
224
257
For instance, with the installer you should have something like:
@@ -239,6 +272,8 @@ POSTGRES_HOST="hyperion-db"
239
272
POSTGRES_DB="hyperion"
240
273
```
241
274
275
+
</details>
276
+
242
277
### `config.yaml`
243
278
244
279
The `config.yaml` contains environment variables that are internal to the Python runtime _because_ they are only used in the Python code.
@@ -281,8 +316,13 @@ Check that your Hyperion instance is up and running by navigating to http://loca
281
316
There are many ways to do so, ranked here from easiest (GUI only) to hardest (CLI only).
282
317
Note that registration and activation are distinct steps, so for fun you may register one way and activate your account another way.
283
318
319
+
<details>
320
+
<summary>
321
+
284
322
### With CalypSSO
285
323
324
+
</summary>
325
+
286
326
#### Registering your account
287
327
288
328
Go to http://localhost:8000/calypsso/register and type a valid email address to register (start the creation of) your account.
@@ -292,13 +332,27 @@ Go to http://localhost:8000/calypsso/register and type a valid email address to
292
332
Go back to the shell running your Hyperion instance, in the logs look for a link looking like http://localhost:3000/calypsso/activate?activation_token=12345.
293
333
Open it and activate (end the creation of) your account.
294
334
335
+
</details>
336
+
337
+
<details>
338
+
<summary>
339
+
295
340
### With Titan
296
341
342
+
</summary>
343
+
297
344
1. Click "_Se connecter_" on the login page: you land CalypSSO's login page.
298
345
2. Click "_Créer un compte_" and create your account using CalypSSO as above.
299
346
347
+
</details>
348
+
349
+
<details>
350
+
<summary>
351
+
300
352
### Using the API through the swagger
301
353
354
+
</summary>
355
+
302
356
#### Registering your account
303
357
304
358
1. Go to http://localhost:8000/docs: this is called the _swagger_, a web interface to interact with the API, it is a layer on top of the "automatic documentation" (the _OpenAPI specification_) generated by FastAPI at http://localhost:8000/openapi.json.
@@ -314,8 +368,15 @@ Open it and activate (end the creation of) your account.
314
368
4. Open it, click "Try it out".
315
369
5. Fill in your information, using the `activation_token` you copied (click "Schema" next to "Edit Value" so see what fields are optional), and click "Execute".
316
370
371
+
</details>
372
+
373
+
<details>
374
+
<summary>
375
+
317
376
### Using the API in command line
318
377
378
+
</summary>
379
+
319
380
> [!TIP]
320
381
> On Windows, `curl` is different.
321
382
> To get the same results as on Linux and MacOS:
@@ -349,6 +410,8 @@ curl --json '{
349
410
}' http://localhost:8000/users/activate
350
411
```
351
412
413
+
</details>
414
+
352
415
## 7. Make the first user admin
353
416
354
417
> [!WARNING]
@@ -362,8 +425,13 @@ curl -X POST http://localhost:8000/users/make-admin
362
425
363
426
---
364
427
428
+
<details>
429
+
<summary>
430
+
365
431
# Beyond initial configuration
366
432
433
+
</summary>
434
+
367
435
## Install Docker or an equivalent
368
436
369
437
Install docker and the compose plugin (https://docs.docker.com/compose/install/)
@@ -419,3 +487,5 @@ See [app/core/google_api/README.md](./app/core/google_api/README.md) for more in
419
487
For production we encourage to use multiple Uvicorn workers. You can use our [docker image](./Dockerfile) and [docker-compose file](./docker-compose.yaml) files to run Hyperion with Unicorn.
420
488
421
489
You should use our [init file](./init.py) to ensure that database initialization and migrations are only run once.
0 commit comments