8000 Remove visitors tracking by m-aciek · Pull Request #69 · python-docs-translations/dashboard · GitHub
[go: up one dir, main page]

Skip to content

Remove visitors tracking #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2025
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
6 changes: 0 additions & 6 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# "gitpython",
# "potodo",
# "jinja2",
# "requests",
# "docutils",
# ]
# ///
Expand All @@ -25,7 +24,6 @@

import contribute
import build_status
from visitors import get_number_of_visitors
from completion import branches_from_devguide, get_completion, TranslatorsData
from repositories import get_languages_and_repos, Language

Expand Down Expand Up @@ -70,12 +68,10 @@ def get_project_data(
built = language.code in languages_built
if repo:
completion, translators_data, branch, change = get_completion(clones_dir, repo)
visitors_num = get_number_of_visitors(language.code, http) if built else 0
else:
completion = 0.0
translators_data = TranslatorsData(0, False)
change = 0.0
visitors_num = 0
branch = None
return LanguageProjectData(
language,
Expand All @@ -84,7 +80,6 @@ def get_project_data(
completion,
change,
translators_data,
visitors_num,
built,
in_switcher=languages_built.get(language.code),
uses_platform=language.code in contribute.pulling_from_transifex,
Expand All @@ -100,7 +95,6 @@ class LanguageProjectData:
completion: float
change: float
translators: TranslatorsData
visitors: int
built: bool
in_switcher: bool | None
uses_platform: bool
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ th {
.progress-bar.low + .progress-bar-outer-label {
display: inline-block;
}
td[data-label="visitors"], td[data-label="translators"] {
td[data-label="translators"] {
text-align: right;
}
td[data-label="completion"] {
Expand Down
11 changes: 0 additions & 11 deletions template.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<tr>
<th>language</th>
<th>switcher</th>
<th>visitors*</th>
<th>translators</th>
<th>completion</th>
</tr>
Expand All @@ -30,15 +29,6 @@
<a href="https://docs.python.org/{{ project.language.code }}/" target="_blank">✗</a>
{% endif %}
</td>
<td data-label="visitors">
{% if project.built %}
<a href="https://plausible.io/docs.python.org?filters=((contains,page,(/{{ project.language.code }}/)))" target="_blank">
{{ '{:,}'.format(project.visitors) }}
</a>
{% else %}
{{ '{:,}'.format(project.visitors) }}
{% endif %}
</td>
<td data-label="translators">
{% if project.translators.link %}<a href="{{ project.translators.link }}" target="_blank">{% endif %}
{{ project.translators.number }}
Expand All @@ -52,7 +42,6 @@
{% endfor %}
</tbody>
</table>
<p>* sum of <a href="https://plausible.io/data-policy#how-we-count-unique-users-without-cookies" target="_blank">daily unique visitors</a> since 8 June 2024</p>
<p>For more information about translations, see the <a href="https://devguide.python.org/documentation/translating/" target="_blank">Python Developer’s Guide</a>.</p>
<p>Last updated at {{ generation_time.strftime('%A, %-d %B %Y, %-H:%M:%S %Z') }} (in {{ duration // 60 }}:{{ "{:02}".format(duration % 60) }} minutes).</p>
</body>
Expand Down
29 changes: 0 additions & 29 deletions visitors.py

This file was deleted.

Loading
0