Skip to content

Commit 4eb3dd2

Browse files
committed
update readme
1 parent 502fb2c commit 4eb3dd2

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ You can either develop using the dev database, or use the local database provide
2929

3030
Using the local database is detailed below, but both options will require the dev database password, so you will have to ask an RTP for this too
3131

32+
#### Forcing evals/rtp or anything else
33+
All of the role checking is done in `conditional/utils/user_dict.py`, and you can change the various functions to `return True` for debugging
34+
3235
### Run (Without Docker)
3336

3437
To run the application without using containers, you must have the latest version of [Python 3](https://www.python.org/downloads/) and [virtualenv](https://virtualenv.pypa.io/en/stable/installation/) installed. Once you have those installed, create a new virtualenv and install the Python dependencies:
3538

3639
```sh
37-
virtualenv .conditionalenv -p `which python3`
38-
source .conditionalenv/bin/activate
40+
virtualenv .venv
41+
source .venv/bin/activate
3942
pip install -r requirements.txt
4043
```
4144

@@ -89,7 +92,9 @@ Which can be restarted every time changes are made
8992

9093
To add new dependencies, add them to `requirements.in` and then run `pip-compile requirements.in` to produce a new locked `requirements.txt`. Do not edit `requirements.txt` directly as it will be overwritten by future PRs.
9194

92-
### Local database
95+
### Database Stuff
96+
97+
#### Local database
9398

9499
You can run the database locally using the docker compose
95100

@@ -106,18 +111,23 @@ To run migration commands in the local database, you can run the commands inside
106111
podman exec conditional flask db upgrade
107112
```
108113

109-
### Database Migrations
114+
#### Database Migrations
110115

111116
If the database schema is changed after initializing the database, you must migrate it to the new schema by running:
112117

113-
```
118+
```sh
114119
flask db upgrade
120+
# or, to run it inside the container for use with local databases (DO THIS
121+
podman exec conditional flask db upgrade
115122
```
116123

124+
117125
At the same time, if you change the database schema, you must generate a new migration by running:
118126

119-
```
127+
```sh
120128
flask db migrate
129+
# or, to run it inside the container for use with local databases (DO THIS
130+
podman exec conditional flask db migrate
121131
```
122132

123133
The new migration script in `migrations/versions` should be verified before being committed, as Alembic may not detect every change you make to the models.
@@ -128,7 +138,7 @@ For more information, refer to the [Flask-Migrate](https://flask-migrate.readthe
128138

129139
Conditional includes a utility to facilitate data migrations from the old Evals DB. This isn't necessary to run Conditional. To perform this migration, run the following commands before starting the application:
130140

131-
```
141+
```sh
132142
pip install pymysql
133143
flask zoo
134144
```

0 commit comments

Comments
 (0)