PBN import: rozdzielenie pobierania od przetwarzania#347
Open
mpasternak wants to merge 23 commits into
Open
Conversation
Projekt rozbicia kroków importu PBN na niezależne fazy download/process (6 krokow rozdzielanych + nowa integracja konferencji), z dwukolumnowym formularzem, zgodnoscia wsteczna configu i miekkim ostrzezeniem przy pustym lustrze. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…etwarzania 15 taskow TDD: fazy w ImportStepBase, integruj_konferencje, split 6 importerow, model faz w step_definitions + resolver zgodnosci wstecznej, ImportManager per faza, CLI granular+legacy, presety, dwukolumnowy formularz. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- integruj_konferencje: value_or_none zamiast value() (sentinel '[brak k]'),
savepoint + except IntegrityError, filter().first() (nie get()).
- Task 7: test ustawia default_jednostka, process() guard na nazwa.
- Task 9: nota bloku migracji kontraktu (9-13 przejsciowo czerwone),
przepisane 4 zlamane testy step_definitions (16 faz), policzona licznosc.
- Task 12: reverse('pbn_import:presets'); presety wylacznie granularne.
- Spec: results -> jedyny konsument _display_results.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ethod) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Konferencja Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tal, komentarze Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ed (spójność) + napraw wrapper test po splicie Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Zastąp monolityczne run() dwoma metodami: - download(): pobieranie v1+v2 z PBN do lustra - process(): import z lustra do BPP (opcjonalnie z kasowaniem) Zaktualizuj test_publication_import.py — stare testy run() zastąpiono odpowiednikami dla download()/process(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cess() Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…stecznej Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…result_key Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…zanie) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…pól (odporność importu) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Cel
Rozbicie kroków importu PBN (
src/pbn_import) na dwie niezależnie uruchamiane fazy: pobieranie (PBN → tabele-lustrapbn_api.*) i przetwarzanie/integracja (lustro → modelebpp.*). Można teraz uruchomić samo pobieranie, samo przetwarzanie albo oba — niezależnie per encja.Co się zmienia
ImportStepBase: nowe metodydownload()/process(),run()= obie po kolei,__call__(method=…)z walidacją.process()ostrzega miękko przy pustym lustrze i kontynuuje.integruj_konferencje()— wcześniej konferencje były tylko pobierane do lustra, nigdy nie trafiały dobpp.Konferencja. Idempotentna (popbn_uid, potem(nazwa, rozpoczecie)), odporna (value_or_none, savepoint+IntegrityError, przycinanie zbyt długich pól).step_definitions.py+ resolver zgodności wstecznej: stary kluczdisable_<encja>wyłącza obie fazy; nowe klucze granularne (disable_<encja>_download/_process) nadpisują. Bez migracji DB (JSONField).ImportManagerwykonuje fazy per-metoda,resultskluczowane poresult_key(encja:faza).--disable-<encja>-<faza>+ legacy aliasy--disable-<encja>(obie fazy).**all_disableddawałyby zły wynik przez resolver).Kroki niepodzielne świadomie zostają bez zmian:
initial_setup/institution_setup(setup),fee_import(pobiera i zapisuje w jednej pętli — nierozdzielalne),source_scoring_import(process-only na cache).Zgodność wsteczna
Stare sesje, presety i skrypty CLI (
disable_zrodlaitd.) działają bez zmian — resolver tłumaczy legacy na obie fazy. Brak migracji bazy.Dokumentacja
docs/superpowers/specs/2026-06-07-pbn-import-rozdzielenie-pobierania-od-przetwarzania-design.mddocs/superpowers/plans/2026-06-07-pbn-import-rozdziel-pobieranie.mdTesty
src/pbn_import/+src/pbn_integrator/lokalnie.integruj_konferencje, model faz, manager per faza, CLI granular/legacy, presety granularne.Plan testów (do weryfikacji)
Build test-runner image+Tests (sharded)zieloneJournalpełne,Zrodlonietknięte; potem tylko „Przetwarzanie" → źródła w BPP--disable-zrodlanadal pomija oba podkroki🤖 Generated with Claude Code