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
+17-7Lines changed: 17 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,16 @@ You can either develop using the dev database, or use the local database provide
29
29
30
30
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
31
31
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
+
32
35
### Run (Without Docker)
33
36
34
37
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:
35
38
36
39
```sh
37
-
virtualenv .conditionalenv -p `which python3`
38
-
source .conditionalenv/bin/activate
40
+
virtualenv .venv
41
+
source .venv/bin/activate
39
42
pip install -r requirements.txt
40
43
```
41
44
@@ -89,7 +92,9 @@ Which can be restarted every time changes are made
89
92
90
93
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.
91
94
92
-
### Local database
95
+
### Database Stuff
96
+
97
+
#### Local database
93
98
94
99
You can run the database locally using the docker compose
95
100
@@ -106,18 +111,23 @@ To run migration commands in the local database, you can run the commands inside
106
111
podman exec conditional flask db upgrade
107
112
```
108
113
109
-
### Database Migrations
114
+
####Database Migrations
110
115
111
116
If the database schema is changed after initializing the database, you must migrate it to the new schema by running:
112
117
113
-
```
118
+
```sh
114
119
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
115
122
```
116
123
124
+
117
125
At the same time, if you change the database schema, you must generate a new migration by running:
118
126
119
-
```
127
+
```sh
120
128
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
121
131
```
122
132
123
133
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
128
138
129
139
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:
0 commit comments