cubingusa / compscript

MIT License
11 stars 3 forks source link

Reduce amount of logging/make it optional #54

Open viroulep opened 8 months ago

viroulep commented 8 months ago

I've started playing a bit more on real data: creating and assigning groups emits a lot of output; just providing a sample below:

Added group 7x7x7 Cube Round 1 Blue 1 from 2024-07-25T10:00:00.000+02:00 to 2024-07-25T10:35:00.000+02:00
Added group 7x7x7 Cube Round 1 Blue 2 from 2024-07-25T10:35:00.000+02:00 to 2024-07-25T11:10:00.000+02:00
Added group 7x7x7 Cube Round 1 Red 1 from 2024-07-25T10:00:00.000+02:00 to 2024-07-25T10:35:00.000+02:00
Added group 7x7x7 Cube Round 1 Red 2 from 2024-07-25T10:35:00.000+02:00 to 2024-07-25T11:10:00.000+02:00
...
3x3x3 Fewest Moves Round 1 Groups
Side 1 (368)
... followed by the table of the group

It's absolutely great to have that output, but the concatenation of everything makes it a bit hard to read. It would be awesome to be able to "opt in" or "opt out" of these outputs (ideally I'd love to select a couple of interesting outputs, but not everything).

Is there an option/parameter I missed? Would you be open to have a way to "silence" the output for some calls?

timreyn commented 8 months ago

I am open to any improvements to the output :)

When I ran scripts last year, though, I didn't do one mega script to assign all the groups -- I usually did -build groups -assign groups for event 1 -assign groups for event 2 -...

I found that easier to do incrementally, and check that every step worked as intended.

viroulep commented 8 months ago

I proceed just like you (incrementally building stuff), but I took an approach where I always CleanWCIF first (to be able to fully reconstruct the WCIF from scratch). It means I always get the output from the steps I previously tested, when I'd be interested in the last few steps.

IMO there are a couple of approaches to control the output:

Option 1 is likely too much work, option 2 looks quick and easy but maybe less nice than option 3, and option 3 looks good but I'm unsure about how much work it would be on the "dispatching" part.

Any opinion?