tabula-py 2.9.1__tar.gz → 2.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. tabula_py-2.9.2/.github/FUNDING.yml +2 -0
  2. {tabula_py-2.9.1 → tabula_py-2.9.2}/.github/ISSUE_TEMPLATE/Bug_report.yaml +9 -1
  3. {tabula_py-2.9.1 → tabula_py-2.9.2}/PKG-INFO +1 -1
  4. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/backend.py +1 -1
  5. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/util.py +6 -5
  6. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula_py.egg-info/PKG-INFO +1 -1
  7. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/test_read_pdf_table.py +9 -0
  8. tabula_py-2.9.1/.github/FUNDING.yml +0 -2
  9. {tabula_py-2.9.1 → tabula_py-2.9.2}/.github/CONTRIBUTING.md +0 -0
  10. {tabula_py-2.9.1 → tabula_py-2.9.2}/.github/ISSUE_TEMPLATE/Custom.md +0 -0
  11. {tabula_py-2.9.1 → tabula_py-2.9.2}/.github/ISSUE_TEMPLATE/Feature_request.yaml +0 -0
  12. {tabula_py-2.9.1 → tabula_py-2.9.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  13. {tabula_py-2.9.1 → tabula_py-2.9.2}/.github/workflows/pythonpublish.yml +0 -0
  14. {tabula_py-2.9.1 → tabula_py-2.9.2}/.github/workflows/pythontest.yml +0 -0
  15. {tabula_py-2.9.1 → tabula_py-2.9.2}/.gitignore +0 -0
  16. {tabula_py-2.9.1 → tabula_py-2.9.2}/.pre-commit-config.yaml +0 -0
  17. {tabula_py-2.9.1 → tabula_py-2.9.2}/LICENSE +0 -0
  18. {tabula_py-2.9.1 → tabula_py-2.9.2}/MANIFEST.in +0 -0
  19. {tabula_py-2.9.1 → tabula_py-2.9.2}/README.md +0 -0
  20. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/Makefile +0 -0
  21. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/conf.py +0 -0
  22. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/contributing.rst +0 -0
  23. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/faq.rst +0 -0
  24. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/getting_started.rst +0 -0
  25. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/index.rst +0 -0
  26. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/make.bat +0 -0
  27. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/tabula.errors.rst +0 -0
  28. {tabula_py-2.9.1 → tabula_py-2.9.2}/docs/tabula.rst +0 -0
  29. {tabula_py-2.9.1 → tabula_py-2.9.2}/example.png +0 -0
  30. {tabula_py-2.9.1 → tabula_py-2.9.2}/examples/data.pdf +0 -0
  31. {tabula_py-2.9.1 → tabula_py-2.9.2}/examples/data.tabula-template.json +0 -0
  32. {tabula_py-2.9.1 → tabula_py-2.9.2}/examples/tabula_example.ipynb +0 -0
  33. {tabula_py-2.9.1 → tabula_py-2.9.2}/examples/test.csv +0 -0
  34. {tabula_py-2.9.1 → tabula_py-2.9.2}/examples/test.json +0 -0
  35. {tabula_py-2.9.1 → tabula_py-2.9.2}/examples/test.tsv +0 -0
  36. {tabula_py-2.9.1 → tabula_py-2.9.2}/noxfile.py +0 -0
  37. {tabula_py-2.9.1 → tabula_py-2.9.2}/pyproject.toml +0 -0
  38. {tabula_py-2.9.1 → tabula_py-2.9.2}/readthedocs.yaml +0 -0
  39. {tabula_py-2.9.1 → tabula_py-2.9.2}/setup.cfg +0 -0
  40. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/__init__.py +0 -0
  41. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/errors/__init__.py +0 -0
  42. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/file_util.py +0 -0
  43. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/io.py +0 -0
  44. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/py.typed +0 -0
  45. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/tabula-1.0.5-jar-with-dependencies.jar +0 -0
  46. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula/template.py +0 -0
  47. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula_py.egg-info/SOURCES.txt +0 -0
  48. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula_py.egg-info/dependency_links.txt +0 -0
  49. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula_py.egg-info/requires.txt +0 -0
  50. {tabula_py-2.9.1 → tabula_py-2.9.2}/tabula_py.egg-info/top_level.txt +0 -0
  51. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/12s0324.pdf +0 -0
  52. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/MultiColumn.csv +0 -0
  53. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/MultiColumn.pdf +0 -0
  54. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/campaign_donors.csv +0 -0
  55. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/campaign_donors.pdf +0 -0
  56. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data.pdf +0 -0
  57. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data.tabula-template.json +0 -0
  58. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_1-3.csv +0 -0
  59. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_1.csv +0 -0
  60. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_1.json +0 -0
  61. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_1.tsv +0 -0
  62. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_2-3.csv +0 -0
  63. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_dtype.pdf +0 -0
  64. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_dtype.tabula-template.json +0 -0
  65. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_dtype_expected.csv +0 -0
  66. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/resources/data_dtype_template_expected.csv +0 -0
  67. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/test_read_pdf_jar_path.py +0 -0
  68. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/test_read_pdf_silent.py +0 -0
  69. {tabula_py-2.9.1 → tabula_py-2.9.2}/tests/test_util.py +0 -0
@@ -0,0 +1,2 @@
1
+ github: chezou
2
+ buy_me_a_coffee: chezou
@@ -1,7 +1,7 @@
1
1
  name: Bug report
2
2
  description: File a bug report
3
3
  title: "[BUG] <title>"
4
- labels: ["bug", "triage"]
4
+ labels: ["triage"]
5
5
  body:
6
6
  - type: input
7
7
  id: summary
@@ -19,6 +19,14 @@ body:
19
19
  options:
20
20
  - label: I have read the FAQ
21
21
  required: true
22
+ - type: checkboxes
23
+ id: issues
24
+ attributes:
25
+ label: Did you search GitHub issues?
26
+ description: Please search the [discussions](https://github.com/chezou/tabula-py/issues)
27
+ options:
28
+ - label: I have searched the issues
29
+ required: true
22
30
  - type: checkboxes
23
31
  id: discussions
24
32
  attributes:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tabula-py
3
- Version: 2.9.1
3
+ Version: 2.9.2
4
4
  Summary: Simple wrapper for tabula-java, read tables from PDF into DataFrame
5
5
  Author-email: Aki Ariga <chezou@gmail.com>
6
6
  Maintainer-email: Aki Ariga <chezou@gmail.com>
@@ -54,7 +54,7 @@ class TabulaVm:
54
54
 
55
55
  except (ModuleNotFoundError, ImportError) as e:
56
56
  logger.warning(
57
- "Error importing jpype dependencies. Fallback to subprocess."
57
+ "Failed to import jpype dependencies. Fallback to subprocess."
58
58
  )
59
59
  logger.warning(e)
60
60
  self.tabula = None
@@ -9,7 +9,7 @@ import platform
9
9
  import shlex
10
10
  from dataclasses import dataclass
11
11
  from logging import getLogger
12
- from typing import IO, Iterable, List, Optional, Union, cast
12
+ from typing import IO, Iterable, List, Optional, Sequence, Union, cast
13
13
 
14
14
  logger = getLogger(__name__)
15
15
 
@@ -115,8 +115,9 @@ class TabulaOption:
115
115
  Password to decrypt document. Default: empty
116
116
  silent (bool, optional):
117
117
  Suppress all stderr output.
118
- columns (iterable, optional):
119
- X coordinates of column boundaries.
118
+ columns (Sequence, optional):
119
+ X coordinates of column boundaries. Must be sorted and of a datatype that
120
+ preserves order, e.g. tuple or list
120
121
 
121
122
  Example:
122
123
  ``[10.1, 20.2, 30.3]``
@@ -147,7 +148,7 @@ class TabulaOption:
147
148
  stream: bool = False
148
149
  password: Optional[str] = None
149
150
  silent: Optional[bool] = None
150
- columns: Optional[Iterable[float]] = None
151
+ columns: Optional[Sequence[float]] = None
151
152
  relative_columns: bool = False
152
153
  format: Optional[str] = None
153
154
  batch: Optional[str] = None
@@ -235,7 +236,7 @@ class TabulaOption:
235
236
  __options += ["--outfile", self.output_path]
236
237
 
237
238
  if self.columns:
238
- if self.columns != sorted(self.columns):
239
+ if list(self.columns) != sorted(self.columns):
239
240
  raise ValueError("columns option should be sorted")
240
241
 
241
242
  __columns = _format_with_relative(self.columns, self.relative_columns)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tabula-py
3
- Version: 2.9.1
3
+ Version: 2.9.2
4
4
  Summary: Simple wrapper for tabula-java, read tables from PDF into DataFrame
5
5
  Author-email: Aki Ariga <chezou@gmail.com>
6
6
  Maintainer-email: Aki Ariga <chezou@gmail.com>
@@ -91,6 +91,15 @@ class TestReadPdfTable(unittest.TestCase):
91
91
  )[0].equals(pd.read_csv(expected_csv))
92
92
  )
93
93
 
94
+ def test_read_pdf_with_tuple_columns(self):
95
+ pdf_path = "tests/resources/campaign_donors.pdf"
96
+ expected_csv = "tests/resources/campaign_donors.csv"
97
+ self.assertTrue(
98
+ tabula.read_pdf(
99
+ pdf_path, columns=(47, 147, 256, 310, 375, 431, 504), guess=False
100
+ )[0].equals(pd.read_csv(expected_csv))
101
+ )
102
+
94
103
  def test_read_pdf_with_relative_columns(self):
95
104
  pdf_path = "tests/resources/campaign_donors.pdf"
96
105
  expected_csv = "tests/resources/campaign_donors.csv"
@@ -1,2 +0,0 @@
1
- github: chezou
2
- patreon: chezou
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes