diff --git a/biosimulator_processes/data_model.py b/biosimulator_processes/data_model.py index ed18f907a..9032c5a6b 100644 --- a/biosimulator_processes/data_model.py +++ b/biosimulator_processes/data_model.py @@ -276,7 +276,7 @@ class SedModel(FromDict): 'global_parameter_changes': 'maybe[tree[string]]', # <-- this is done with set_parameters(PARAM, kwarg=). where the inner most keys are the kwargs 'reaction_changes': 'maybe[tree[string]]' }, - 'model_units': 'tree[string]' + 'model_units': 'maybe[tree[string]]' } def __init__(self, _type: Dict = MODEL_TYPE): diff --git a/notebooks/builder_composer.ipynb b/notebooks/builder_composer.ipynb index 2739da12c..c53aac356 100644 --- a/notebooks/builder_composer.ipynb +++ b/notebooks/builder_composer.ipynb @@ -10,14 +10,9 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "id": "b385dca6-942d-472c-9963-13b8cb33843c", - "metadata": { - "ExecuteTime": { - "end_time": "2024-03-01T18:50:04.271919Z", - "start_time": "2024-03-01T18:50:04.260886Z" - } - }, + "metadata": {}, "outputs": [], "source": [ "from builder import Builder, Process\n", @@ -41,8 +36,8 @@ "id": "b6260555-2bad-4834-adc5-e6d358063579", "metadata": { "ExecuteTime": { - "end_time": "2024-03-01T18:45:09.801100Z", - "start_time": "2024-03-01T18:45:09.797541Z" + "end_time": "2024-03-01T19:01:08.039180Z", + "start_time": "2024-03-01T19:01:08.035424Z" } }, "outputs": [], @@ -56,14 +51,14 @@ "id": "40cde984-cfdf-4571-af9c-3a3755e3763c", "metadata": { "ExecuteTime": { - "end_time": "2024-03-01T18:45:10.172978Z", - "start_time": "2024-03-01T18:45:10.169400Z" + "end_time": "2024-03-01T19:01:08.768333Z", + "start_time": "2024-03-01T19:01:08.764889Z" } }, "outputs": [ { "data": { - "text/plain": "['ram-emitter',\n 'CopasiProcess',\n 'SmoldynProcess',\n 'console-emitter',\n 'CobraProcess',\n 'TelluriumProcess']" + "text/plain": "['console-emitter',\n 'CobraProcess',\n 'ram-emitter',\n 'TelluriumProcess',\n 'SmoldynProcess',\n 'CopasiProcess']" }, "execution_count": 3, "metadata": {}, @@ -89,8 +84,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-01T18:45:12.715567Z", - "start_time": "2024-03-01T18:45:10.608193Z" + "end_time": "2024-03-01T19:01:13.245051Z", + "start_time": "2024-03-01T19:01:10.952929Z" } }, "id": "9279a6fec5ad0c48", @@ -115,8 +110,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-01T18:45:12.736247Z", - "start_time": "2024-03-01T18:45:12.717370Z" + "end_time": "2024-03-01T19:01:13.816676Z", + "start_time": "2024-03-01T19:01:13.802137Z" } }, "id": "da6096ec3e0daa85", @@ -164,12 +159,12 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-01T18:51:15.399056Z", - "start_time": "2024-03-01T18:51:15.392102Z" + "end_time": "2024-03-01T19:01:15.365004Z", + "start_time": "2024-03-01T19:01:15.359117Z" } }, "id": "2b1c1bdd6864a771", - "execution_count": 23 + "execution_count": 6 }, { "cell_type": "code", @@ -189,7 +184,8 @@ " 'model_id': 'simple_copasi_process',\n", " 'model_language': 'sbml',\n", " 'model_name': 'Simple Composite Process',\n", - " 'model_source': {'value': 'BIOMD0000000861'}}\n" + " 'model_source': {'value': 'BIOMD0000000861'},\n", + " 'model_units': None}\n" ] } ], @@ -209,22 +205,22 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-01T18:52:11.944029Z", - "start_time": "2024-03-01T18:52:11.940871Z" + "end_time": "2024-03-01T19:01:21.177545Z", + "start_time": "2024-03-01T19:01:21.172957Z" } }, "id": "8d0566183a2d1c1f", - "execution_count": 25 + "execution_count": 7 }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 8, "id": "b79dc6639a17e353", "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-03-01T18:53:12.797999Z", - "start_time": "2024-03-01T18:53:12.791670Z" + "end_time": "2024-03-01T19:01:28.308684Z", + "start_time": "2024-03-01T19:01:28.304148Z" } }, "outputs": [ @@ -244,7 +240,8 @@ " 'model_id': 'simple_copasi_process',\n", " 'model_language': 'sbml',\n", " 'model_name': 'Simple Composite Process',\n", - " 'model_source': {'value': 'BIOMD0000000861'}}}\n" + " 'model_source': {'value': 'BIOMD0000000861'},\n", + " 'model_units': None}}\n" ] } ], @@ -263,28 +260,15 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "['__abstractmethods__',\n '__annotations__',\n '__class__',\n '__class_getitem__',\n '__class_vars__',\n '__copy__',\n '__deepcopy__',\n '__delattr__',\n '__dict__',\n '__dir__',\n '__doc__',\n '__eq__',\n '__fields__',\n '__fields_set__',\n '__format__',\n '__ge__',\n '__get_pydantic_core_schema__',\n '__get_pydantic_json_schema__',\n '__getattr__',\n '__getattribute__',\n '__getstate__',\n '__gt__',\n '__hash__',\n '__init__',\n '__init_subclass__',\n '__iter__',\n '__le__',\n '__lt__',\n '__module__',\n '__ne__',\n '__new__',\n '__pretty__',\n '__private_attributes__',\n '__pydantic_complete__',\n '__pydantic_core_schema__',\n '__pydantic_custom_init__',\n '__pydantic_decorators__',\n '__pydantic_extra__',\n '__pydantic_fields_set__',\n '__pydantic_generic_metadata__',\n '__pydantic_init_subclass__',\n '__pydantic_parent_namespace__',\n '__pydantic_post_init__',\n '__pydantic_private__',\n '__pydantic_root_model__',\n '__pydantic_serializer__',\n '__pydantic_validator__',\n '__reduce__',\n '__reduce_ex__',\n '__repr__',\n '__repr_args__',\n '__repr_name__',\n '__repr_str__',\n '__rich_repr__',\n '__setattr__',\n '__setstate__',\n '__signature__',\n '__sizeof__',\n '__slots__',\n '__str__',\n '__subclasshook__',\n '__weakref__',\n '_abc_impl',\n '_calculate_keys',\n '_check_frozen',\n '_copy_and_set_values',\n '_get_value',\n '_iter',\n 'construct',\n 'copy',\n 'dict',\n 'from_orm',\n 'json',\n 'method',\n 'model',\n 'model_computed_fields',\n 'model_config',\n 'model_construct',\n 'model_copy',\n 'model_dump',\n 'model_dump_json',\n 'model_extra',\n 'model_fields',\n 'model_fields_set',\n 'model_json_schema',\n 'model_parametrized_name',\n 'model_post_init',\n 'model_rebuild',\n 'model_validate',\n 'model_validate_json',\n 'model_validate_strings',\n 'parse_file',\n 'parse_obj',\n 'parse_raw',\n 'schema',\n 'schema_json',\n 'serialize_model',\n 'update_forward_refs',\n 'validate']" - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "dir(process_config)" ], "metadata": { - "collapsed": false, - "ExecuteTime": { - "end_time": "2024-03-01T18:55:44.251693Z", - "start_time": "2024-03-01T18:55:44.243963Z" - } + "collapsed": false }, "id": "a8bc9415d6ac47ad", - "execution_count": 28 + "execution_count": null }, { "cell_type": "code",