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
File renamed without changes.
4 changes: 4 additions & 0 deletions _data/sponsored_events.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"Africa": ["Django Girls - Koforidua", "Django Girls - Ho", "PyCon Africa", "DjangoCon Africa", "IndabaX - Botswana", "PyCon Namibia", "PyTogo", "Zero to Hero Mentorship Program - Nigeria", "PyCon Nigeria"],
"North America": ["PyTexas Foundation", "PyOhio", "PyBeach", "PyBay", "PyDay Santo Domingo (SDQ)"],
"South America": ["Ubuntu Tech - Colombia", "Django Girls - Colombia"]
},
"2026": {
"Africa": ["PyCon Namibia"],
"North America": ["PyCascades"]
}
}
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = [
"pyyaml",
]

[project.optional-dependencies]
[dependency-groups]
dev = [
"pre-commit",
"typer",
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"",
"blog",
"about.html",
"bpd-events",
"support.html",
]

Expand Down
26 changes: 1 addition & 25 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@ def __init__(self):
super().__init__()
self.title = ""
self._in_title = False
self.lang = None
self.meta_description = None
self.links = []
self.classes = []

def handle_starttag(self, tag, attrs):
attrs_dict = dict(attrs)
if tag == "html":
self.lang = attrs_dict.get("lang")
elif tag == "title":
if tag == "title":
self._in_title = True
elif tag == "meta" and attrs_dict.get("name") == "description":
self.meta_description = attrs_dict.get("content", "")
Expand Down Expand Up @@ -72,7 +69,6 @@ def built_site():
"": "index.html",
"blog": "blog/index.html",
"about.html": "about.html",
"bpd-events": "bpd-events/page.html",
"support.html": "support.html",
}

Expand All @@ -84,26 +80,6 @@ def test_destination(loaded_route: str, built_site: pathlib.Path) -> None:
assert output_file.exists(), f"Expected output file not found: {output_file}"


LANG_ROUTES = {
"/": "index.html",
"/about.html": "about.html",
"/bpd-events/": "bpd-events/page.html",
"/support.html": "support.html",
"/blog/": "blog/index.html",
}


@pytest.mark.parametrize("route, file_path", list(LANG_ROUTES.items()))
def test_headers_in_language(
built_site: pathlib.Path, route: str, file_path: str
) -> None:
"""Check that each page has lang='en' on the html element."""
parsed = parse_html(built_site / file_path)
assert (
parsed.lang == "en"
), f"Expected lang='en' on {route}, got lang='{parsed.lang}'"


@pytest.mark.parametrize(
"title, file_path",
(
Expand Down
20 changes: 10 additions & 10 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading