nuctransportdb.generate_id ========================== .. py:module:: nuctransportdb.generate_id Attributes ---------- .. autoapisummary:: nuctransportdb.generate_id.yaml Functions --------- .. autoapisummary:: nuctransportdb.generate_id.ntd_namespace nuctransportdb.generate_id.get_list_from_sequence nuctransportdb.generate_id.normalize_str nuctransportdb.generate_id.flatten_entry_dict nuctransportdb.generate_id.get_entry_str nuctransportdb.generate_id.generate_property_id nuctransportdb.generate_id.generate_id_for_all Module Contents --------------- .. py:data:: yaml .. py:function:: ntd_namespace() Generate the NTD namespace UUID. :returns: The NTD namespace UUID. :rtype: uuid.UUID .. py:function:: get_list_from_sequence(value) Helper function to convert a string or None to a list. :param value: the input value to convert. :type value: str, None, list :raises ValueError: if the input value is not a string, None, or a list. :returns: the converted list. :rtype: list .. py:function:: normalize_str(val) Normalize function for splitting and sorting strings. :param val: The input string to normalize. :type val: str :returns: The normalized string. :rtype: str .. py:function:: flatten_entry_dict(property_entry, nuclide_name) Flatten the entry dictionary. :param property_entry: The property dictionary. :type property_entry: dict :param nuclide_name: Nuclide name. :type nuclide_name: str :returns: The flattened entry dictionary. :rtype: dict .. py:function:: get_entry_str(property_entry, nuclide_name) Function for combining all entry fields into a single string. :param property_entry: The property dictionary. :type property_entry: dict :param nuclide_name: Nuclide name. :type nuclide_name: str :returns: The combined entry string. :rtype: str .. py:function:: generate_property_id(yaml_file_path) -> None Check for missing ID and generate a unique ID for each data in the YAML file. :param yaml_file_path: The path to the YAML file. :type yaml_file_path: str .. py:function:: generate_id_for_all(property_dir) -> None Generate IDs for all YAML files in the property directory. :param property_dir: The path to the property directory. :type property_dir: str