8000 :handshake: merge with master · pyexcel/pyexcel-io@1a47d9e · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a47d9e

Browse files
committed
🤝 merge with master
2 parents e6444b8 + 086aacf commit 1a47d9e

File tree

8 files changed

+44
-19
lines changed

8 files changed

+44
-19
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
Change log
22
================================================================================
33

4+
0.5.17 - 04.04.2019
5+
--------------------------------------------------------------------------------
6+
7+
updated
8+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
10+
#. `#68 <https://github.com/pyexcel/pyexcel-io/issues/68>`_: Raise IOError when
11+
the data file does not exist
12+
413
0.5.16 - 19.03.2019
514
--------------------------------------------------------------------------------
615

changelog.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: pyexcel-io
22
organisation: pyexcel
33
releases:
4+
- changes:
5+
- action: updated
6+
details:
7+
- '`#68`: Raise IOError when the data file does not exist'
8+
version: 0.5.17
9+
date: 04.04.2019
410
- changes:
511
- action: updated
612
details:

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
copyright = 'copyright 2015-2019 Onni Software Ltd.'
2121
author = 'C.W.'
2222
# The short X.Y version
23-
version = '0.5.16'
23+
version = '0.6.0'
2424
# The full version, including alpha/beta/rc tags
25-
release = '0.5.16'
25+
release = '0.5.17'
2626

2727 10000
# -- General configuration ---------------------------------------------------
2828

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
:Source code: http://github.com/pyexcel/pyexcel-io.git
1111
:Issues: http://github.com/pyexcel/pyexcel-io/issues
1212
:License: New BSD License
13+
:Development: |release|
1314
:Released: |version|
1415
:Generated: |today|
1516

pyexcel-io.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ overrides: "pyexcel.yaml"
22
project: "pyexcel-io"
33
name: pyexcel-io
44
nick_name: io
5-
version: 0.5.16
6-
current_version: 0.5.16
7-
release: 0.5.16
5+
version: 0.6.0
6+
current_version: 0.6.0
87
copyright_year: 2015-2019
8+
release: 0.5.17
99
dependencies:
1010
- ordereddict;python_version<"2.7"
1111
- lml>=0.0.4

pyexcel_io/io.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
:copyright: (c) 2014-2017 by Onni Software Ltd.
88
:license: New BSD License, see LICENSE for more details
99
"""
10+
import os
1011
import warnings
1112
from types import GeneratorType
1213

13-
import pyexcel_io.constants as constants
14+
from pyexcel_io._compact import isstream, PY2
1415
from pyexcel_io.plugins import READERS, WRITERS
15-
from pyexcel_io._compact import PY2, isstream
16+
from pyexcel_io.exceptions import NoSupportingPluginFound
1617

1718

1819
def iget_data(afile, file_type=None, **keywords):
@@ -166,7 +167,15 @@ def load_data(
166167
except AttributeError:
167168
raise Exception("file_name should be a string type")
168169

169-
reader = READERS.get_a_plugin(file_type, library)
170+
try:
171+
reader = READERS.get_a_plugin(file_type, library)
172+
except NoSupportingPluginFound:
173+
if file_name:
174+
if not os.path.exists(file_name):
175+
raise IOError("%s does not exist" % file_name)
176+
else:
177+
raise
178+
170179
if file_name:
171180
reader.open(file_name, **keywords)
172181
elif file_content:

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929

3030
NAME = 'pyexcel-io'
3131
AUTHOR = 'C.W.'
32-
VERSION = '0.5.16'
33-
EMAIL = 'wangc_2011@hotmail.com'
32+
VERSION = '0.6.0'
33+
EMAIL = 'info@pyexcel.org'
3434
LICENSE = 'New BSD'
3535
DESCRIPTION = (
3636
'A python library to read and write structured data in csv, zipped csv' +
3737
'format and to/from databases'
3838
)
3939
URL = 'https://github.com/pyexcel/pyexcel-io'
40-
DOWNLOAD_URL = '%s/archive/0.5.16.tar.gz' % URL
40+
DOWNLOAD_URL = '%s/archive/0.5.17.tar.gz' % URL
4141
FILES = ['README.rst', 'CHANGELOG.rst']
4242
KEYWORDS = [
4343
'python',
@@ -81,8 +81,8 @@
8181
# You do not need to read beyond this line
8282
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
8383
sys.executable)
84-
GS_COMMAND = ('gs pyexcel-io v0.5.16 ' +
85-
"Find 0.5.16 in changelog for more details")
84+
GS_COMMAND = ('gs pyexcel-io v0.5.17 ' +
85+
"Find 0.5.17 in changelog for more details")
8686
NO_GS_MESSAGE = ('Automatic github release is disabled. ' +
8787
'Please install gease to enable it.')
8888
UPLOAD_FAILED_MSG = (

tests/test_io.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ def test_force_file_type():
2323
eq_(expected, data[test_file])
2424

2525

26+
@raises(IOError)
27+
def test_invalid_file():
28+
load_data('/something/does/not/exist')
29+
30+
2631
@raises(IOError)
2732
def test_no_valid_parameters():
2833
load_data()
@@ -83,7 +88,7 @@ def test_write_xlsx_data_to_memory():
8388
eq_(str(e), msg)
8489

8590

86-
@raises(exceptions.NoSupportingPluginFound)
91+
@raises(IOError)
8792
def test_load_unknown_data():
8893
get_data("test.unknown")
8994

@@ -108,11 +113,6 @@ def test_write_xlsx_data():
108113
get_data("test.xlsx")
109114

110115

111-
@raises(exceptions.NoSupportingPluginFound)
112-
def test_write_unknown_data():
113-
get_data("test.unknown")
114-
115-
116116
@raises(Exception)
117117
def test_writer_csvz_data_from_memory():
118118
if not PY2:

0 commit comments

Comments
 (0)
0