Skip to content

Commit 48e1bc4

Browse files
authored
Remove Twitter annotations from the Bioregistry (#1474)
As a follow-up to #1088, this PR removes Twitter annotations from the Bioregistry. A final data dump with bioregistry-twitter annotations is at https://gist.github.com/cthoyt/c5d31d8f2773cb7890953dffacfdfbd4.
1 parent dcfba3b commit 48e1bc4

File tree

13 files changed

+277
-521
lines changed

13 files changed

+277
-521
lines changed

src/bioregistry/app/templates/highlights/twitter.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/bioregistry/app/templates/macros.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
{% endmacro %}
3131

3232
{% macro render_reference(reference) -%}
33-
{% if reference.startswith("https://twitter.com") %}
34-
<span class="badge badge-info">Tweet</span>
35-
{% elif reference.startswith("https://github.com/") and "issues/" in reference %}
33+
{% if reference.startswith("https://github.com/") and "issues/" in reference %}
3634
<span class="badge badge-info">GitHub Issue</span>
3735
{% elif reference.startswith("https://github.com/") and "pull" in reference %}
3836
<span class="badge badge-info">GitHub PR</span>

src/bioregistry/app/ui.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,9 @@ def json_schema() -> werkzeug.Response:
629629

630630

631631
@ui_blueprint.route("/highlights/twitter")
632-
def highlights_twitter() -> str:
633-
"""Render the twitter highlights page."""
634-
twitters = defaultdict(list)
635-
for resource in manager.registry.values():
636-
twitter = resource.get_twitter()
637-
if twitter:
638-
twitters[twitter].append(resource)
639-
return render_template("highlights/twitter.html", twitters=twitters)
632+
def highlights_twitter() -> flask.Response:
633+
"""Render a HTTP 410 Gone (forever) for twitter content, which is no longer supported."""
634+
return flask.Response("twitter content is no longer tracked", status=410)
640635

641636

642637
@ui_blueprint.route("/highlights/relations")

0 commit comments

Comments
 (0)