partycls.core package

Information about the software (authors, version, etc.) and useful functions.

Submodules

partycls.core.utils module

Useful functions for an internal use in the main code.

partycls.core.utils.tipify(s)[source]

Convert a string s into the best matching type, i.e. an instance of int, float, str or a list of those types.

Parameters

s (str) – String to convert.

Returns

s – Best-matching type for the input string s.

Return type

int, float, str or list

partycls.core.utils.standardize_condition(condition)[source]

Check that the condition is correctly formated (i.e in the form "<attr> _operator_ <val>").

Parameters

condition (str) – Condition to standardize.

Raises

ValueError – If condition is not valid or if the "<attr>" keyword is not recognized.

Returns

condition – The standardized condition.

Return type

str