spinn_utilities.citation package¶
Module contents¶
- class spinn_utilities.citation.CitationAggregator[source]¶
Bases:
object
Helper class for building a citation file which references all dependencies.
- create_aggregated_citation_file(module_to_start_at, aggregated_citation_file)[source]¶
Entrance method for building the aggregated citation file.
- Parameters:
module_to_start_at (python module) – the top level module to figure out its citation file for
aggregated_citation_file (str) – file name of aggregated citation file
- class spinn_utilities.citation.CitationUpdaterAndDoiGenerator[source]¶
Bases:
object
- static convert_month_name_to_number(version_month)[source]¶
Convert a python month in text form to a number form.
- Parameters:
- Returns:
the month int value
- Return type:
- Raises:
ValueError – when the month name is not recognised
- static convert_text_date_to_date(version_month, version_year, version_day)[source]¶
Convert the 3 components of a date into a CFF date.
- update_citation_file_and_create_doi(citation_file_path, doi_title, create_doi, publish_doi, previous_doi, zenodo_access_token, module_path)[source]¶
Take a CITATION.cff file and updates the version and date-released fields, and rewrites the
CITATION.cff
file.- Parameters:
citation_file_path (str) – File path to the
CITATION.cff
filecreate_doi (bool) – Whether to use Zenodo DOI interface to grab a DOI
zenodo_access_token (str) – Access token for Zenodo
publish_doi (bool) – Whether to publish the DOI on Zenodo
previous_doi (str) – DOI to append the created DOI to
doi_title (str) – Title for the created DOI
module_path (str) – Path to the module to zip up
update_version (bool) – Whether we should update the citation version