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

Revarspec #275

Merged
merged 22 commits into from
Mar 8, 2024
Merged

Revarspec #275

merged 22 commits into from
Mar 8, 2024

Conversation

qubixes
Copy link
Member

@qubixes qubixes commented Mar 6, 2024

Fixes #240

@qubixes qubixes marked this pull request as draft March 6, 2024 16:16
@qubixes qubixes marked this pull request as ready for review March 8, 2024 13:19
@qubixes qubixes requested review from Samuwhale and vankesteren and removed request for Samuwhale March 8, 2024 13:20
Copy link
Member

@vankesteren vankesteren left a 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

docs/source/usage/generating_metaframes.rst Outdated Show resolved Hide resolved
examples/basic_example.py Outdated Show resolved Hide resolved
@@ -226,7 +226,7 @@
{
"name": "Embarked",
"type": "categorical",
"dtype": "Categorical",
"dtype": "Categorical(ordering='physical')",
Copy link
Member

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.

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]],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
var_configs: Union[list[dict], list[VarSpec]],
var_specs: Union[list[dict], list[VarSpec]],

slight suggestion: refactor this arg name

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

metasyn/metaframe.py Outdated Show resolved Hide resolved
metasyn/metaframe.py Outdated Show resolved Hide resolved
Comment on lines +101 to +113
# 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
Copy link
Member

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

qubixes and others added 7 commits March 8, 2024 15:59
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>
docs/source/faq.rst Outdated Show resolved Hide resolved
metasyn/provider.py Outdated Show resolved Hide resolved
@qubixes qubixes merged commit c2237cc into main Mar 8, 2024
7 checks passed
@vankesteren vankesteren deleted the revarspec branch April 19, 2024 07:48
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.

IMPORTANT: fix unfriendly user interface for var specs
2 participants