If you have two datasets—one using the new naming format (MKM_PremierDraft_All_Data) and the other using the old format (MKM_PremierDraft_Data)—the app always opts for the old one over the new. Essentially, if users have old datasets in their Sets folder, they won't be able to update the dataset unless they delete the old file.
This poses a problem for users who initially downloaded the dataset from the obsolete project and then transitioned to your fork. Since the Windows installer retains the same project location, those switching to your fork will still have all datasets from the old project.
Steps to reproduce this bug
Download an MH3 premier draft dataset for user group All and a date range of 2019-1-1 to 2024-6-10. This is the dataset from before day 1.
Open a stored draft log from an MH3 event.
Open the Card Compare window.
Enter the card name Ajani, Nacatl Pariah.
Click on the card row to open the tooltip window.
Confirm that the stats for the card are all zero.
Open the Sets folder and rename file MH3_PremierDraft_All_Data to MH3_PremierDraft_Data
Download an MH3 premier draft dataset for user group All and a date range of 2019-1-1 to today.
Open a stored draft log from an MH3 event.
Open the Card Compare window.
Enter the card name Ajani, Nacatl Pariah.
Click on the card row to open the tooltip window.
Confirm that the stats for the card are all still zero.
Operating System
Windows
Operating System Version
Windows 11
Run Type
Windows Executable
Python Version
No response
Debug Log Details
No log errors
Possible Solution (optional)
The retrieve_data_sources method sorts the stored datasets by end date and then writes the entries into the data_sources dictionary. Because both the new and old datasets use the same dictionary key, and the method inserts datasets by date, the oldest dataset overwrites the latest one in the dictionary.
A straightforward solution would be to check if the key already exists in the dictionary and simply ignore duplicate entries. However, this approach has a drawback: if a user attempts to download a new dataset with an end date older than that of an existing old dataset, the old dataset will be prioritized.
Alternatively, another solution involves having the app disregard datasets from the old project, forcing users to re-download any datasets they may already possess. To implement this, adjustments would be made to the retrieve_local_set_list function by removing the elif code that supports old files.
Describe the bug in detail
If you have two datasets—one using the new naming format (MKM_PremierDraft_All_Data) and the other using the old format (MKM_PremierDraft_Data)—the app always opts for the old one over the new. Essentially, if users have old datasets in their Sets folder, they won't be able to update the dataset unless they delete the old file.
This poses a problem for users who initially downloaded the dataset from the obsolete project and then transitioned to your fork. Since the Windows installer retains the same project location, those switching to your fork will still have all datasets from the old project.
Steps to reproduce this bug
All
and a date range of2019-1-1
to2024-6-10
. This is the dataset from before day 1.Card Compare
window.Ajani, Nacatl Pariah
.Sets
folder and rename fileMH3_PremierDraft_All_Data
toMH3_PremierDraft_Data
All
and a date range of2019-1-1
totoday
.Card Compare
window.Ajani, Nacatl Pariah
.Operating System
Windows
Operating System Version
Windows 11
Run Type
Windows Executable
Python Version
No response
Debug Log Details
No log errors
Possible Solution (optional)
The
retrieve_data_sources
method sorts the stored datasets by end date and then writes the entries into thedata_sources
dictionary. Because both the new and old datasets use the same dictionary key, and the method inserts datasets by date, the oldest dataset overwrites the latest one in the dictionary.A straightforward solution would be to check if the key already exists in the dictionary and simply ignore duplicate entries. However, this approach has a drawback: if a user attempts to download a new dataset with an end date older than that of an existing old dataset, the old dataset will be prioritized.
Alternatively, another solution involves having the app disregard datasets from the old project, forcing users to re-download any datasets they may already possess. To implement this, adjustments would be made to the
retrieve_local_set_list
function by removing theelif
code that supports old files.