Skip to content

Commit 847ed62

Browse files
committed
Test: expandable parts
1 parent 04310ed commit 847ed62

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ The structure of this project is modular. Hyperion has a core that performs vita
1010

1111
## 1. Creating a virtual environment for Python 3.12
1212

13+
<details>
14+
<summary>
15+
1316
### Windows
1417

18+
</summary>
19+
1520
Create the virtual environment
1621

1722
> You need to be in Hyperion main folder
@@ -38,8 +43,15 @@ Activate it
3843
.\.venv\Scripts\activate
3944
```
4045

46+
</details>
47+
48+
<details>
49+
<summary>
50+
4151
### macOS (using Pyenv)
4252

53+
</summary>
54+
4355
Install Pyenv
4456

4557
```bash
@@ -66,6 +78,8 @@ Activate it
6678
pyenv activate hyperion
6779
```
6880

81+
</details>
82+
6983
## 2. Install dependencies
7084

7185
### About Jellyfish and Rust
@@ -140,8 +154,13 @@ None (not so heavy, configuration not so hard).
140154

141155
#### Configuration
142156

157+
<details>
158+
<summary>
159+
143160
##### Without Docker: native binaries
144161

162+
</summary>
163+
145164
1. Download the installer: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
146165
2. Launch it and trust the wizard
147166
- Keep the default folders and ports, install it all, etc...
@@ -170,8 +189,15 @@ then running SQL or Postgres commands in this shell, or
170189
psql -U postgres -d hyperion -c "select firstname from core_user;"
171190
```
172191

192+
</details>
193+
194+
<details>
195+
<summary>
196+
173197
##### With Docker
174198

199+
</summary>
200+
175201
> [!WARNING]
176202
> Work in progress
177203
@@ -198,6 +224,8 @@ services:
198224
- ./hyperion-db:/var/lib/postgresql/data
199225
```
200226

227+
</details>
228+
201229
## 4. Complete the dotenv (`.env`) and the `config.yaml`
202230

203231
> [!IMPORTANT]
@@ -217,8 +245,13 @@ The `.env` contains environment variables which need to be accessed by the OS or
217245

218246
Again there's nothing to do.
219247

248+
<details>
249+
<summary>
250+
220251
#### With PostgreSQL
221252

253+
</summary>
254+
222255
Set your user, password, host and db.
223256

224257
For instance, with the installer you should have something like:
@@ -239,6 +272,8 @@ POSTGRES_HOST="hyperion-db"
239272
POSTGRES_DB="hyperion"
240273
```
241274

275+
</details>
276+
242277
### `config.yaml`
243278

244279
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
281316
There are many ways to do so, ranked here from easiest (GUI only) to hardest (CLI only).
282317
Note that registration and activation are distinct steps, so for fun you may register one way and activate your account another way.
283318

319+
<details>
320+
<summary>
321+
284322
### With CalypSSO
285323

324+
</summary>
325+
286326
#### Registering your account
287327

288328
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
292332
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.
293333
Open it and activate (end the creation of) your account.
294334

335+
</details>
336+
337+
<details>
338+
<summary>
339+
295340
### With Titan
296341

342+
</summary>
343+
297344
1. Click "_Se connecter_" on the login page: you land CalypSSO's login page.
298345
2. Click "_Créer un compte_" and create your account using CalypSSO as above.
299346

347+
</details>
348+
349+
<details>
350+
<summary>
351+
300352
### Using the API through the swagger
301353

354+
</summary>
355+
302356
#### Registering your account
303357

304358
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.
314368
4. Open it, click "Try it out".
315369
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".
316370

371+
</details>
372+
373+
<details>
374+
<summary>
375+
317376
### Using the API in command line
318377

378+
</summary>
379+
319380
> [!TIP]
320381
> On Windows, `curl` is different.
321382
> To get the same results as on Linux and MacOS:
@@ -349,6 +410,8 @@ curl --json '{
349410
}' http://localhost:8000/users/activate
350411
```
351412

413+
</details>
414+
352415
## 7. Make the first user admin
353416

354417
> [!WARNING]
@@ -362,8 +425,13 @@ curl -X POST http://localhost:8000/users/make-admin
362425

363426
---
364427

428+
<details>
429+
<summary>
430+
365431
# Beyond initial configuration
366432

433+
</summary>
434+
367435
## Install Docker or an equivalent
368436

369437
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
419487
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.
420488

421489
You should use our [init file](./init.py) to ensure that database initialization and migrations are only run once.
490+
491+
</details>

0 commit comments

Comments
 (0)