Skip to content

Commit 94c1726

Browse files
Document how to lint types with mypy
1 parent a687d90 commit 94c1726

File tree

2 files changed

+45
-13
lines changed

2 files changed

+45
-13
lines changed

README.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ less efficient than a partial page update on the client side.
2525

2626
### Install development dependencies in a VSCode Dev Container
2727

28-
If you use VSCode with Docker, the following VSCode Dev Container
29-
configuration will install all dependencies and automatically open the
30-
project in a container:
28+
If you use VSCode with Docker to develop in a container, the following
29+
VSCode Dev Container configuration will install all dependencies:
3130

3231
``` json
3332
{
@@ -41,9 +40,12 @@ project in a container:
4140
}
4241
```
4342

44-
Simply create a .devcontainer folder in the root of the project and add
45-
a devcontainer.json file with this content, and then “Reopen in
46-
Container” from View \> Command Palette.
43+
Simply create a `.devcontainer` folder in the root of the project and
44+
add a `devcontainer.json` file in the folder with the above content.
45+
VSCode may prompt you to install the Dev Container extension if you
46+
haven’t already, and/or to open the project in a container. If not, you
47+
can manually select “Dev Containers: Reopen in Container” from View \>
48+
Command Palette.
4749

4850
### Install development dependencies manually
4951

@@ -130,24 +132,42 @@ account, verify a domain, get an API key, and paste the API key into the
130132

131133
### Start development database
132134

133-
`docker compose up -d`
135+
``` bash
136+
docker compose up -d
137+
```
134138

135139
### Create database tables and default permissions/roles
136140

137-
`python migrations/set_up_db.py --drop`
141+
``` bash
142+
python migrations/set_up_db.py --drop
143+
```
138144

139145
### Run the development server
140146

141147
Make sure the development database is running and tables and default
142148
permissions/roles are created first.
143149

144-
`uvicorn main:app --host 0.0.0.0 --port 8000 --reload`
150+
``` bash
151+
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
152+
```
145153

146154
Navigate to http://localhost:8000/
147155

156+
### Lint types with mypy
157+
158+
``` bash
159+
mypy .
160+
```
161+
148162
### Render the README
149163

150-
`quarto render README.qmd`
164+
When updating the documentation, remember to make changes in the
165+
README.qmd file, not the README.md file. Then run the following command
166+
to render the README.md file:
167+
168+
``` bash
169+
quarto render README.qmd
170+
```
151171

152172
### Contributing
153173

README.qmd

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,32 @@ To use password recovery, register a [Resend](https://resend.com/) account, veri
148148

149149
### Start development database
150150

151-
`docker compose up -d`
151+
``` bash
152+
docker compose up -d
153+
```
152154

153155
### Create database tables and default permissions/roles
154156

155-
`python migrations/set_up_db.py --drop`
157+
``` bash
158+
python migrations/set_up_db.py --drop
159+
```
156160

157161
### Run the development server
158162

159163
Make sure the development database is running and tables and default permissions/roles are created first.
160164

161-
`uvicorn main:app --host 0.0.0.0 --port 8000 --reload`
165+
``` bash
166+
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
167+
```
162168

163169
Navigate to http://localhost:8000/
164170

171+
### Lint types with mypy
172+
173+
``` bash
174+
mypy .
175+
```
176+
165177
### Render the README
166178

167179
When updating the documentation, remember to make changes in the README.qmd file, not the README.md file. Then run the following command to render the README.md file:

0 commit comments

Comments
 (0)