Skip to content

Commit

Permalink
fix dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavchenko committed Aug 2, 2024
1 parent 970691f commit f0952d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions cdci_data_analysis/analysis/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Parameter:
TODO see through that this is implemented https://github.com/oda-hub/dispatcher-app/issues/339
"""
def __init__(self,
value=None,
value,
units=None,
name: Union[str, None] = None,
# TODO should we remove units/type/format knowledge from the Parameter class?
Expand Down Expand Up @@ -1057,7 +1057,7 @@ def __init__(self, value=None, name_format='str', name=None):
class Boolean(Parameter):
owl_uris = ('http://www.w3.org/2001/XMLSchema#bool',"http://odahub.io/ontology#Boolean")

def __init__(self, value=None, name=None, is_optional=False):
def __init__(self, value, name=None, is_optional=False):

self._true_rep = ['True', 'true', 'yes', '1', True]
self._false_rep = ['False', 'false', 'no', '0', False]
Expand All @@ -1083,7 +1083,11 @@ def value(self, v):
class StructuredParameter(Parameter):
owl_uris = ("http://odahub.io/ontology#StructuredParameter")

def __init__(self, value=None, name=None, schema={"oneOf": [{"type": "object"}, {"type": "array"}]}, is_optional=False):
def __init__(self,
value,
name=None,
schema={"oneOf": [{"type": "object"}, {"type": "array"}]},
is_optional=False):

self.schema = schema

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def my_instr_factory():
numerical_query = DataServerNumericQuery('numerical_parameters_dummy_query',
parameters_list=[p])

f = FileURL(name='dummy_file')
f = FileURL(name='dummy_file', is_optional=False)
file_query = FileParameterQuery('file_parameters_dummy_query',
parameters_list=[p, f])

Expand Down

0 comments on commit f0952d5

Please sign in to comment.