Skip to content

API: function that creates the details for a simulation in a metadata object. #14

@king-michael

Description

@king-michael

Simple function to create the data for simulation details.
Just a wrapper that one can get a uniform naming in the database.
An the user see's what is there.

def create_simulation_details(entry_id, n_steps=None, time_step=None, ..., **kwargs):
   """
   Function that create simulation details for a given entry_id 
  and stores them into the database.
   
   Note
   ------
   If the value of an argument is None,
   it will **not** be stored into the database.

   Parameters:
   ----------------
   entry_id : str
     Rendered description for parameters so they are in the docs
   """
   input_args = locals()
   
   list_dropped_keys = [k for k,v in input_args.items() if v is None]
   for k in list_dropped_keys:
     del input_args[k]   
   
   ... create entry with the rest of the keywords ...
  return whatever

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIssues at the API levelenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions