-
Notifications
You must be signed in to change notification settings - Fork 0
fix: rename InfoboxTableParser→InfoboxNestedTableExtractor, CollapsibleTableParser→CollapsibleCareerTableExtractor#1470
Draft
Copilot wants to merge 2 commits into
Draft
fix: rename InfoboxTableParser→InfoboxNestedTableExtractor, CollapsibleTableParser→CollapsibleCareerTableExtractor #1470Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
...sibleTableParser→CollapsibleCareerTableExtractor Agent-Logs-Url: https://github.com/bgembalczyk/F1/sessions/daa03eba-5ee3-4544-b537-0b5f15773e6c Co-authored-by: bgembalczyk <101186475+bgembalczyk@users.noreply.github.com>
Copilot
AI
changed the title
(削除) [WIP] Plan and create parser class hierarchy (削除ここまで)
(追記) fix: rename InfoboxTableParser→InfoboxNestedTableExtractor, CollapsibleTableParser→CollapsibleCareerTableExtractor (追記ここまで)
Apr 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Dwie klasy w
scrapers/parsers/infobox/miały sufiks*TableParser, lecz nie implementowały kontraktu parsera (parse()+ dziedziczenie poWikiTableBaseParser/WikiTableHtmlParser). Były to helpery ekstrakcji danych z zagnieżdżonych tabel infoboksa — nie parsery HTML w sensie hierarchii warstw.Opis zmiany
Klasy pełniące rolę ekstraktorów danych nazwano zgodnie z ich faktyczną odpowiedzialnością:
InfoboxTableParser→InfoboxNestedTableExtractor(scrapers/parsers/infobox/table.py)CollapsibleTableParser→CollapsibleCareerTableExtractor(scrapers/parsers/infobox/collapsible_table.py)Przy okazji naprawiono dwa istniejące błędy:
test_collapsible_table.py(wskazywał na nieistniejący modułscrapers.drivers.drivers_infobox.parsers.collapsible_table)NumericExtractorwcollapsible_table.py(scrapers.parsers.infobox.numeric_extractor→scrapers.parsers.numeric_extractor)SRP impact
Nazwy klas teraz precyzyjnie opisują ich odpowiedzialność: ekstrakcja danych z konkretnych podtabel infoboksa, nie parsowanie ogólnych elementów HTML. Klasy nie muszą implementować kontraktu
TableParser— i nie udają że go implementują.DRY impact
Bez zmian.
Contracts changed
InfoboxTableParseriCollapsibleTableParserusunięte z przestrzeni publicznej (__all__). Zastąpione przezInfoboxNestedTableExtractoriCollapsibleCareerTableExtractor. Brak zewnętrznych konsumentów pozadriver_cell.py.Backward compatibility
Zmiana łamie kompatybilność dla każdego kodu importującego stare nazwy klas. Wewnątrz repozytorium wszystkie miejsca użycia zaktualizowane. Stare nazwy usunięte bez aliasów — celowo, były błędne semantycznie.
DoD
test_parser_naming_inheritance_contractprzechodzi (4 naruszenia → 0)test_collapsible_table_parser_*przechodzi (wcześniej ImportError)Checklista techniczna (obowiązkowa)
docs/DOMAIN_GLOSSARY.md)Checklist (quality gate)
Any: potwierdzone przez gateStrict typing regression gate (mypy)(scripts/ci/mypy_regression_gate.py).Architecture tests+import-linter.jscpd+pylint duplicate-code(Static quality gates).pylint(too-many-branches,too-many-statements,too-many-lines).scripts/ci/enforce_diff_quality_guards.py.scripts/ci/enforce_diff_quality_guards.py.except Exceptionma adnotacjęjustified-exception:.scripts/ci/validate_pr_template.py).DOMAIN_GLOSSARY.mdoraz gatescripts/ci/check_terminology_consistency.py.Architecture impact
scrapers/base/: nie dotyczyscrapers/parsers/infobox/— wewnętrzne helpery infoboksa kierowcyRefactor included
scrapers/parsers/infobox/table.py,scrapers/parsers/infobox/collapsible_table.py,scrapers/parsers/infobox/driver_cell.pyCode review evidence (wymagane)
Original prompt