Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def branches_from_devguide(devguide_dir: Path) -> list[str]:

def get_completion(
clones_dir: str, repo: str
) -> tuple[float, 'TranslatorsData', str, float]:
) -> tuple[float, 'TranslatorsData', str | None, float]:
clone_path = Path(clones_dir, repo)
for branch in branches_from_devguide(Path(clones_dir, 'devguide')) + [
'master',
Expand Down
8 changes: 7 additions & 1 deletion metadata.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
</head>
<body>
<h1>Python Docs Translation Dashboard</h1>
<nav><p><a href="index.html" target="_self">main</a> | meta</p></nav>
<nav class="switchpages">
<a href="index.html" target="_self">main</a> | meta
</nav>
<table>
<thead>
<tr>
<th>language</th>
<th>branch</th>
<th>build warnings*</th>
<th>lint failures</th>
<th>30 days change</th>
</tr>
</thead>
<tbody>
Expand All @@ -28,6 +31,9 @@
<td data-label="lint">
{% if project.completion %}<a href="warnings-lint-{{ project.language.code }}.txt">{{ metadata[1] }}</a>{% else %}{{ metadata[1] }}{% endif %}
</td>
<td data-label="change">
+{{ "{:.2f}".format(project.change) }}%
</td>
</tr>
{% endfor %}
</tbody>
Expand Down
12 changes: 12 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ td[data-label="completion"] {
width: 100%;
line-height: 0;
}
.switchpages{
position:absolute;
top:10px;
right: 10px;
}

@media screen and (max-width: 675px) {
.switchpages{
all: unset;
}
}

@media screen and (max-width: 600px) {
table, thead, tbody, th, td, tr {
display: block;
Expand Down
4 changes: 3 additions & 1 deletion template.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
</head>
<body>
<h1>Python Docs Translation Dashboard</h1>
<nav><p>main | <a href="metadata.html" target="_self">meta</a></p></nav>
<nav class="switchpages">
main | <a href="metadata.html" target="_self">meta</a>
</nav>
<table>
<thead>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_number_of_visitors(language: str, http: PoolManager) -> int:
response = http.request(
'GET',
f'https://plausible.io/docs.python.org/export?{params}',
retries=Retry(status_forcelist=(500,502)),
retries=Retry(status_forcelist=(500, 502)),
)
info(f'visitors {response.status=} ({language=})')
with (
Expand Down
Loading