-
Notifications
You must be signed in to change notification settings - Fork 9
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
Revarspec #275
Conversation
Also fix bug where warning wasn't generated anymore.
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.
Excellent! Just a few small comments and then you can merge this IMO 👍 Then we'll look at further improvements in our discussions in the future
@@ -226,7 +226,7 @@ | |||
{ | |||
"name": "Embarked", | |||
"type": "categorical", | |||
"dtype": "Categorical", | |||
"dtype": "Categorical(ordering='physical')", |
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.
hmm, this is new from polars.
metasyn/config.py
Outdated
var_configs: Union[list[dict], list[VarConfig]], | ||
dist_providers: Union[DistributionProviderList, list[str], str], | ||
privacy: Union[BasePrivacy, dict], | ||
var_configs: Union[list[dict], list[VarSpec]], |
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.
var_configs: Union[list[dict], list[VarSpec]], | |
var_specs: Union[list[dict], list[VarSpec]], |
slight suggestion: refactor this arg name
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.
Done
# Parse the var_specs into a MetaConfig instance. | ||
if isinstance(var_specs, (pathlib.Path, str)): | ||
meta_config = MetaConfig.from_toml(var_specs) | ||
elif isinstance(var_specs, MetaConfig): | ||
meta_config = var_specs | ||
elif var_specs is None: | ||
meta_config = MetaConfig([], dist_providers, privacy) | ||
else: | ||
assert privacy is None | ||
meta_config = MetaConfig(var_specs, dist_providers, privacy) | ||
if dist_providers is not None: | ||
meta_config.dist_providers = dist_providers # type: ignore | ||
if privacy is not None: | ||
meta_config.privacy = privacy # type: ignore |
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.
Clear precendence of arguments here, nice
Co-authored-by: Erik-Jan van Kesteren <e.vankesteren1@uu.nl>
Co-authored-by: Erik-Jan van Kesteren <e.vankesteren1@uu.nl>
Co-authored-by: Erik-Jan van Kesteren <e.vankesteren1@uu.nl>
Co-authored-by: Erik-Jan van Kesteren <e.vankesteren1@uu.nl>
Fixes #240