Skip to content
This repository has been archived by the owner. It is now read-only.

v0.4.0

Compare
Choose a tag to compare
@pafonta pafonta released this 13 Dec 17:26
· 60 commits to master since this release
d5929e1

The following concern the Zotero wrapper (ZoteroWrap).

Added

  • API additions (see the docstring of the methods for details):
    • initialize(self)
    • create_local_reference(self, ref)
    • create_distant_reference(self, ref_data)
    • update_local_reference(self, index, ref)
    • update_distant_reference(self, ref)
    • validate_reference_data(self, ref_data)
    • get_references(self)
    • get_reference_types(self)
    • get_reference_templates(self, ref_types)
    • get_reference_template(self, ref_type)
    • get_reference(self, ref_key)
    • reference_count(self)
    • reference_data(self, index)
    • reference_extra_field(self, field, index)
    • reference_type(self, index)
    • reference_key(self, index)
    • reference_title(self, index)
    • reference_creator_surnames(self, index)
    • reference_creator_surnames_str(self, index)
    • reference_date(self, index)
    • reference_journal(self, index)
    • reference_index(self, ref_id)
  • Raise user-defined exceptions when the creation of a reference fails on the Zotero side (CreateZoteroItemError), a new or modified reference to push is invalid (InvalidZoteroItemError), and a reference has not been found by using its ID (ReferenceNotFoundError). This provides a better understanding of an unexpected behaviour and makes possible to use the EAFP style.
  • Indicate the start and the end of the loading of cached/distant Zotero data.

Changed

  • API changes:
    • getYear -> reference_year
    • loadCachedDB -> load_cache
    • refreshDB -> load_distant
    • savePickle -> cache
    • getInTextCitationFromID -> reference_creators_citation
    • getID -> reference_id
    • getDOI -> reference_doi
    • getPMID -> reference_pmid
    • getUNPUBLISHEDID -> reference_unpublished_id
  • The PyZotero Zotero instance is no more cached.
  • Harmonized naming:
    • All methods returning local reference attributes start with 'reference_'.
    • All methods returning distant Zotero data start with 'get_'.
  • Improved:
    • integrity of Zotero related data structures and data flows,
    • code readability / extensibility / maintainability,
    • Zotero data processing,
    • code logic complexity,
    • code standardization.
  • Documentation of all methods (docstring) following PEP 257.
  • PEP 8 (code style) compliance.
  • More idiomatic Python: list comprehensions, iterators, string formatting, truth values, ...

Removed

The following methods have been removed because they work on references not managed by the wrapper:

  • getRecordFromID
  • getID_fromRef
  • getDOI_fromRef
  • getPMID_fromRef
  • getUNPUBLISHEDID_fromRef

Fixed

  • PDF attachment and parameters search don't work because of deprecated REST server URL still used in some cases.
  • NeuroCurator:#10 PyZotero check_items() should be used before adding a reference to the Zotero database.