TanklesXL / gladvent

A Gleam framework for running Advent of Code solutions
https://hex.pm/packages/gladvent
Apache License 2.0
27 stars 1 forks source link

✨ Feat: add ability to use example files #12

Closed bucsi closed 1 month ago

bucsi commented 2 months ago

My puzzle workflow is usually the following:

  1. understand the task
  2. write a solution
  3. run the solution with the example input in the task
  4. debug the solution
  5. run the solution for my puzzle input
  6. write solution for the 2nd part
  7. repeat 3-5.

With gladvent, steps 5 and 7 always involve deleting my puzzle input from the input file, then copying it back.

With this PR:

If I missed anything, please reach out and I'll gladly update my PR.

TanklesXL commented 2 months ago

Thanks for the contribution! I haven't looked at the code yet but upon reading the description I wonder if it's worth putting the example generation behind a flag.

I would probably replace the --use-example group flag from the run group with a group flag of --example at the root so it can be used for both generation via new and running via run and run all.

TanklesXL commented 1 month ago

Thanks a bunch! merged