-
Notifications
You must be signed in to change notification settings - Fork 30
Assorted improvements #289
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
Open
dhewg
wants to merge
17
commits into
treee111:develop
Choose a base branch
from
dhewg:app
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
9467c2d to
b0ad963
Compare
Author
|
The old pylint version didn't work on my end, so I updated that. With that, every commit now passes the pylint checks. |
Remove the now redundant controls, found with: pylint --enable=useless-suppression
is_required_input_given_or_exit() already checks that either country or x/y is set, make pylint happy with a simple "else". Fixes: wahoomc/main.py:76:8: E0606: Possibly using variable 'o_osm_data' before assignment (possibly-used-before-assignment)
This makes it work everywhere, no matter if it's `python` or `python3`.
This actually happened, in which case everything falls apart.
Visible when using --verbose.
Pass on which tool to use, osmfilter or osmium. This makes it easier to switch to the other tool, as all are available on all platforms.
It wasn't used consistently anyway.
No need for "else" if an error case sys.exit()s.
Don't just look in the user config directory and the bundled resources/ folder, allow passing any filename to --tag_wahoo_xml. Order of preference: - filesystem, either relative or absolute - relative to the user config directory - relative to the bundled resources directory
Use the same logic as with --tag_wahoo_xml
And test that instead. There's no need to adapt the test everytime the file gets changed.
The functionality is already tested with real files, there's no need to bend over backwards and hack around with mock, which doesn't work in its current state anyway.
Use the same logic as with --tag_wahoo_xml
This enables wildcard values like %f and %s. The current ones in tag-wahoo-poi.xml were ignored unit now, so remove them to keep the results unchanged.
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…
...is just a bunch of smaller things I noticed while starting with this nice tool.
The commits are small and easy to review (I hope).
Some of it is mostly internal stuff, the nice user-facing change is that
-tag_wahoo_xmlnow accepts random filenames, and not just relative ones to the internalresourcesdirectory.Similar, there's now
--tags_to_keepand--tag_transformwith the exact same logic.As most major themes will touch all three of the mentioned files, it's now possible to have multiple themes, each with their own configuration files, next to each other and build them without messing around in the pip install or user config directories.
Caveats
I didn't touch the unittests nor the gui.
The former will have to be adapted if these changes are accepted.
The latter should still work, but could be extended to handle the new command line switches.
Pull Request Checklist