Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP for issue #82 #83

Merged
merged 1 commit into from
Mar 11, 2023
Merged

WIP for issue #82 #83

merged 1 commit into from
Mar 11, 2023

Conversation

gjcarneiro
Copy link
Owner

No description provided.

@gjcarneiro gjcarneiro marked this pull request as ready for review March 11, 2023 11:41
@gjcarneiro gjcarneiro merged commit 3620af1 into master Mar 11, 2023
@@ -241,6 +244,18 @@ class ConfigError(Exception):
Opt("jobs"): Seq(Map(_job_schema_dict)),
Opt("web"): Map({"listen": Seq(Str())}),
Opt("include"): Seq(Str()),
Opt("logging"): Map(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In favor of future upgrades, could there by just YamlAny?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hah, yes, and no. I started doing just that, before discovering a "unfun" fact about scrityaml. When you use the "any" validator, all yaml values become strings. In this particular example, the version field was a string, and python's logging didn't like that, it has to be an int. Took me a while to understand that nuance. Declaring the field as Int() fixes that.

The nested objects are declared YamlAny, which seems to work so far, but I fear the string-ification issue might rear its ugly head again in the future 😕

@bdamian
Copy link

bdamian commented Mar 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants