This is an enhanced iteration of the functionality added in #103 - I decided to take this in a bit of a different direction to that PR's implementation (though I looked to it for inspiration).
Key functionality:
The XML file select now allows selecting multiple files rather than one
XML files can be arbitrarily large
There will probably be a frontend PR which removes the 612 card limit - problem for another day
The blocker here is slow performance with massive projects
Selected XML files are aggregated and then split back out
We identify projects which can be aggregated by their specified stock & finish settings
For example, consider a 400 card nonfoil S30 XML and a 300 card nonfoil S30 XML - the tool would aggregate these into a single 700 card nonfoil S30 project
The tool will then split these projects back up such that each of them fit with the max project size of 612 cards, in one of two ways:
Naively splitting every 612 cards, or
Asking the user to type in their desired splits
This captures the case where the user happens to know it's cheaper to split up the cards differently to the naive approach
The tool will then run in a loop on each aggregated-then-split-back-out project
The user specifies whether to continue editing an existing order or create a new one per-aggregated project
Checklist
[x] I have installed pre-commit and installed the hooks with pre-commit install before creating any commits.
[x] I have updated any related tests for code I modified or added new tests where appropriate.
[x] Thorough manual testing
[ ] I have updated any relevant documentation or created new documentation where appropriate.
On the todo list - unfortunately, github wikis are (kind of?) sub-repositories so I can't update the docs in this PR
Description
Checklist
pre-commit
and installed the hooks withpre-commit install
before creating any commits.