Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme for v1 / v2 migration #17

Merged
merged 1 commit into from
May 2, 2024
Merged

readme for v1 / v2 migration #17

merged 1 commit into from
May 2, 2024

Conversation

the-infinity
Copy link
Contributor

Adds a description how to migrate v1 / v2 converter.

@the-infinity the-infinity requested a review from hbruch April 17, 2024 11:50

If you want to migrate a v1 or v2 converter, you can re-use some of the code. There is a paradigm change, though: `parkapi-source-v3`
enforces a strict validation after transforming the data, while v1 and v2 converters don't. ParkAPI v1 / v2 converters are always pull
converters, so the base class is always `PullConverter`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coming from v1/v2, I wouldn't know what sets v3's PullConverter apart from other mechanisms that v3 offers. You could mention them briefly here.

enforces a strict validation after transforming the data, while v1 and v2 converters don't. ParkAPI v1 / v2 converters are always pull
converters, so the base class is always `PullConverter`.

Instead of defining `POOL`, you will set `source_info` at the same place. Attributes are almost the same, except for `id` was renamed to

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this "same place"? As an instance field on the converter class?


Afterwards, you can put the GeoJSON file to `/data`.

Please keep in mind that you will have to add tests for the migrated scraper.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could reference an example of a migrated scraper, it's v2 version, the migrated v3 version and it's test.

@the-infinity the-infinity merged commit 08e4121 into main May 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants