Skip to content

Commit

Permalink
[FIX] Adjust documentation from #115 and #119 (#120)
Browse files Browse the repository at this point in the history
* replace occurences of old values to wahoo_mc

- "common_"...
- "wahoo_maps_creator"

* adjust docs to the user directory
  • Loading branch information
treee111 authored May 7, 2022
1 parent 0dd582b commit 32f7235
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
16 changes: 11 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Release](#release)
- [Automatic CHANGELOG creation](#automatic-changelog-creation)
- [Structure of the repository](#structure-of-the-repository)
- [User directory](#user-directory)
- [Anaconda environment](#anaconda-environment)

## How to Contribute
Expand Down Expand Up @@ -77,11 +78,16 @@ git-chglog -o CHANGELOG.md --next-tag v0.10.0
There is one python coding base for both Windows and for macOS.
Differences between the different OS are the used programs.
The folders in the repo have the following purposes:
- common_download - all downloaded files are saved and extracted here
- common_python - custom python files
- common_resources - config, json files
- tooling - programs, scripts used by Windows and macOS
- tooling_win - programs, scripts for Windows
- `wahoo_mc` - custom python files
- `wahoo_mc/resources` - config, json files
- `wahoo_mc/tooling_win` - programs, scripts for Windows
- `tooling` - programs, scripts used by Windows and macOS to test and check the generated maps

## User directory
Files which are processed through the tool are stored in the user directory to be release-independent. The name of the directory is: `$user_directory/wahooMapsCreatorData` and has the follwing folders:
- root - generated files are saved here
- `_download` - all downloaded files are saved and extracted here
- `_tiles` - intermediate files per tile are stored here

## Anaconda environment
- /conda_env/gdal-user.yml is for creating Anaconda environment for users
Expand Down
10 changes: 6 additions & 4 deletions docs/COPY_TO_WAHOO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#### Table of contents <!-- omit in toc -->
- [Steps to carry out](#steps-to-carry-out)
- [Unzip Files](#unzip-files)
- [Location of the generated maps](#location-of-the-generated-maps)
- [Install adb](#install-adb)
- [Authorize Wahoo device](#authorize-wahoo-device)
- [Copy map files](#copy-map-files)
Expand All @@ -12,8 +12,10 @@
- [Troubleshooting](#troubleshooting)

# Steps to carry out
## Unzip Files
unzip the desired country files
## Location of the generated maps
The generated maps are saved in the user directory in folder: `$user_directory/wahooMapsCreatorData`.

There is a folder per country or for the X/Y combination with the relevant tiles.

## Install adb
You can download the lates adb-tools (included in the SDK Platform Tools) for your OS here:
Expand All @@ -38,7 +40,7 @@ adb devices
```

## Copy map files
copy the unzipped map folders to \ELEMNT-BOLT\USB storage\maps\tiles\8\
copy map folders per tile to \ELEMNT-BOLT\USB storage\maps\tiles\8\

These tools can be helpful if you want to copy the files with a GUI and not via CLI:
- Windows: https://github.com/hexadezi/adbGUI
Expand Down
2 changes: 1 addition & 1 deletion tests/test_osm_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def calculate_path_to_static_tile_json(self, country, exp_path):

def test_go_through_folders(self):
"""
go through all files in the common_resources/json directory
go through all files in the wahoo_mc/resources/json directory
- check if correct .json will be evaluated through get_path_to_static_tile_json function
"""
for folder in fd_fct.get_folders_in_folder(os.path.join(fd_fct.RESOURCES_DIR, 'json')):
Expand Down
8 changes: 4 additions & 4 deletions wahoo_mc/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ def process_call_of_the_tool():
# Save uncompressed maps for Cruiser if True
options_args.add_argument('-c', '--cruiser', action='store_true',
help="save uncompressed maps for Cruiser")
# specify the file with tags to keep in the output // file needs to be in common_resources
# specify the file with tags to keep in the output // file needs to be in wahoo_mc/resources/tag_wahoo_adjusted
options_args.add_argument('-tag', '--tag_wahoo_xml', default=InputData().tag_wahoo_xml,
help="file with tags to keep in the output")
# specify the file with tags to keep in the output // file needs to be in common_resources
# only merge - used for special usecases
options_args.add_argument('-om', '--only_merge', action='store_true',
help="only merge, do no other processing")
# option to keep the /output/country/ and /output/country-maps folders in the output
Expand All @@ -93,7 +93,7 @@ def process_call_of_the_tool():
if args.subparser_name == 'gui':
# Prevents the initialisation of the graphical GUI on WSL.
if 'microsoft' in uname().release:
sys.exit("GUI can not be startet because no graphical interface is available. Start with 'wahoo_maps_creator.py cli -h' or 'wahoo_maps_creator.py -h' to see command line options.")
sys.exit("GUI can not be startet because no graphical interface is available. Start with 'python -m wahoo_mc cli -h' or 'python -m wahoo_mc -h' to see command line options.")

o_input_data = GuiInput().start_gui()
return o_input_data
Expand Down Expand Up @@ -161,7 +161,7 @@ def __init__(self):

# Way of calculating the relevant tiles for given input (country)
# True - Use geofabrik index-v1.json file
# False - Use .json files from folder /common_resources/json
# False - Use .json files from folder wahoo_mc/resources/json
self.geofabrik_tiles = False

self.zip_folder = False
Expand Down

0 comments on commit 32f7235

Please sign in to comment.