tardis.apps.publication_workflow package¶
Subpackages¶
- tardis.apps.publication_workflow.migrations package
- tardis.apps.publication_workflow.tests package
- Submodules
- tardis.apps.publication_workflow.tests.test_email_templates module
- tardis.apps.publication_workflow.tests.test_form module
- tardis.apps.publication_workflow.tests.test_my_publications module
- tardis.apps.publication_workflow.tests.test_revert_finalize module
- tardis.apps.publication_workflow.tests.test_tokens module
- Module contents
Submodules¶
tardis.apps.publication_workflow.apps module¶
-
class
tardis.apps.publication_workflow.apps.
PublicationWorkflowConfig
(app_name, app_module)¶ Bases:
tardis.app_config.AbstractTardisAppConfig
-
name
= 'tardis.apps.publication_workflow'¶
-
verbose_name
= 'Publication Workflow'¶
-
tardis.apps.publication_workflow.default_settings module¶
default settings for publication app override in main settings
tardis.apps.publication_workflow.doi module¶
tardis.apps.publication_workflow.email_text module¶
-
tardis.apps.publication_workflow.email_text.
email_pub_rejected
(pub_title, message=None)¶
-
tardis.apps.publication_workflow.email_text.
email_pub_released
(pub_title, doi=None)¶
-
tardis.apps.publication_workflow.email_text.
email_pub_retracted
(pub_title, message=None)¶
-
tardis.apps.publication_workflow.email_text.
email_pub_reverted_to_draft
(pub_title, message=None)¶
-
tardis.apps.publication_workflow.email_text.
interpolate_template
(template_name, **kwargs)¶
tardis.apps.publication_workflow.managers module¶
-
class
tardis.apps.publication_workflow.managers.
PublicationManager
¶ Bases:
tardis.tardis_portal.managers.ExperimentManager
Extends the ExperimentManager class, added methods for draft, scheduled and published publications.
-
create_draft_publication
(user, publication_title, publication_description)¶ Create a new draft publication
-
draft_publications
(user)¶ Return all draft publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving draft publications for Returns: A QuerySet of experiments representing the draft publications Return type: QuerySet
-
released_publications
(user)¶ Return all released publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving draft publications for Returns: A QuerySet of experiments representing the draft publications Return type: QuerySet
-
retracted_publications
(user)¶ Return all retracted publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving retracted publications for Returns: A QuerySet of experiments representing the retracted publications Return type: QuerySet
-
scheduled_publications
(user)¶ Return all scheduled publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving draft publications for Returns: A QuerySet of experiments representing the draft publications Return type: QuerySet
-
tardis.apps.publication_workflow.models module¶
-
class
tardis.apps.publication_workflow.models.
Publication
(*args, **kwargs)¶ Bases:
tardis.tardis_portal.models.experiment.Experiment
Publication records are just experiment records with some metadata, so they can be represented by the Experiment model. However, it is useful to have a publication-specific manager, so we can retrieve publication records with Publication.safe.draft_publications(user)
-
exception
DoesNotExist
¶ Bases:
tardis.tardis_portal.models.experiment.DoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
tardis.tardis_portal.models.experiment.MultipleObjectsReturned
-
class
PublicationManager
¶ Bases:
tardis.tardis_portal.managers.ExperimentManager
Extends the ExperimentManager class, added methods for draft, scheduled and published publications.
-
create_draft_publication
(user, publication_title, publication_description)¶ Create a new draft publication
-
draft_publications
(user)¶ Return all draft publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving draft publications for Returns: A QuerySet of experiments representing the draft publications Return type: QuerySet
-
released_publications
(user)¶ Return all released publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving draft publications for Returns: A QuerySet of experiments representing the draft publications Return type: QuerySet
-
retracted_publications
(user)¶ Return all retracted publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving retracted publications for Returns: A QuerySet of experiments representing the retracted publications Return type: QuerySet
-
scheduled_publications
(user)¶ Return all scheduled publications which are owned by a particular user, including those shared with a group of which the user is a member.
Parameters: user (django.contrib.auth.models.User) – the user who we are retrieving draft publications for Returns: A QuerySet of experiments representing the draft publications Return type: QuerySet
-
-
add_acknowledgements
(acknowledgements)¶ Add the acknowledgements
-
add_root_schema_pset
()¶
-
static
get_details_schema
()¶ Get the publication details schema
-
get_details_schema_pset
()¶ Get the publication details schema parameter set
-
get_form_state_parameter
()¶ Get the form state database object
-
objectacls
¶ Accessor to the related objects manager on the one-to-many relation created by GenericRelation.
In the example:
class Post(Model): comments = GenericRelation(Comment)
post.comments
is a ReverseGenericManyToOneDescriptor instance.
-
remove_draft_status
()¶
-
retract
()¶ Retract a publication
-
revert_to_draft
(message=None)¶ This method is not currently exposed to users.
In a previous version of the publication workflow, this method was used when proposed publications were rejected by the publication admins.
Anything with the form_state parameter can be reverted to draft
-
safe
= <tardis.apps.publication_workflow.managers.PublicationManager object>¶
-
set_embargo_release_date
(release_date)¶
-
exception
tardis.apps.publication_workflow.tasks module¶
-
tardis.apps.publication_workflow.tasks.
get_release_date
(publication)¶
-
tardis.apps.publication_workflow.tasks.
process_embargos
()¶
tardis.apps.publication_workflow.urls module¶
-
tardis.apps.publication_workflow.urls.
re_path
(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RegexPattern'>)¶
tardis.apps.publication_workflow.utils module¶
-
tardis.apps.publication_workflow.utils.
get_pub_admin_email_addresses
()¶
tardis.apps.publication_workflow.views module¶
-
tardis.apps.publication_workflow.views.
delete_publication
(request, experiment_id)¶ Delete the publication draft with the supplied experiment ID
-
tardis.apps.publication_workflow.views.
fetch_experiments_and_datasets
(request)¶
-
tardis.apps.publication_workflow.views.
finalize_publication
(request, publication, send_email=True)¶
-
tardis.apps.publication_workflow.views.
form_view
(request)¶
-
tardis.apps.publication_workflow.views.
get_draft_publication
(user, publication_id)¶
-
tardis.apps.publication_workflow.views.
get_licenses
(request)¶
-
tardis.apps.publication_workflow.views.
is_publication
(request, experiment_id)¶ Return a JSON response indicating whether the exp ID is a publication
-
tardis.apps.publication_workflow.views.
is_publication_draft
(request, experiment_id)¶ Return a JSON response indicating whether the exp ID is a publication draft
-
tardis.apps.publication_workflow.views.
map_form_to_schemas
(extraInfo, publication)¶
-
tardis.apps.publication_workflow.views.
mint_doi_and_deactivate
(request, experiment_id)¶
-
tardis.apps.publication_workflow.views.
my_publications
(request)¶ Show drafts of public data collections, scheduled publications and published data.
-
tardis.apps.publication_workflow.views.
process_form
(request)¶
-
tardis.apps.publication_workflow.views.
retract_publication
(request, publication_id)¶ Retract the publication with the supplied publication ID
-
tardis.apps.publication_workflow.views.
retrieve_access_list_tokens_json
(request, experiment_id)¶ json list of tokens associated with a given experiment
-
tardis.apps.publication_workflow.views.
retrieve_draft_pubs_list
(request)¶ json list of draft pubs accessible by the current user
-
tardis.apps.publication_workflow.views.
retrieve_released_pubs_list
(request)¶ json list of released pubs accessible by the current user
-
tardis.apps.publication_workflow.views.
retrieve_retracted_pubs_list
(request)¶ json list of retracted pubs accessible by the current user
-
tardis.apps.publication_workflow.views.
retrieve_scheduled_pubs_list
(request)¶ json list of scheduled pubs accessible by the current user
-
tardis.apps.publication_workflow.views.
select_forms
(datasets)¶ This method was designed to return form templates for the publication form’s Extra Information section, depending on a PUBLICATION_FORM_MAPPINGS setting which supported custom mappings between form templates, dataset schemas and publication schemas.
These custom mappings have been removed for now, leaving only the generic Extra Information form (a textarea for each dataset). This is because the way the Extra Information was updated each time the form was processed required deleting all of the publication draft’s meatadata (except for the form_state) and repopulating it. This clashes with the My Publications workflow’s desire to add metadata (like a DOI) outside of the form.
-
tardis.apps.publication_workflow.views.
submit_form
(request, form_state, publication)¶
-
tardis.apps.publication_workflow.views.
tokens
(request, experiment_id)¶
-
tardis.apps.publication_workflow.views.
update_attribution_and_licensing
(request, form_state, publication)¶
-
tardis.apps.publication_workflow.views.
update_data_selection
(request, form_state, publication)¶
-
tardis.apps.publication_workflow.views.
update_dataset_basic_info
(request, form_state, publication)¶
-
tardis.apps.publication_workflow.views.
update_extra_info
(request, form_state, publication)¶
-
tardis.apps.publication_workflow.views.
validation_error
(error=None)¶