maykinmedia / open-klant

Registratiecomponent voor de opslag en ontsluiting van klantgegevens volgens de Klantinteracties API-specificatie.
Other
2 stars 3 forks source link

[#197] Klanten API migration command #263

Open SonnyBA opened 1 month ago

SonnyBA commented 1 month ago

Fixes #197

Changes

Adds a management command which allows the migration of the previous Klanten API to the Klantinteracties API. Two running instances (Klanten and Klantinteracties API) are required to do so with an API token for the Klanten API.

stevenbal commented 1 month ago

Looks good overall, I think it might also be good to add some basic documentation on how to use this command to the docs

stevenbal commented 2 weeks ago

@SonnyBA I haven't worked on this yet, since I've spent most of my time on zgw consumers upgrade for Open Zaak. Could you pick up the feedback for this PR?

joeribekker commented 2 weeks ago

Refinement: Waiting for @SonnyBA to get better. If not this week, @annashamray will pick it up.

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 93.43066% with 36 lines in your changes missing coverage. Please review.

Project coverage is 96.72%. Comparing base (a8d5aa1) to head (423ed1a). Report is 63 commits behind head on master.

Files with missing lines Patch % Lines
src/openklant/migration/v1/data.py 90.43% 11 Missing :warning:
src/openklant/management/commands/migrate_to_v2.py 91.83% 8 Missing :warning:
src/openklant/migration/test_server.py 38.46% 8 Missing :warning:
src/openklant/migration/client.py 88.23% 6 Missing :warning:
src/openklant/tests/vcr.py 85.71% 2 Missing :warning:
src/openklant/migration/v2/data.py 96.87% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #263 +/- ## ========================================== - Coverage 96.89% 96.72% -0.17% ========================================== Files 146 167 +21 Lines 6444 7668 +1224 ========================================== + Hits 6244 7417 +1173 - Misses 200 251 +51 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SonnyBA commented 6 days ago

Requires https://github.com/maykinmedia/open-klant/pull/280

Edit: Since #280 was merged, this PR was rebased (see below)

SonnyBA commented 6 days ago

@stevenbal I moved code from the management command file to the migration folder inside the django project dir, this makes things more readable in my opinion (separate folders for v1/v2 definitions) instead of having everything in one file. I also moved the cassettes to the migration folder inside of the project root where there also is a fixtures directory (which is used for the docker compose setup).

alextreme commented 2 days ago

@SonnyBA please round up this PR and release a new version of Open Klant with in