Instead of setting default values for the pattern_type passed to generate_resource_url() when the argument is None, specify the value of pattern_type explicitly when the deposit will be for a journal_article or a component.
This can be considered a breaking change, if generate_resource_url() was used directly, however using doi. set_article_doi_data() or component.set_component_doi() these are changed to be backwards compatible by passing in the appropriate value for the pattern_type.
For background, the pattern_type value is used to find a string pattern replacement value from the crossref.cfg config file, which is used to generate a uri for a doi, which ends up in the <doi_data> tag of a Crossref deposit.
A new version of this library 0.14.0 is set for this change.
It is in preparation for adding support for depositing posted_content, where these default pattern_type value were making it inflexible to populate the uri from an Article object's self_uri property.
(I hope this lengthy description makes sense, it's hard to explain!)
Instead of setting default values for the
pattern_type
passed togenerate_resource_url()
when the argument isNone
, specify the value ofpattern_type
explicitly when the deposit will be for ajournal_article
or acomponent
.This can be considered a breaking change, if
generate_resource_url()
was used directly, however usingdoi. set_article_doi_data()
orcomponent.set_component_doi()
these are changed to be backwards compatible by passing in the appropriate value for thepattern_type
.For background, the
pattern_type
value is used to find a string pattern replacement value from thecrossref.cfg
config file, which is used to generate auri
for adoi
, which ends up in the<doi_data>
tag of a Crossref deposit.A new version of this library
0.14.0
is set for this change.It is in preparation for adding support for depositing
posted_content
, where these defaultpattern_type
value were making it inflexible to populate theuri
from anArticle
object'sself_uri
property.(I hope this lengthy description makes sense, it's hard to explain!)