-
Notifications
You must be signed in to change notification settings - Fork 0
Ujednolicenie interfejsu usług domain_record — execute + DTO + wspólny wynik#1366
Open
bgembalczyk wants to merge 1 commit into
Open
Ujednolicenie interfejsu usług domain_record — execute + DTO + wspólny wynik #1366bgembalczyk wants to merge 1 commit into
domain_record — execute + DTO + wspólny wynik #1366bgembalczyk wants to merge 1 commit into
Conversation
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.
Motivation
scrapers/services/domain_record/tak, by różne domeny miały spójną metodę wywołania i jednoznaczne wejście/wyjście.Description
DomainRecordResultwscrapers/services/domain_record/_shared.pyi zexportowałem typy wscrapers/services/domain_record/__init__.py.ConstructorDomainRecordInput,DriverDomainRecordInput,CircuitDomainRecordInput,SeasonDomainRecordInput) i zastąpiłem dotychczasowe publiczne metody jedną metodąexecute(...)zwracającąDomainRecordResult._extract_tables,_collect_lap_record_rows,_build_payload) i przeniosłem odpowiedzialność za składanie pełnego payloadu do serwisów domenowych.SingleConstructorScraper,SingleDriverScraper,F1SingleCircuitScraper,SingleSeasonScraper) aby przekazywali odpowiednie DTO doexecutei używaliresult.record, oraz uprościłem/modyfikowałem miejsce budowy payloadów tabel tam, gdzie logika przeniesiona została do serwisów.Testing
pytest -q tests/scrapers/circuits/test_domain_record.py tests/test_single_scraper_components_and_orchestration.pyi kolekcja zakończyła się błędem z powodu brakującego modułuscrapers.wiki(import error), więc testy nie wykonały się dalej.python -m compileall ...dla zmienionych modułów i kompilacja zakończyła się pomyślnie.tests/scrapers/circuits/test_domain_record.pydo nowego kontraktuexecute + CircuitDomainRecordInput + DomainRecordResult.Codex Task