Nat

Latest version: v0.4.3

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4.2

Fixed

- 14

0.4.1

Added

- Create a test suite for ZoteroWrap.
- Set a minimal required Python version in setup.py (>= 3).
- Print the creation status when Pyzotero.create_items() fails in ZoteroWrap.create_distant_reference().
- Use exception chaining in ZoteroWrap.

Changed

- Switch from distutils to setuptools for setup.py.
- Return created reference in ZoteroWrap.create_distant_reference() instead of its key.
- Move CSV files into a specific directory: nat/data/.
- Upgrade setup.py. Delete MANIFEST.in and setup.cfg.
- Change README.md to use the releases on PyPI.
- Improve a little the logic of ZoteroWrap.reference_index().

Removed

- Remove unused tests in ZoteroWrap.reference_extra_field() and ZoteroWrap.reference_creator_surnames_str().
- Remove unused default datetime in ZoteroWrap.reference_year().

Fixed

- Fix incorrect formatting in ZoteroWrap.reference_creators_citation().
- 13
- 10
- RESTClient.getContext() crashed when 'context' wasn't in the response.

0.4.0

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](https://docs.python.org/3/glossary.htmlterm-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](https://github.com/BlueBrain/neurocurator/issues/10) PyZotero check_items() should be used before adding a reference to the Zotero database.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.