Skip to content

Commit

Permalink
Merge pull request #84 from citation-file-format/issue82-stdout
Browse files Browse the repository at this point in the history
Issue82 stdout
  • Loading branch information
jspaaks authored Oct 9, 2018
2 parents 435b6e9 + 61fafb4 commit cbe0b7a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 18 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.0.2
=====

- fixed bug https://github.com/citation-file-format/cff-converter-python/issues/82 (warnings on stdout)

1.0.1
=====

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ authors:
given-names: Stephan
orcid: https://orcid.org/0000-0003-4925-7248
cff-version: "1.0.3"
date-released: 2018-07-25
date-released: 2018-10-09
doi: 10.5281/zenodo.1162057
keywords:
- "citation"
Expand All @@ -30,4 +30,4 @@ license: Apache-2.0
message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/citation-file-format/cff-converter-python"
title: cffconvert
version: "1.0.1"
version: "1.0.2"
3 changes: 2 additions & 1 deletion cffconvert/citation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
import os
import requests
import yaml
Expand Down Expand Up @@ -454,7 +455,7 @@ def construct_authors_arr():
return authors

if self.ignore_suspect_keys is False and len(self.suspect_keys) > 0:
print("Note: suspect keys will be included in the output.")
print("Note: suspect keys will be included in the output.", file=sys.stderr)

d = dict()
if self._key_should_be_included("abstract"):
Expand Down
2 changes: 1 addition & 1 deletion cffconvert/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# from https://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined
# -in-setup-py-setuptools-in-my-package#answer-24517154

__version__ = "1.0.1"
__version__ = "1.0.2"
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}
],
"codeRepository": "https://github.com/citation-file-format/cff-converter-python",
"datePublished": "2018-07-25",
"datePublished": "2018-10-09",
"identifier": "https://doi.org/10.5281/zenodo.1162057",
"keywords": [
"citation",
Expand All @@ -54,5 +54,5 @@
],
"license": "http://www.apache.org/licenses/LICENSE-2.0",
"name": "cffconvert",
"version": "1.0.1"
"version": "1.0.2"
}
14 changes: 4 additions & 10 deletions livetest/citation_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
class CitationTestUrlHasOrgRepoOnly(unittest.TestCase):

def test_retrieval_of_latest_master(self):
# this test checks if cffconvert can behave similar to a simple curl or wget
# https://github.com/<org>/<repo>
url = "https://github.com/citation-file-format/cff-converter-python"
citation = Citation(url=url)
fixture = os.path.join("fixtures", "7", "CITATION.cff")
with open(fixture) as f:
expected_cffstr = f.read()
actual_cffstr = citation.cffstr
self.assertEqual(expected_cffstr, actual_cffstr)
self.assertNotEqual(citation, None)


class CitationTestUrlHasOrgRepoTreeSha(unittest.TestCase):
Expand Down Expand Up @@ -47,13 +44,10 @@ class CitationTestOrgRepoTreeBranch(unittest.TestCase):

def test_retrieval_via_branchname(self):
# https://github.com/<org>/<repo>/tree/<branchname>
# this test checks if cffconvert can behave similar to a simple curl or wget
url = "https://github.com/citation-file-format/cff-converter-python/tree/master"
citation = Citation(url=url)
fixture = os.path.join("fixtures", "7", "CITATION.cff")
with open(fixture) as f:
expected_cffstr = f.read()
actual_cffstr = citation.cffstr
self.assertEqual(expected_cffstr, actual_cffstr)
self.assertNotEqual(citation, None)


class CitationTestInvalidInput(unittest.TestCase):
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def get_version():
include_package_data=True,
keywords=['citation', 'cff', 'CITATION.cff', 'bibliography'],
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down
2 changes: 1 addition & 1 deletion test/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_printing_of_help(self):
def test_printing_of_version(self):
result = self.runner.invoke(cffconvert_cli, ["--version"])
self.assertTrue(result.exit_code == 0)
self.assertEqual(result.output, "1.0.1\n")
self.assertEqual(result.output, "1.0.2\n")

def test_printing_when_verbose(self):
result = self.runner.invoke(cffconvert_cli, ["--verbose"])
Expand Down

0 comments on commit cbe0b7a

Please sign in to comment.