-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow user selected Image save folder #88
Comments
GitMate.io thinks possibly related issues are #84 (Make chart images save in correct folder.), #67 (Make avatar images save in correct folder. ), #17 (Logic for image generation), and #33 (Take avatar images and process them). |
Remove |
Signed-off-by: David <toonarmycaptain@hotmail.com>
Prompts user for name, location for chart image, using default chart save location as initial dialogue location. Saves image in user location with user supplied name, and saves a copy in class chart_data with filename safe chart_name. Signed-off-by: David <toonarmycaptain@hotmail.com>
Signed-off-by: David <toonarmycaptain@hotmail.com>
Safe filename form of chart_name used to save chart_data_file and to save a copy of the chart image in classname/chart_data with it. Also used to supply a suggested filename to chart save dialogue. Signed-off-by: David <toonarmycaptain@hotmail.com>
Signed-off-by: David <toonarmycaptain@hotmail.com>
Rename initial_dir arg in select_folder_dialogue to start_dir for consistency with other functions. Signed-off-by: David <toonarmycaptain@hotmail.com>
Paired imports per PEP8 line length. Initial test failed on mirrored convert_to_json data: json_data_to_convert = '{\n "1": "a",\n "b": 2,\n "3": "c",\n "d": 4\n}' converted_json_data = {1: 'a', 'b': 2, 3: 'c', 'd': 4} This is because JSON does not have integer dict keys, so it converts the integer keys to strings. When loading from JSON, json.loads does not differentiate between dict keys of stings containing integers and keys of integers converted to strings when converted to JSON. Thus the test data was modified to expect strings in test of integers as dict keys: {"1": 'a', 'b': 2, "3": 'c', 'd': 4}. Added notes to file_functions.py functions convert_to_json, load_from_json, in create_chart.py to write_chart_data_to_file, and in class_functions.py to write_classlist_to_file describing this behaviour, as it will be an issue if and when chart_data_files are reloaded, since the keys in score-avatar_dicts are float values which are converted to strings when converted to JSON, and this will need to be handled. Handling will probably be as simple as original_score_avatar_dict = {float(score): avatar_list for score, avatar_list in dejsonified_score_avatar_dict.items()} Signed-off-by: David <toonarmycaptain@hotmail.com>
Signed-off-by: David <toonarmycaptain@hotmail.com>
Signed-off-by: David <toonarmycaptain@hotmail.com>
Add feature where changing default save location moves folder and contents to new setting. Signed-off-by: David <toonarmycaptain@hotmail.com>
Signed-off-by: David <toonarmycaptain@hotmail.com>
Complete: Issue appeared with JSON: Initial test failed on mirrored convert_to_json data:
This is because JSON does not have integer dict keys, so it converts the So test runs as:
Added notes to file_functions.py functions convert_to_json, Handling will probably be as simple as |
DataFolder
and references since it will not be used.The text was updated successfully, but these errors were encountered: