Skip to content

Commit 9f9cced

Browse files
committed
Merge branch 'main' into preview
2 parents ef00b73 + 52217c8 commit 9f9cced

File tree

63 files changed

+8987
-885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+8987
-885
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
branch = 1
33

44
[report]
5-
omit = .tox*,*tests*,*migrations*
5+
omit = *tests*,*migrations*

.github/workflows/tests.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ on:
77
- main
88
pull_request:
99

10+
env:
11+
PYTHON_VERSION: 3.12
12+
1013
jobs:
1114
tests:
1215
runs-on: ubuntu-24.04
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
# tox-gh-actions will only run the tox environments which match the currently
17-
# running python-version. See [gh-actions] in tox.ini for the mapping.
18-
python-version: ["3.12"]
1916

2017
services:
2118
postgres:
22-
image: postgres:14-alpine
19+
image: postgres:17-trixie
2320
env:
2421
POSTGRES_PASSWORD: postgres
2522
options: >-
@@ -35,10 +32,11 @@ jobs:
3532
- name: Set up Python
3633
uses: actions/setup-python@v5
3734
with:
38-
python-version: "${{ matrix.python-version }}"
35+
python-version: ${{ env.PYTHON_VERSION }}
3936
- name: Install dependencies
4037
run: |
41-
python -m pip install --upgrade pip setuptools coveralls "tox<5" "tox-gh-actions<4"
38+
python -m pip install --upgrade pip setuptools
39+
python -m pip install -r requirements/tests.txt
4240
- name: Set up databases
4341
run: |
4442
PGPASSWORD="postgres" createuser -U postgres -d djangoproject --superuser -h localhost
@@ -59,15 +57,6 @@ jobs:
5957
echo '"trac_db_host": "localhost", ' >> conf/secrets.json
6058
echo '"trac_db_password": "secret", ' >> conf/secrets.json
6159
echo '"secret_key": "a"}' >> conf/secrets.json
62-
- name: Run tox
60+
- name: Run tests
6361
run: |
64-
python -m tox
65-
- name: Coveralls
66-
env:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
COVERALLS_PARALLEL: true
69-
COVERALLS_FLAG_NAME: "${{ matrix.python-version }}"
70-
COVERALLS_SERVICE_NAME: github
71-
COVERALLS_SERVICE_JOB_ID: "${{ github.run_id }}"
72-
COVERALLS_SERVICE_NUMBER: "${{ github.workflow }}-${{ github.run_number }}"
73-
run: coveralls --service=github
62+
make ci

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ locale/*/LC_MESSAGES/django.mo
1212
.coverage
1313
.direnv
1414
.envrc
15-
.tox
1615
djangoproject/cache
1716
djangoproject/static/css/*.map
1817
djangoproject/static/css/*.css

.pre-commit-config.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ repos:
6161
hooks:
6262
- id: djhtml
6363
files: .*/templates/.*\.html$
64-
- repo: https://github.com/tox-dev/pyproject-fmt
65-
rev: "v2.6.0"
66-
hooks:
67-
- id: pyproject-fmt
6864
- repo: https://github.com/mrtazz/checkmake.git
6965
rev: 0.2.2
7066
hooks:

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ RUN apt-get update \
1414
gettext \
1515
git \
1616
libpq5 \
17+
postgresql-common \
1718
make \
1819
rsync \
20+
&& /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y \
21+
&& apt-get install --assume-yes --no-install-recommends \
22+
postgresql-client-17 \
1923
&& apt-get distclean
2024

2125
ARG REQ_FILE=requirements/prod.txt

README.rst

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ djangoproject.com source code
44
.. image:: https://github.com/django/djangoproject.com/workflows/Tests/badge.svg?branch=main
55
:target: https://github.com/django/djangoproject.com/actions
66

7-
.. image:: https://coveralls.io/repos/django/djangoproject.com/badge.svg?branch=main
8-
:target: https://coveralls.io/r/django/djangoproject.com?branch=main
9-
107
To run locally, you can either:
118

129
- Install and run from a virtual environment
@@ -87,7 +84,7 @@ Install and run locally from a virtual environment
8784
#. For docs (next step requires ``gettext``)::
8885

8986
python -m manage loaddata doc_releases
90-
python -m manage update_docs --update-index
87+
python -m manage update_docs
9188

9289
#. For dashboard:
9390

@@ -130,16 +127,13 @@ Our test results can be found here:
130127

131128
* https://github.com/django/djangoproject.com/actions
132129

133-
For local development don't hesitate to install
134-
`tox <https://tox.readthedocs.io/>`_ to run the website's test suite.
135-
136130
Then in the root directory (next to the ``manage.py`` file) run::
137131

138-
tox
132+
make test
139133

140134
Behind the scenes, this will run the usual ``python -m manage test`` management
141135
command with a preset list of apps that we want to test. We
142-
collect test coverage data as part of that tox run, to show the result
136+
collect test coverage data as part of that test run, to show the result
143137
simply run::
144138

145139
python -m coverage report
@@ -239,16 +233,8 @@ minified version of it to this directory.
239233
Documentation search
240234
--------------------
241235

242-
When running ``python -m manage update_docs --update-index`` to build all
243-
documents it will also automatically index every document it builds in the
244-
search engine as well. In case you've already built the documents and would like
245-
to reindex the search index, run the command::
246-
247-
python -m manage update_index
248-
249-
This is also the right command to run when you work on the search feature
250-
itself. You can pass the ``-d`` option to try to drop the search index
251-
first before indexing all the documents.
236+
When running ``python -m manage update_docs`` to build all documents it will
237+
also automatically index every document it builds in the search engine as well.
252238

253239
Updating metrics from production
254240
--------------------------------
@@ -325,28 +311,25 @@ Updating translations from Transifex
325311
Anytime translations on Transifex have been updated, someone should update
326312
our translation files as follows:
327313

328-
1. Review the translations in Transifex and add to the space-delimited
329-
``LANGUAGES`` list in ``update-translations.sh``, any new languages that have
330-
reached 100% translation.
331-
332-
2. Pull the updated translation files::
314+
1. Pull the updated translation files::
333315

334316
./update-translations.sh
335317

336-
3. Use ``git diff`` to see if any translations have actually changed. If not,
318+
2. Use ``git diff`` to see if any translations have actually changed. If not,
337319
you can just revert the .po file changes and stop here.
338320

339-
4. Compile the messages::
321+
3. Compile the messages::
340322

341323
python -m manage compilemessages
342324

343-
5. Run the test suite one more time::
325+
4. Run the test suite one more time::
344326

345327
python -m manage test
346328

347-
6. Commit and push the changes to GitHub::
329+
5. Commit and push the changes to GitHub::
348330

349-
git commit -m "Updated translations" locale/*/LC_MESSAGES/*
331+
git add dashboard/locale/ docs/locale/ locale/
332+
git commit -m "Updated translations"
350333
git push
351334

352335
Running Locally with Docker
@@ -364,7 +347,6 @@ Running Locally with Docker
364347

365348
4. Run the tests::
366349

367-
docker compose run --rm web tox
368350
docker compose run --rm web python -m manage test
369351

370352
Pre-commit checks

dashboard/locale/en/LC_MESSAGES/django.po

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-03-11 20:38-0500\n"
10+
"POT-Creation-Date: 2025-09-04 10:04-0500\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -17,11 +17,53 @@ msgstr ""
1717
"Content-Transfer-Encoding: 8bit\n"
1818
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1919

20-
#: dashboard/templates/base_dashboard.html:6
20+
msgid "Instant"
21+
msgstr ""
22+
23+
msgid "Daily"
24+
msgstr ""
25+
26+
msgid "Weekly"
27+
msgstr ""
28+
29+
msgid "categories"
30+
msgstr ""
31+
32+
msgid "Jenkins instance root URL"
33+
msgstr ""
34+
35+
msgid "E.g. http://ci.djangoproject.com/"
36+
msgstr ""
37+
38+
msgid "E.g. Django Python3"
39+
msgstr ""
40+
41+
msgid "Should the metric be a value representing success ratio?"
42+
msgstr ""
43+
44+
msgid ""
45+
"E.g. if there are 50 tests of which 30 are failing the value of this metric "
46+
"will be 20 (or 40%.)"
47+
msgstr ""
48+
49+
msgid "Should the metric be a percentage value?"
50+
msgstr ""
51+
52+
msgid ""
53+
"E.g. if there are 50 tests of which 30 are failing the value of this metric "
54+
"will be 60%."
55+
msgstr ""
56+
2157
msgid "Development dashboard"
2258
msgstr ""
2359

24-
#: dashboard/templates/dashboard/index.html:22
60+
msgid "All metrics"
61+
msgstr ""
62+
2563
#, python-format
2664
msgid "Updated %(timestamp)s ago."
2765
msgstr ""
66+
67+
#, python-format
68+
msgid "Could not find metric with slug %s"
69+
msgstr ""

dashboard/locale/pt_BR/LC_MESSAGES/django.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ msgstr ""
1414
"POT-Creation-Date: 2019-03-11 20:38-0500\n"
1515
"PO-Revision-Date: 2019-02-21 14:15+0000\n"
1616
"Last-Translator: Claudio Rogerio, 2019\n"
17-
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/django/"
18-
"teams/17080/pt_BR/)\n"
17+
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/django/teams/"
18+
"17080/pt_BR/)\n"
1919
"MIME-Version: 1.0\n"
2020
"Content-Type: text/plain; charset=UTF-8\n"
2121
"Content-Transfer-Encoding: 8bit\n"

dashboard/templates/base_dashboard.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{% extends "base.html" %}
22
{% load i18n %}
3+
{% load static %}
34

45
{% block sectionid %}dashboard{% endblock %}
56

@@ -8,3 +9,9 @@
89
{% block header %}
910
<h1>Development <em>dashboard</em></h1>
1011
{% endblock %}
12+
13+
{% block javascript %}
14+
<script src="{% static "js/lib/jquery.min.js" %}"></script>
15+
<script src="{% static "js/lib/jquery.flot.min.js" %}"></script>
16+
<script src="{% static "js/dashboard/utils.js" %}"></script>
17+
{% endblock %}
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
{% extends "base_dashboard.html" %}
2-
{% load i18n %}
2+
{% load i18n static %}
33

44
{% block title %}{{ metric }} | {{ block.super }}{% endblock %}
55

66
{% block content %}
7-
<div class="dashboard-detail">
7+
<div>
88
<h2><a href="{{ metric.link }}">{{ metric }}</a></h2>
99
<div class="graph-wrapper">
1010
<div id="graph" class="graph" data-path="{% url "metric-list" host "dashboard" %}" data-metric="{{ metric.slug }}"></div>
1111
</div>
1212
<a class="link-readmore back-link" href="{% url "dashboard-index" host "dashboard" %}">{% translate "All metrics" %}</a>
1313
</div>
1414
{% endblock %}
15+
16+
{% block javascript %}
17+
{{ block.super }}
18+
19+
<script src="{% static "js/dashboard/detail.js" %}"></script>
20+
{% endblock %}

0 commit comments

Comments
 (0)