-
Notifications
You must be signed in to change notification settings - Fork 27
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
[FEAT] Refactor a lot to decouple and make maintenance easier (focus osm_maps_functions.py) #152
Merged
Conversation
This file contains 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
- and not by importing the whole file "as" fd_fct
- move to function process_input_of_the_tool - move corresponding stuff from check_and_download_files also - additional needed changes - mainiy in downloader.py - adjust tests & do nearly refactoring
treee111
changed the title
[FEAT] Refactor osm_maps_functions.py and more to decouple and make maintenance easier
[FEAT] Refactor a lot to decouple and make maintenance easier (focus osm_maps_functions.py)
Sep 29, 2022
treee111
added a commit
that referenced
this pull request
Sep 30, 2022
…osm_maps_functions.py) (#152) * import file_directory functions one by one - and not by importing the whole file "as" fd_fct * create OsmData object and insert into class OsmMaps * move check for -co and -xy to input.py * shuffle a lot * go throught calc_border_countries also when no border countries are wanted * break OsmData in small pieces * refactor border country calc + fix unittests * force_processing refactoring, all checks in OsmData now! - move to function process_input_of_the_tool - move corresponding stuff from check_and_download_files also - additional needed changes - mainiy in downloader.py - adjust tests & do nearly refactoring * import needed functions + pylint findings * refactor imports to "single import" and not the whole file * fix pylint finding * Bump to version v2.1.0a13 * Revert "Bump to version v2.1.0a13" This reverts commit 39d65b22689eea3f358d381ce05da2f641b5ebb6.
treee111
added a commit
that referenced
this pull request
Sep 30, 2022
…osm_maps_functions.py) (#152) * import file_directory functions one by one - and not by importing the whole file "as" fd_fct * create OsmData object and insert into class OsmMaps * move check for -co and -xy to input.py * shuffle a lot * go throught calc_border_countries also when no border countries are wanted * break OsmData in small pieces * refactor border country calc + fix unittests * force_processing refactoring, all checks in OsmData now! - move to function process_input_of_the_tool - move corresponding stuff from check_and_download_files also - additional needed changes - mainiy in downloader.py - adjust tests & do nearly refactoring * import needed functions + pylint findings * refactor imports to "single import" and not the whole file * fix pylint finding * Bump to version v2.1.0a13
treee111
added a commit
that referenced
this pull request
Oct 3, 2022
…t `-fp` - speeds up playing with tags (#150) * [FEAT] Refactor a lot to decouple and make maintenance easier (focus osm_maps_functions.py) (#152) * import file_directory functions one by one - and not by importing the whole file "as" fd_fct * create OsmData object and insert into class OsmMaps * move check for -co and -xy to input.py * shuffle a lot * go throught calc_border_countries also when no border countries are wanted * break OsmData in small pieces * refactor border country calc + fix unittests * force_processing refactoring, all checks in OsmData now! - move to function process_input_of_the_tool - move corresponding stuff from check_and_download_files also - additional needed changes - mainiy in downloader.py - adjust tests & do nearly refactoring * import needed functions + pylint findings * refactor imports to "single import" and not the whole file * fix pylint finding * Bump to version v2.1.0a13 * Update osm_maps_functions.py According to the documentation https://wiki.openstreetmap.org/wiki/Osmfilter#Keep_only_specific_Tags tags have to be enclosed with >"< * Update osm_maps_functions.py Keep out_file_o5m if not force_processing to speed up build process when updating filtering tags / tag-mapping / tag-transform * finalization of @zenziwerken 's work pylint finding, comment * catch error if file does not exist but should be deleted e.g. if processing -fp after switching from v2.0.2 to this version (Windows only) * adjust constants processing based on discussion in PR #150 (comment) * adjust tag-wahoo.xml processing based on discussion in PR #150 (comment) * adjust splitting to tiles processing based on discussion in PR #150 (comment) * adjust merging with land and sea processing based on discussion in PR #150 (comment) * fix pylint finding * harmonize comments * Bump to version v2.1.0a14 * Revert to version v2.0.2 Co-authored-by: Daniel Groß <[email protected]> BREAKING CHANGE: Coding that can be influenced by user-input is now processed without giving `-fp` and coding that can not be influenced is only re-procecced when issuing `-fp`. That speeds up playing with tags.
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.
This PR…
Considerations and implementations
A lot of lines change with this PR, the unittests rise from 45 to 47.
In the long run this is a useful refactoring which makes understanding easier.
How to test
Pull Request Checklist