diff --git a/src/LHCbDIRAC/ProductionManagementSystem/Client/AnalysisProductionsClient.py b/src/LHCbDIRAC/ProductionManagementSystem/Client/AnalysisProductionsClient.py index 10317bd062469c2e5d69b9ba87d4dbc6463797e9..6d5d4cb19f9ebf94254389a8c1318c1d4a5193c6 100644 --- a/src/LHCbDIRAC/ProductionManagementSystem/Client/AnalysisProductionsClient.py +++ b/src/LHCbDIRAC/ProductionManagementSystem/Client/AnalysisProductionsClient.py @@ -158,6 +158,8 @@ class AnalysisProductionsClient(Client): with_pfns: bool = True, with_transformations: bool = False, at_time: Opt[datetime] = None, + show_archived: bool = False, + require_has_publication: bool = False, ): """Return the list of productions for a specific analysis @@ -182,6 +184,8 @@ class AnalysisProductionsClient(Client): with_pfns, with_transformations, at_time, + show_archived, + require_has_publication, call="getProductions", ) @@ -299,9 +303,9 @@ class AnalysisProductionsClient(Client): :param number: publication number as a string (<64chars). :returns: S_OK() || S_ERROR() """ - return self.executeRPC(samples, call="addPublication") + return self.executeRPC(samples, number, call="addPublication") - def getPublications(self, sample_ids): + def getPublications(self, sample_ids: Opt[list] = None): """Get publication numbers for the specified sample. :param samples: List of sample IDs diff --git a/src/LHCbDIRAC/ProductionManagementSystem/Service/TornadoAnalysisProductionsHandler.py b/src/LHCbDIRAC/ProductionManagementSystem/Service/TornadoAnalysisProductionsHandler.py index 9b6931d09cb097e84de2fbadc815922aafa843e3..0ad3170a905ff91eba26e2a9673e9bede4e40da4 100644 --- a/src/LHCbDIRAC/ProductionManagementSystem/Service/TornadoAnalysisProductionsHandler.py +++ b/src/LHCbDIRAC/ProductionManagementSystem/Service/TornadoAnalysisProductionsHandler.py @@ -27,6 +27,8 @@ from LHCbDIRAC.ProductionManagementSystem.DB.AnalysisProductionsDB import Analys optDate = (type(None), datetime) optString = (type(None), str) +optList = (type(None), list) +optBool = (type(None), bool) sLog = gLogger.getSubLogger(__name__) sLog._setOption("tornadoComponent", "ProductionManagement/TornadoAnalysisProduction") @@ -76,7 +78,19 @@ class TornadoAnalysisProductionsHandler(TornadoService): """See :meth:`~.AnalysisProductionsClient.setOwners`""" return self._db.setOwners(wg=wg, analysis=analysis, owners=owners) - types_getProductions = [optString, optString, optString, optString, optString, bool, bool, bool, optDate] + types_getProductions = [ + optString, + optString, + optString, + optString, + optString, + bool, + bool, + bool, + optDate, + optBool, + optBool, + ] @convertToReturnValue def export_getProductions( @@ -212,7 +226,7 @@ class TornadoAnalysisProductionsHandler(TornadoService): """See :meth:`~.AnalysisProductionsClient.addPublication`""" return self._db.addPublication(samples, number) - types_getPublications = [list] + types_getPublications = [optList] @convertToReturnValue def export_getPublications(self, sample_ids):