Skip to content

Commit

Permalink
chore: adhere to style
Browse files Browse the repository at this point in the history
  • Loading branch information
younesStrittmatter committed Sep 7, 2023
1 parent 4e018f4 commit 6791b1e
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/autora/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,9 @@ def _f(state_: S, /, **kwargs) -> S:
from_state = parameters_.intersection({i.name for i in fields(state_)})
arguments_from_state = {k: getattr(state_, k) for k in from_state}
from_state_input_mapping = {
reversed_mapping.get(field.name, field.name): getattr(state_, field.name)
reversed_mapping.get(field.name, field.name): getattr(
state_, field.name
)
for field in fields(state_)
if reversed_mapping.get(field.name, field.name) in parameters_
}
Expand Down Expand Up @@ -1758,10 +1760,22 @@ def __init__(self, data: Optional[Dict] = None, **kwargs):
if data is None:
data = {
"_metadata": {
"variables": {"default": None, "delta": "replace", "converter":VariableCollection},
"conditions": {"default": None, "delta": "replace", "converter":pd.DataFrame},
"experiment_data": {"default": None, "delta": "extend", "converter":pd.DataFrame},
"models": {"default": None, "delta": "extend", "converter":list},
"variables": {
"default": None,
"delta": "replace",
"converter": VariableCollection,
},
"conditions": {
"default": None,
"delta": "replace",
"converter": pd.DataFrame,
},
"experiment_data": {
"default": None,
"delta": "extend",
"converter": pd.DataFrame,
},
"models": {"default": None, "delta": "extend", "converter": list},
},
"variables": None,
"conditions": None,
Expand Down

0 comments on commit 6791b1e

Please sign in to comment.