Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 6 additions & 0 deletions 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>
<div class="switchpages">
<nav><p><a href="index.html" target="_self">main</a> | meta</p></nav>
</div>
<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
8 changes: 8 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ td[data-label="completion"] {
width: 100%;
line-height: 0;
}
.switchpages{
position:absolute;
top:10px;
right: 10px;
}
@media screen and (max-width: 600px) {
table, thead, tbody, th, td, tr {
display: block;
Expand Down Expand Up @@ -77,4 +82,7 @@ td[data-label="completion"] {
min-width: 0;
width: 100% !important;
}
.switchpages{
all: unset;
}
}
2 changes: 2 additions & 0 deletions 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>
<div class="switchpages">
<nav><p>main | <a href="metadata.html" target="_self">meta</a></p></nav>
</div>
<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