Skip to content

Commit 4ec22da

Browse files
authored
Merge branch 'main' into feat/dark-mode
2 parents 3a47871 + 98634ea commit 4ec22da

8 files changed

Lines changed: 22 additions & 25 deletions

File tree

dev/diff/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/diff/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "diff",
33
"type": "module",
44
"dependencies": {
5-
"chalk": "^5.2.0",
5+
"chalk": "^5.3.0",
66
"dockerode": "^3.3.5",
77
"enquirer": "^2.3.6",
88
"extract-zip": "^2.0.1",

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ services:
7474
CELERY_APP: ietf
7575
CELERY_ROLE: worker
7676
UPDATE_REQUIREMENTS_FROM: requirements.txt
77-
DEV_MODE: yes
77+
DEV_MODE: "yes"
7878
command:
7979
- '--loglevel=INFO'
8080
depends_on:

docker/README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ This project includes a devcontainer configuration which automates the setup of
2929
### Initial Setup
3030

3131
1. Launch [VS Code](https://code.visualstudio.com/)
32-
2. Under the **Extensions** tab, ensure you have the **Remote - Containers** ([ms-vscode-remote.remote-containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)) extension installed.
32+
2. Under the **Extensions** tab, ensure you have the **Dev Containers** ([ms-vscode-remote.remote-containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)) extension installed.
3333
* On Linux, note that the Snap installation of VS Code is [incompatible with this plugin](https://code.visualstudio.com/docs/devcontainers/containers#_system-requirements:~:text=snap%20package%20is%20not%20supported).
34-
* On Windows, you also need the **Remote - WSL** ([ms-vscode-remote.remote-wsl](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)) extension to take advantage of the WSL 2 *(Windows Subsystem for Linux)* native integration.
34+
* On Windows, you also need the **WSL** ([ms-vscode-remote.remote-wsl](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl)) extension to take advantage of the WSL 2 *(Windows Subsystem for Linux)* native integration.
3535
2. Open the top-level directory of the datatracker code you fetched above.
3636
3. A prompt inviting you to reopen the project in containers will appear in the bottom-right corner. Click the **Reopen in Container** button. If you missed the prompt, you can press `F1`, start typing `reopen in container` task and launch it.
3737
4. VS Code will relaunch in the dev environment and create the containers automatically.
@@ -45,7 +45,7 @@ You can also open the datatracker project folder and click the **Reopen in conta
4545

4646
### Usage
4747

48-
- Under the **Run and Debug** tab, you can run the server with the debugger attached using **Run Server** (F5). Once the server is ready to accept connections, you'll be prompted to open in a browser. You can also open [http://localhost:8000](http://localhost:8000) in a browser.
48+
- Under the **Run and Debug** tab, you can run the server with the debugger attached using **Run Server** (F5). Once the server is ready to accept connections, you'll be prompted to open in a browser. Navigate to [http://localhost:8000](http://localhost:8000) in your preferred browser.
4949
5050
> An alternate profile **Run Server with Debug Toolbar** is also available from the dropdown menu, which displays various tools
5151
on top of the webpage. However, note that this configuration has a significant performance impact.
@@ -64,11 +64,7 @@ You can also open the datatracker project folder and click the **Reopen in conta
6464
6565
![](assets/vscode-terminal-new.png)
6666
67-
- Under the **SQL Tools** tab, a connection **Local Dev** is preconfigured to connect to the DB container. Using this tool, you can list tables, view records and execute SQL queries directly from VS Code.
68-
69-
> The port `3306` is also exposed to the host automatically, should you prefer to use your own SQL tool.
70-
71-
![](assets/vscode-sqltools.png)
67+
- The pgAdmin web interface, a PostgreSQL DB browser / management UI, is available at [http://localhost:8000/pgadmin/](http://localhost:8000/pgadmin/).
7268
7369
- Under the **Task Explorer** tab, a list of available preconfigured tasks is displayed. *(You may need to expand the tree to `src > vscode` to see it.)* These are common scritps you can run *(e.g. run tests, fetch assets, etc.)*.
7470
@@ -103,7 +99,7 @@ You can also open the datatracker project folder and click the **Reopen in conta
10399
2. Wait for the containers to initialize. Upon completion, you will be dropped into a shell from which you can start the datatracker and execute related commands as usual, for example
104100

105101
```
106-
ietf/manage.py runserver 0.0.0.0:8000
102+
ietf/manage.py runserver 0.0.0.0:8001
107103
```
108104

109105
to start the datatracker.
@@ -161,11 +157,11 @@ docker compose down -v --rmi all
161157
docker image prune
162158
```
163159

164-
### Accessing MariaDB Port
160+
### Accessing PostgreSQL Port
165161

166-
The port is exposed but not mapped to `3306` to avoid potential conflicts with the host. To get the mapped port, run the command *(from the project `/docker` directory)*:
162+
The port is exposed but not automatically mapped to `5432` to avoid potential conflicts with the host. To get the mapped port, run the command *(from the project `/docker` directory)*:
167163
```sh
168-
docker compose port db 3306
164+
docker compose port db 5432
169165
```
170166

171167
## Notes / Troubleshooting

ietf/doc/tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,6 +2585,7 @@ def test_personal_chart(self):
25852585
d = r.json()
25862586
self.assertEqual(len(d), 1)
25872587
self.assertEqual(len(d[0]), 2)
2588+
self.assertEqual(d[0][1], 1)
25882589

25892590
page_url = urlreverse('ietf.person.views.profile', kwargs=dict(email_or_name=person.name))
25902591
r = self.client.get(page_url)

ietf/doc/views_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def model_to_timeline_data(model, field='time', **kwargs):
4040
assert field in [ f.name for f in model._meta.get_fields() ]
4141

4242
objects = ( model.objects.filter(**kwargs)
43-
.annotate(date=TruncDate(field))
43+
.annotate(date=TruncDate(field, tzinfo=datetime.timezone.utc))
4444
.order_by('date')
4545
.values('date')
4646
.annotate(count=Count('id')))

ietf/group/tests_review.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_review_requests(self):
4141
r = self.client.get(url)
4242
self.assertEqual(r.status_code, 200)
4343
self.assertContains(r, review_req.doc.name)
44-
self.assertContains(r, assignment.reviewer.person.name)
44+
self.assertContains(r, escape(assignment.reviewer.person.name))
4545

4646
url = urlreverse(ietf.group.views.review_requests, kwargs={ 'acronym': group.acronym })
4747

@@ -183,7 +183,7 @@ def test_reviewer_overview(self):
183183
urlreverse(ietf.group.views.reviewer_overview, kwargs={ 'acronym': group.acronym, 'group_type': group.type_id })]:
184184
r = self.client.get(url)
185185
self.assertEqual(r.status_code, 200)
186-
self.assertContains(r, reviewer.name)
186+
self.assertContains(r, escape(reviewer.name))
187187
self.assertContains(r, review_req1.doc.name)
188188
# without a login, reason for being unavailable should not be seen
189189
self.assertNotContains(r, "Availability")

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ django-widget-tweaks>=1.4.12
3030
djlint>=1.0.0 # To auto-indent templates via "djlint --profile django --reformat"
3131
docutils>=0.18.1 # Used only by dbtemplates for RestructuredText
3232
types-docutils>=0.18.1
33-
factory-boy>=3.2.1
33+
factory-boy>=3.2.1,<3.3
3434
github3.py>=3.2.0
3535
gunicorn>=20.1.0
3636
hashids>=1.3.1

0 commit comments

Comments
 (0)