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

Commit

Permalink
Fix little bug
Browse files Browse the repository at this point in the history
  • Loading branch information
odarbelaeze committed Aug 9, 2020
1 parent 068b7fe commit 9076998
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 wostools tests --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --statistics
flake8 wostools tests --count --exit-zero --statistics
- name: Test with pytest
run: python setup.py test
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.0",
"version": "v2.0.1",
"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.0",
"identifier": "https://github.com/coreofscience/python-wostools/tree/v2.0.1",
"relation": "isSupplementTo"
},
{
Expand Down
7 changes: 6 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# History

## 2.0.0 (2020-08-09)
## 2.0.1 (2020-08-09)

- Fix error with wos files that have an invisible character before the field
key.

## 2.0.0 (2020-08-08)

- Make the article class more concrete
- Make collections iterable
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ select = B,C,E,F,W,T4,B9
[aliases]
test = pytest

[tool:pytest]
collect_ignore = ['setup.py']
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.0",
version="2.0.1",
zip_safe=False,
long_description_content_type="text/markdown",
)
2 changes: 1 addition & 1 deletion tests/test_collection_cached.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import io
from typing import Collection, List, Dict, Tuple
from typing import List, Dict, Tuple

from pytest import fixture
from pytest_bdd import scenarios, given, when, then
Expand Down
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.0"
__version__ = "2.0.1"

from wostools.article import Article
from wostools.lazy import LazyCollection
Expand Down
2 changes: 1 addition & 1 deletion wostools/_testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def assert_data(self, name=None) -> Iterator[T]:

@contextmanager
def assert_error(self) -> Iterator[Exception]:
assert self.error, f"Expected an error and found none"
assert self.error, "Expected an error and found none"
yield self.error

@contextmanager
Expand Down
4 changes: 3 additions & 1 deletion wostools/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
logger = logging.getLogger(__name__)

# The null part accounts for an ISI wok bug
ISI_LINE_PATTERN = re.compile(r"^(null)?((?P<field>[A-Z0-9]{2})| )( (?P<value>.*))?$")
ISI_LINE_PATTERN = re.compile(
r"^(null|.)?((?P<field>[A-Z0-9]{2})| )( (?P<value>.*))?$"
)

ISI_CITATION_PATTERN = re.compile(
r"""^(?P<AU>[^,]+)?,[ ] # First author
Expand Down

0 comments on commit 9076998

Please sign in to comment.