diff --git a/ckanext/attribution/commands/migration/parser.py b/ckanext/attribution/commands/migration/parser.py index 5a78d6b..17fc324 100644 --- a/ckanext/attribution/commands/migration/parser.py +++ b/ckanext/attribution/commands/migration/parser.py @@ -129,8 +129,8 @@ def split(self, txt): Uses multiple sub-methods to attempt to split the text into individual contributors. - :param txt: - :returns: + :param txt: a string containing multiple contributor names + :returns: a list of names """ lines = [ln.strip() for ln in txt.split('\n')] segments = [ diff --git a/ckanext/attribution/lib/helpers.py b/ckanext/attribution/lib/helpers.py index 3afce8f..c76c7b3 100644 --- a/ckanext/attribution/lib/helpers.py +++ b/ckanext/attribution/lib/helpers.py @@ -16,7 +16,7 @@ def can_edit(): """ Check editing permissions for updating agent directly. - :returns: + :returns: True if user can edit agents, False if not """ try: permitted = toolkit.check_access('agent_update', {}, {}) @@ -34,8 +34,8 @@ def get_contributions(pkg_id): Template access for the :func:`~ckanext.attribution.model.crud.PackageQuery.get_contributions` query method. - :param pkg_id: - :returns: + :param pkg_id: the ID of the package + :returns: list of activities associated with the package """ return PackageQuery.get_contributions(pkg_id) diff --git a/ckanext/attribution/logic/actions/meta/help.py b/ckanext/attribution/logic/actions/meta/help.py index d0a865a..0136149 100644 --- a/ckanext/attribution/logic/actions/meta/help.py +++ b/ckanext/attribution/logic/actions/meta/help.py @@ -169,7 +169,7 @@ :type external_id: str :param external_id_scheme: external scheme, e.g. orcid :type external_id_scheme: str -:returns: +:returns: dict containing the ID if valid and any errors """ # SHOW ============================================================================================= @@ -281,8 +281,8 @@ :type start_date: datetime.date, optional :param end_date: when the affiliation ended (e.g. when a researcher left an institution) :type end_date: datetime.date, optional -:param context: -:param data_dict: +:param context: request context +:param data_dict: request data :returns: The updated agent affiliation record. :rtype: dict """ @@ -307,8 +307,8 @@ :type user_id: str, optional :param name: name of an organisation [org only] :type name: str, optional -:param context: -:param data_dict: +:param context: request context +:param data_dict: request data :returns: The updated agent record. :rtype: dict """ @@ -339,8 +339,8 @@ :type level: str, optional :param time: time activity took place :type time: datetime.datetime, optional -:param context: -:param data_dict: +:param context: request context +:param data_dict: request data :returns: New contribution activity record. :rtype: dict """ diff --git a/ckanext/attribution/model/agent.py b/ckanext/attribution/model/agent.py index 646f939..cacb7e8 100644 --- a/ckanext/attribution/model/agent.py +++ b/ckanext/attribution/model/agent.py @@ -55,9 +55,9 @@ def display_name(self): @property def standardised_name(self): """ - Family name first for persons. + Name in a standardised format. - :returns: + :returns: full name (family name first) for person names, just name for other """ if self.agent_type == 'person': return ', '.join([self.family_name, self.given_names])