generate_from_item¶
-
jwst.associations.
generate_from_item
(item, version_id, associations, rules, process_list)[source]¶ Either match or generate a new assocation
Parameters: - item (dict) – The item to match to existing associations or generate new associations from
- version_id (str or None) – Version id to use with association creation. If None, no versioning is used.
- associations ([association, ..]) – List of already existing associations. If the item matches any of these, it will be added to them.
- rules (AssociationRegistry or None) – List of rules to create new associations
- process_list (ProcessList) – The
ProcessList
from which the current item belongs to.
Returns: (associations, process_list) –
- existing_asns: [association,…]
List of existing associations item belongs to. Empty if none match
- new_asns: [association,…]
List of new associations item creates. Empty if none match
- process_list: [ProcessList, …]
List of process events.
Return type: 3-tuple where