-
Notifications
You must be signed in to change notification settings - Fork 16
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
Various #374
Various #374
Conversation
- use logging instead of prints - catch schema parsing errors and report as internal errors - convert integers to str during rose output writing
…n integer. If specified in ISO dates, then leave it.
@ilaflott same story on this one. changes we definitely want but not the final update (surprise surprise) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some feedback, all nits.
biggest problem is the failing pipeline.
import yaml | ||
import metomi.rose.config | ||
|
||
import fre.yamltools.combine_yamls_script as cy | ||
|
||
import logging | ||
logging.basicConfig() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in fre-cli
the configuration for logger
gets set in fre.py
- where it can pick up a verbose
flag... e.g. with fre -v yamltools configure-yaml ARGS
, so this doesn't need to be done here, unless you really want the secondary config on top of the base fre
call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha! So there is a central logger, and we're unnecessary re-declaring it in each python file now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no you do gotta declare it in each file. that's the suggested basic logging
usage. the logging
how-to isn't so bad a read. there's fancier things we could be doing, i'm sure.
the configuration of logging
is centralized though, so no need to do basicConfig
unless you want something tool-specific.
@Ciheim and I were discussing global v. tool-specific verbose
the other day, maybe we should have it again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the global-configuring, see fre/fre.py#L15-L18
and fre/fre.py#L67-L76
The tests are failing from some pp yaml validation and usage tests which broke from the schema changes. It's a good catch. I'll update the tests with the schema changes and then they should pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the yaml updates!
I was going to try to see if I could get the central logging going in a few minutes, which would be a good idea normally as it sets an example, but thank you for merging. The tests were excellent and easy to adjust. You'll teach me the proper central logging way and I'll help fix as I go like you do. |
sorry for merging too quick! I invite you to |
Describe your changes
Issue ticket number and link (if applicable)
Checklist before requesting a review