Skip to content

Commit 40799f9

Browse files
amuellermfeurer
authored andcommitted
warn if there's an empty flow description (#831)
* warn if there's an empty flow description * Use logging string interpolation.
1 parent 17657ab commit 40799f9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

openml/flows/flow.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from collections import OrderedDict
22
import os
33
from typing import Dict, List, Union # noqa: F401
4+
import logging
45

56
import xmltodict
67

@@ -223,6 +224,10 @@ def _to_dict(self) -> dict:
223224
_add_if_nonempty(flow_dict, 'oml:{}'.format(attribute),
224225
getattr(self, attribute))
225226

227+
if not self.description:
228+
logger = logging.getLogger(__name__)
229+
logger.warn("Flow % has empty description", self.name)
230+
226231
flow_parameters = []
227232
for key in self.parameters:
228233
param_dict = OrderedDict() # type: 'OrderedDict[str, str]'

0 commit comments

Comments
 (0)