deposit.hal.protocol module

class deposit.hal.protocol.HALProtocol(repository, **kwargs)[source]

Bases: deposit.protocol.RepositoryProtocol

A protocol to submit using the HAL SWORD API

create_metadata(form)[source]
create_zip(pdf, metadata)[source]
encodeUserData()[source]
form_class

alias of HALForm

get_form_initial_data()[source]
get_new_status(identifier)[source]

Unconditionnally fetch the new status of a deposit, by ID (e.g. hal-0001234)

init_deposit(paper, user)[source]

We reject in advance papers that are already in HAL

predict_topic(topic_text)[source]
refresh_deposit_status(deposit_record)[source]

Only refresh the status if we don’t already know that the paper is published - in that case we trust HAL not to delete it. This is to reduce the number of requests on their side.

submit_deposit(pdf, form, dry_run=False)[source]