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

Refactor converting ODK XML to OSM XML #259

Merged
merged 32 commits into from
Jun 16, 2024
Merged

Refactor converting ODK XML to OSM XML #259

merged 32 commits into from
Jun 16, 2024

Conversation

rsavoye
Copy link
Collaborator

@rsavoye rsavoye commented Jun 6, 2024

The code for converting the raw ODK XML instance files to OSM has not kept up with other improvements in the conversion process. This brings odk2osm.py in sync with the other conversion utilities, while also adding support for select_multiple.

@rsavoye rsavoye added the enhancement New feature or request label Jun 6, 2024
@rsavoye rsavoye self-assigned this Jun 6, 2024
@spwoodcock
Copy link
Member

Conflicts must be resolved before merge 👍

@spwoodcock spwoodcock marked this pull request as draft June 10, 2024 19:29
@github-actions github-actions bot added the dependency Includes a dependency change label Jun 15, 2024
@rsavoye rsavoye marked this pull request as ready for review June 15, 2024 20:07
@rsavoye
Copy link
Collaborator Author

rsavoye commented Jun 15, 2024

Major refactoring. The format parsers for CSV, JSON, or XML are now in a single class, so next several files can be deleted. This reduces code duplication, and improves maintenance. Now the odk2osm.py script takes any of the 3 support formats instead of separate scripts.

Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

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

Nice! json2osm is back 😁

@@ -50,6 +49,7 @@ def __init__(
"""
self.data = data
self.filespec = filespec
self.ignore = ["today", "start", "deviceid", "nodel", "instanceID"]
Copy link
Member

Choose a reason for hiding this comment

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

Probably nodel --> model?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ODKInstance.py is about to be deleted, as now parsers.py is used instead. Also now the tags to ignore are in the xforms.yaml file.

Copy link
Collaborator Author

@rsavoye rsavoye Jun 15, 2024

Choose a reason for hiding this comment

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

well, json2osm.py is about to be deleted, now odk2osm.py handles all 3 formats from ODK.

@spwoodcock spwoodcock merged commit aeaf3e8 into main Jun 16, 2024
4 of 5 checks passed
@spwoodcock spwoodcock deleted the multi branch June 16, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Includes a dependency change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants