Rename difficulty field to point_class#83
Conversation
This aligns more with how we expect this to be used for configuring points and not as an expectation of challenge difficulty. Signed-off-by: Robert Detjens <github@detjens.dev>
This matches the challenge difficulty --> point_class rename in the previous commit. Signed-off-by: Robert Detjens <github@detjens.dev>
Signed-off-by: Robert Detjens <github@detjens.dev>
This will make it very obvious during validate if there are any misspelled or unmigrated configuration options. Signed-off-by: Robert Detjens <github@detjens.dev>
Kajmany
left a comment
There was a problem hiding this comment.
I think this is pretty uncontroversial, so long as the default-filling is meant to be TODO (or I missed it?)
| bail!("failed to validate challenges"); | ||
| } | ||
| }; | ||
| // double check specific things about challenges |
There was a problem hiding this comment.
One day I still think it'd be worth it to complicate the parsing process or the global once lock init in order to have safe-er structs for use later. That day should not be today, though. The validate call before every other command seems to cover our bases.
| } | ||
|
|
||
| #[test] | ||
| /// Challenges can omit point_class to use the default at deploy |
There was a problem hiding this comment.
Just to be sure: this a known TODO with front-end and etc? I checked field references and couldn't find any paths that do this.
There was a problem hiding this comment.
Yes, this default fill-in is currently added in the new frontend deploy POST in #81 and will need to be updated to use the new field once either that or this PR gets merged. There's not really a good way to fill in the default here via a Default trait or serde default function, since the default comes from a value set in the repo config.
Resolves #71.
This has a dependency on #81 to update how it fetches the info for frontend, whichever is merged later will have to be updated.