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

[FEAT] Read tag-wahoo.xml and tags-to-keep.json from user directory first (from python module as fallback) #170

Merged
merged 12 commits into from
Nov 13, 2022

Conversation

treee111
Copy link
Owner

@treee111 treee111 commented Nov 13, 2022

This PR…

  • reads tag-wahoo.xml (or with another name, see argument -tag) and tags-to-keep.json from user directory if they exist, if not read from python module
  • introduces a function to access config files from user directory wahooMapsCreatorData/_config therefore
  • introduces a new cli call python -m wahoomc.init for initialization of the user directory. Files from python module are copied to user directory and you are asked for overwriting if they aready exist
  • updates documentation accordingly

Considerations and implementations

Lately a lot of people played around with tags-to-keep and tag-wahoo .xml files.
To do that one had to 1. clone/download the repo or 2. make changes in the python module installation controlled by PyPI.
The advice is now more than ever to install via PyPI and put user specific files in the unser directory of wahooMapsCreator!

How to test

  1. initialize via wahoomc.init
  2. run for your country or X/Y
  3. adjust a file in the user directory
  4. run again, check if the change is visible in logging or the generated maps

Pull Request Checklist

@treee111 treee111 added the enhancement New feature or request label Nov 13, 2022
@treee111 treee111 marked this pull request as ready for review November 13, 2022 23:14
- incl. changing unittests to not mock variables but files and cleaning up the file
for unittesting it makes not sense to read the user-dir. The result would not be equal in all cases
they are coming from #38
and #34
but might most probably not be used actually.
With this PR, users can have their own tag-wahoo .xml file in the user-directory
- initialization needed for windows tooling. Needs to be before check of required programs
- incl. usage of constant for user config directory
- incl. creation of user config directory on start
@treee111 treee111 mentioned this pull request Nov 13, 2022
5 tasks
@treee111 treee111 merged commit fd23b8a into develop Nov 13, 2022
@treee111 treee111 deleted the config-from-user-dir branch November 13, 2022 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant