FluffyMaguro / SC2_Coop_Overlay

Overlay for StarCraft II Co-op showing post-game statistics
https://www.maguro.one
GNU General Public License v3.0
71 stars 15 forks source link

Reorgansing data in `FluffyChatBotDictionaries.py` #3

Closed aneroid closed 4 years ago

aneroid commented 4 years ago

Might be easier to maintain data in separate text-based files instead of large sets and dictionaries all in one big Python file.

aneroid commented 4 years ago

That just leaves UnitCompDict in the init file since that's a more complex structure - dict values are each a list of sets. I could move that out to a csv and add a loader specifically for it but it seems like more effort than it's worth, especially when you want to edit/maintain that data in its text-based format.

I'd recommend just moving it out to its own .py file and importing it (in init). Since that change is a bit iffy, I've left it out of this pull request.

Let me know if it makes sense to you to have it that way. Would take all of 5 mins to do it, and transparently so that the import in ReplayAnalysis.py remains unchanged.

thendarion commented 4 years ago

I like the idea from over here (ie. without any stakes in the matter)

though I would totally squash those commits into one

aneroid commented 4 years ago

Thanks!

I had originally done it as just 2 bulk changes. Decided to break them down per data item so that once merged, FluffyMaguro could easily revert an item if he/she/they decided that it was better left in FCBD.__init__.py. But as a bulk change, it would need to be done afterwards and manually.

As a branch, if reorg_data is merged with --no-ff (no fast forward), it keeps the main branch clean. In any case, they could still choose to merge it --squashed.

FluffyMaguro commented 4 years ago

Thank you, I'll add that.