pyexcel / pyexcel-io

One interface to read and write the data in various excel formats, import the data into and export the data from databases
http://io.pyexcel.org
Other
58 stars 20 forks source link

Correctly handle filenames that contain "." prior to the extension. #116

Open ShaheedHaque opened 7 months ago

ShaheedHaque commented 7 months ago

Resolves #115.

Tests pass with one warning:

......../main/srhaque/kdedev/pyexcel-io/pyexcel_io/book.py:32: UserWarning: Deprecated since v0.6.0! Although backward compatibility is preserved, it is recommended to upgrade to get new features.
  warnings.warn(DEPRECATED_SINCE_0_6_0)
....................................................................Exception ignored in: <function ZipFile.__del__ at 0x7f21e88976a0>
Traceback (most recent call last):
  File "/usr/lib/python3.11/zipfile.py", line 1874, in __del__
    self.close()
  File "/usr/lib/python3.11/zipfile.py", line 1892, in close
    self._write_end_record()
  File "/usr/lib/python3.11/zipfile.py", line 1986, in _write_end_record
    self.fp.write(endrec)
TypeError: string argument expected, got 'bytes'
................./main/srhaque/kdedev/pyexcel-io/pyexcel_io/io.py:85: UserWarning: Please use iget_data instead
  warnings.warn("Please use iget_data instead")
........................................................................................................................................
Name                                          Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------
pyexcel_io/__init__.py                            9      0   100%
pyexcel_io/_compact.py                           22      6    73%   17-21, 35-37
pyexcel_io/book.py                              108     46    57%   45, 53, 59, 64, 67, 88-89, 98-109, 120-121, 127-136, 142-148, 154-157, 163-169, 194-195, 206, 210, 216-222
pyexcel_io/constants.py                          43      0   100%
pyexcel_io/database/__init__.py                   3      0   100%
pyexcel_io/database/common.py                    91      0   100%
pyexcel_io/database/exporters/__init__.py         0      0   100%
pyexcel_io/database/exporters/django.py          20      0   100%
pyexcel_io/database/exporters/queryset.py        12      0   100%
pyexcel_io/database/exporters/sqlalchemy.py      22      0   100%
pyexcel_io/database/importers/__init__.py         0      0   100%
pyexcel_io/database/importers/django.py          49      0   100%
pyexcel_io/database/importers/sqlalchemy.py      60      1    98%   73
pyexcel_io/database/querysets.py                 44      2    95%   65-66
pyexcel_io/exceptions.py                          8      0   100%
pyexcel_io/io.py                                113      2    98%   197, 217
pyexcel_io/manager.py                            34      1    97%   76
pyexcel_io/plugin_api/__init__.py                 3      0   100%
pyexcel_io/plugin_api/abstract_reader.py         10      0   100%
pyexcel_io/plugin_api/abstract_sheet.py          17      0   100%
pyexcel_io/plugin_api/abstract_writer.py         11      0   100%
pyexcel_io/plugins.py                           111     16    86%   44-50, 59-65, 123-124, 128-129, 137-139, 178-179, 218-220
pyexcel_io/reader.py                             69      2    97%   115, 118
pyexcel_io/readers/__init__.py                    2      0   100%
pyexcel_io/readers/csv_content.py                17      0   100%
pyexcel_io/readers/csv_in_file.py                38      0   100%
pyexcel_io/readers/csv_in_memory.py              41      0   100%
pyexcel_io/readers/csv_sheet.py                 108      2    98%   65, 79
pyexcel_io/readers/csvz.py                       39      0   100%
pyexcel_io/service.py                           115      3    97%   91-92, 198
pyexcel_io/sheet.py                              79      2    97%   90, 175
pyexcel_io/utils.py                              33      0   100%
pyexcel_io/writer.py                             27      0   100%
pyexcel_io/writers/__init__.py                    2      0   100%
pyexcel_io/writers/csv_in_file.py                20      0   100%
pyexcel_io/writers/csv_in_memory.py              17      0   100%
pyexcel_io/writers/csv_sheet.py                  40      0   100%
pyexcel_io/writers/csvz_sheet.py                 16      0   100%
pyexcel_io/writers/csvz_writer.py                20      0   100%
---------------------------------------------------------------------------
TOTAL                                          1473     83    94%
----------------------------------------------------------------------
Ran 229 tests in 1.201s

OK

With your PR, here is a check list: