src/pds_doi_service/core/actions/update.py
def _update_dois(self, dois):
        """
        Updates the local transaction database using the provided Doi objects.
        The updates are not pushed to the service provider.

        Parameters
        ----------
        dois : Iterable[Doi]
            The Dois to update.

        Returns
        -------
        updated_dois : list[Doi]
            The list of Dois reflecting their update state. This includes melding
            with any existing Doi object with the same DOI value.

        """
        updated_dois = []

        for updated_doi in dois:
            if not updated_doi.doi:
                raise RuntimeError(
                    f"Record provided for identifier {updated_doi.pds_identifier} does not have a DOI assigned.\n"
                    "Use the Reserve action to acquire a DOI for the record before attempting to update it."
                )

            # Get the record from the transaction database for the current DOI value
            transaction_record = self._list_action.transaction_for_doi(updated_doi.doi)

            # Get the last output label associated with the transaction.
            # This represents the latest version of the metadata for the DOI.
            output_label = self._list_action.output_label_for_transaction(transaction_record)

            # Output labels can contain multiple entries, so get only the one for
            # the current DOI value
            existing_doi_label, _ = self._web_parser.get_record_for_doi(output_label, updated_doi.doi)

            # Parse the existing Doi object, and meld it with the new one
            existing_dois, _ = self._web_parser.parse_dois_from_label(existing_doi_label)

            updated_doi = self._meld_dois(existing_dois[0], updated_doi)

            updated_dois.append(updated_doi)

        return updated_dois

        Updates the local transaction database using the provided Doi objects.
        The updates are not pushed to the service provider.

        Parameters
        ----------
        dois : Iterable[Doi]
            The Dois to update.

        Returns
        -------
        updated_dois : list[Doi]
            The list of Dois reflecting their update state. This includes melding
            with any existing Doi object with the same DOI value.

        
Updates the local transaction database using the provided Doi objects.
The updates are not pushed to the service provider.

Parameters

dois : Iterable[Doi]
The Dois to update.

Returns

updated_dois : list[Doi]
The list of Dois reflecting their update state. This includes melding
with any existing Doi object with the same DOI value.
Updates the local transaction database using the provided Doi objects . The updates are not pushed to the service provider . Parameters dois : Iterable [ Doi ] The Dois to update . Returns updated_dois : list [ Doi ] The list of Dois reflecting their update state . This includes melding with any existing Doi object with the same DOI value .
def _update_dois(self, dois):
        updated_dois = []
        for updated_doi in dois:
            if not updated_doi.doi:
                raise RuntimeError(
                    f"Record provided for identifier {updated_doi.pds_identifier} does not have a DOI assigned.\n"
                    "Use the Reserve action to acquire a DOI for the record before attempting to update it."
                )
            transaction_record = self._list_action.transaction_for_doi(updated_doi.doi)
            output_label = self._list_action.output_label_for_transaction(transaction_record)
            existing_doi_label, _ = self._web_parser.get_record_for_doi(output_label, updated_doi.doi)
            existing_dois, _ = self._web_parser.parse_dois_from_label(existing_doi_label)
            updated_doi = self._meld_dois(existing_dois[0], updated_doi)
            updated_dois.append(updated_doi)
        return updated_dois
def _update_dois ( self , dois ) : updated_dois = [ ] for updated_doi in dois : if not updated_doi . doi : raise RuntimeError ( f"Record provided for identifier {updated_doi.pds_identifier} does not have a DOI assigned.\n" "Use the Reserve action to acquire a DOI for the record before attempting to update it." ) transaction_record = self . _list_action . transaction_for_doi ( updated_doi . doi ) output_label = self . _list_action . output_label_for_transaction ( transaction_record ) existing_doi_label , _ = self . _web_parser . get_record_for_doi ( output_label , updated_doi . doi ) existing_dois , _ = self . _web_parser . parse_dois_from_label ( existing_doi_label ) updated_doi = self . _meld_dois ( existing_dois [ 0 ] , updated_doi ) updated_dois . append ( updated_doi ) return updated_dois
Updates the local transaction database using the provided Doi objects.
Updates the local transaction database using the provided Doi objects .
"""
        Updates the local transaction database using the provided Doi objects.
        The updates are not pushed to the service provider.

        Parameters
        ----------
        dois : Iterable[Doi]
            The Dois to update.

        Returns
        -------
        updated_dois : list[Doi]
            The list of Dois reflecting their update state. This includes melding
            with any existing Doi object with the same DOI value.

        """ # Get the record from the transaction database for the current DOI value # Get the last output label associated with the transaction. # This represents the latest version of the metadata for the DOI. # Output labels can contain multiple entries, so get only the one for # the current DOI value # Parse the existing Doi object, and meld it with the new one
self
dois