Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Add issue to the top level of the article
Browse files Browse the repository at this point in the history
  • Loading branch information
odarbelaeze committed Aug 15, 2020
1 parent c579112 commit 70a8d9e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "Translates isi web of knowledge files into python objects.",
"license": "MIT",
"title": "coreofscience/python-wostools",
"version": "v2.0.2",
"version": "v2.0.3",
"upload_type": "software",
"publication_date": "2018-08-13",
"creators": [
Expand All @@ -25,7 +25,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/coreofscience/python-wostools/tree/v2.0.2",
"identifier": "https://github.com/coreofscience/python-wostools/tree/v2.0.3",
"relation": "isSupplementTo"
},
{
Expand Down
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# History

## 2.0.3 (2020-08-09)

- Add issue to the articles top level.

## 2.0.2 (2020-08-09)

- Fix bug with first author merging articles.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/coreofscience/python-wostools",
version="2.0.2",
version="2.0.3",
zip_safe=False,
long_description_content_type="text/markdown",
)
2 changes: 1 addition & 1 deletion wostools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Core of Science"""
__email__ = "[email protected]"
__version__ = "2.0.2"
__version__ = "2.0.3"

from wostools.article import Article
from wostools.lazy import LazyCollection
Expand Down
4 changes: 4 additions & 0 deletions wostools/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(
year: Optional[int],
journal: Optional[str],
volume: Optional[str] = None,
issue: Optional[str] = None,
page: Optional[str] = None,
doi: Optional[str] = None,
references: Optional[List[str]] = None,
Expand All @@ -46,6 +47,7 @@ def __init__(
self.year: Optional[int] = year
self.journal: Optional[str] = journal
self.volume: Optional[str] = volume
self.issue: Optional[str] = volume
self.page: Optional[str] = page
self.doi: Optional[str] = doi
self.references: List[str] = references or []
Expand Down Expand Up @@ -111,6 +113,7 @@ def merge(self, other: "Article") -> "Article":
year=self.year or other.year,
journal=self.journal or other.journal,
volume=self.volume or other.volume,
issue=self.issue or other.issue,
page=self.page or other.page,
doi=self.doi or other.doi,
sources={*self.sources, *other.sources},
Expand Down Expand Up @@ -139,6 +142,7 @@ def from_isi_text(cls, raw: str) -> "Article":
year=processed.get("year"),
journal=processed.get("source_abbreviation"),
volume=processed.get("volume"),
issue=processed.get("issue"),
page=processed.get("beginning_page"),
doi=processed.get("DOI"),
references=processed.get("references"),
Expand Down

0 comments on commit 70a8d9e

Please sign in to comment.