Commit Graph

57 Commits (fix-25)

Author SHA1 Message Date
Dimiter Naydenov 0f8cda4793
Merge pull request #5 from camelot-dev/fix-cli-group-name
[MRG] No need to monkey-patch Click.HelpFormatter
2019-07-04 18:26:35 +03:00
Dimiter Naydenov 13616c2fb4 No need to monkey-patch Click.HelpFormatter 2019-07-04 13:13:32 +03:00
Dimiter Naydenov 240ea6c411 Fixed strip_text argument getting ignored 2019-07-04 12:12:52 +03:00
Vinayak Mehta 8866eaa3b6 Fix pytest deprecation warning 2019-07-03 22:07:10 +05:30
Vinayak Mehta 477568dea7 Fix test 2019-05-27 22:29:50 +05:30
Vinayak Mehta de3281c1b6 Add test 2019-05-27 22:18:23 +05:30
Vinayak Mehta 88466b8c4e
Rename _mk_table to _make_table 2019-03-08 21:04:34 +05:30
Sym Roe c019e582bf
Add __lt__ to Table to allow sorting
Refs #277
2019-02-25 09:20:09 +00:00
Vinayak Mehta ab5391c76f Merge branch 'master' of github.com:socialcopsdev/camelot into replace-gs-c-api 2019-01-05 11:22:38 +05:30
Vinayak Mehta d064f716e9 Add lattice test 2019-01-04 20:22:14 +05:30
Vinayak Mehta 03f301b25c Add table regions support 2019-01-04 19:17:54 +05:30
Vinayak Mehta 605ffdd444 Add test 2019-01-03 16:13:41 +05:30
Vinayak Mehta 859610e0dc Add pages test 2019-01-02 16:35:49 +05:30
Vinayak Mehta 2b3461deab Add support to read from url 2018-12-24 12:55:52 +05:30
Vinayak Mehta 27fa226c71 Fix merge conflict 2018-12-22 11:07:24 +05:30
Vinayak Mehta be1f0a2884 Update advanced docs 2018-12-21 16:32:44 +05:30
Vinayak Mehta 50b4468aff Rename kwargs and add tests 2018-12-21 15:09:37 +05:30
Vinayak Mehta a38d52c7b2 Fix plot tests 2018-12-20 15:44:28 +05:30
Vinayak Mehta 17d48be46e Add test 2018-12-19 18:31:54 +05:30
Vinayak Mehta 4938c48853 Remove _errors and ghostscript test 2018-12-18 07:43:52 +05:30
Vinayak Mehta d83d5fae42 Fix tests
Fix tests
2018-12-13 16:06:48 +05:30
Vinayak Mehta ff4d8ce228 Add test for arabic 2018-12-13 13:13:07 +05:30
Vinayak Mehta 591cfd5291 Change kwarg name 2018-12-12 10:15:04 +05:30
Vinayak Mehta e50f9c8847 Change suppress_warnings to verbose 2018-12-12 09:58:34 +05:30
Vinayak Mehta b56d2246ad Add new plot type tests 2018-12-12 08:09:52 +05:30
Vinayak Mehta 619ce2e2a4 Fix grid plot baseline image 2018-12-07 20:22:56 +05:30
Vinayak Mehta 1f71513004 Fix no table found warning and add tests for two tables 2018-11-23 19:28:55 +05:30
Vinayak Mehta bf894116d2 Update test data 2018-11-23 04:25:04 +05:30
Vinayak Mehta db3f8c6897
[MRG] Make matplotlib optional (#190)
* Rename png files

* Convert plot to PlotMethods class and update docs

* Update test

* Update setup.py and docs

* Refactor PlotMethods

* Make matplotlib optional

* Raise ImportError in cli
2018-11-02 23:16:03 +05:30
Suyash Behera c0e9235164 [MRG + 1] Create a new figure and test each plot type #127 (#179)
* [MRG] Create a new figure and test each plot type #127

 - move `plot()` to `plotting.py` as `plot_pdf()`
 - modify plotting functions to return matplotlib figures
 - add `test_plotting.py` and baseline images
 - import `plot_pdf()` in `__init__`
 - update `cli.py` to use `plot_pdf()`
 - update advanced usage docs to reflect changes

* Change matplotlib backend for image comparison tests

* Update plotting and tests
 - use matplotlib rectangle instead of `cv2.rectangle` in
`plot_contour()`
 - set matplotlib backend in `tests/__init__`
 - update contour plot baseline image
 - update `test_plotting` with more checks

* Update plot tests and config
 - remove unnecessary asserts
 - update setup.cfg and makefile with `--mpl`

* Add  to

* Add tolerance

* remove text from baseline plots
update plot tests with `remove_text`

* Change method name, update docs and add pep8

* Update docs
2018-11-02 20:57:02 +05:30
rbares 429640feea [MRG + 1] Add basic support for encrypted PDF files (#180)
* [MRG] Add basic support for encrypted PDF files

Update API and CLI to accept ASCII passwords to decrypt PDFs
encrypted by algorithm code 1 or 2 (limited by support from PyPDF2).
Update documentation and unit tests accordingly.

Example document health_protected.pdf generated as follows:
qpdf --encrypt userpass ownerpass 128 -- health.pdf health_protected.pdf

Issue #162

* Support encrypted PDF files in python3

Issue #162

* Address review comments

Explicitly check passwords for None rather than falsey.
Correct read_pdf documentation for Owner/User password.

Issue #162

* Correct API documentation changes for consistency

Issue #162

* Move error tests from test_common to test_errors

Issue #162

* Add qpdf example

* Remove password is not None check

* Fix merge conflict

* Fix pages example
2018-10-28 22:01:10 +05:30
Parth P Panchal 32df09ad1c Renames the keyword `table_area` to `table_areas` (#171)
`table_areas` sounds more apt since it is a list and there can be
multiple table areas on a page.

Closes #165
2018-10-24 23:06:53 +05:30
Vinayak Mehta a78ef7f841
[MRG] Use find_executable for gs and raise error if not found (#166)
* Use find_executable for gs and raise error if not found

* Remove unused variable

* Add test

* Use pytest monkeypatch
2018-10-23 21:12:43 +05:30
Parth P Panchal 61963aabb6 [MRG + 1] Add __main__ (#159)
* Renames camelot.cli to camelot.__main__

Closes #154

* Keep __main__ and cli separate

* Monkey patch click HelpFormatter
2018-10-23 15:01:20 +05:30
Jonathan Lloyd 60c1270745 Fix typo in test name (#160)
test_no_tables_found_warnings_supressed -> test_no_tables_found_warnings_suppressed
2018-10-23 04:54:57 +05:30
Jonathan Lloyd 3def4a5aea [MRG + 1] Add suppress_warnings flag (#155)
* Add suppress_warnings flag

* Add --quiet flag to cli (to suppress warnings)

* Remove TODO and update comment
2018-10-19 16:55:00 +05:30
Vaibhav Mule c53ea795fd [MRG + 1] Add tests for repr (#128)
* add tests for repr

* remove repr for Cell

* add round for repr of Cell

* change decimal places to 2

* change tests for 2 decimal places
2018-10-05 20:19:24 +05:30
Oshawk 90aaba6eec [MRG + 1] Make pep8 (#125)
* Make setup.py pep8

Add new line at end of file, fix bare except, remove unused import.

* Make tests/*.py pep8

Add some newlines at and of files and a visual indent.

* Make docs/*.py pep8

Fix block comments and add new lines at end of files.

* Make camelot/*.py pep8

Fixed unused import, a few weirdly ordered imports, a docstring typo and  many new lines at the end of lines.

* Fix imports

Fix import order and remove a couple more unused imports.

* Fix indents

Fix indentation (no opening delimiter alignment).

* Add newlines
2018-10-05 16:55:43 +05:30
Vinayak Mehta 6e8079df84
[MRG] Add tests for output formats and parser kwargs (#126)
* Remove unused image processing code

* Add opencv back-compat comment

* Add tests for parser special cases

* Fix lattice table area test

* Add tests for output format

* Add openpyxl dep
2018-10-05 16:15:30 +05:30
Vaibhav Mule 58eddd0804 [MRG + 1] Test UsageError for CLI (#122)
* add .vscode

* add tests for UsageError

* fix pep8
2018-10-04 22:01:20 +05:30
Vinayak Mehta 2a1d21af32
Add CLI tests (#117) 2018-10-03 01:09:08 +05:30
Vinayak Mehta 9537143fe0 Add pytest-cov
Add fix for coverage

Add source and omit to coveragerc

Update coveragerc

Update coveragerc

Add source to coveragerc

Update coveragerc source

Add init to tests

Fix ImportError

Fix ImportError again
2018-10-02 22:37:38 +05:30
Vinayak Mehta c5bde5e2ad
[MRG] Add error/warning tests (#113)
* Add unknown flavor test

* Add input kwargs test

* Remove unused utils

* Add unsupported format test

* Add stream unequal tables-columns length test

* Add python3 compat

* Add no tables found test

* Convert util info log to warning
2018-10-02 19:28:42 +05:30
Vinayak Mehta fc0542bd3c
Add Python 3 compatibility (#109)
* Add python3 compat

* Update .gitignore

* Update .gitignore again

* Remove debugging return

* Add unicode_literals import

* Bump version

* Add python3-tk note
2018-09-28 21:58:29 +05:30
Vinayak Mehta be2733ebd2 Add utf8 header 2018-09-24 16:27:26 +05:30
Vinayak Mehta 3170a9689f Add flavors 2018-09-23 10:53:32 +05:30
Vinayak Mehta 7c3e531b07 Port tests 2018-09-09 05:29:24 +05:30
Vinayak Mehta c4d3cac4fb Move tests into one file 2018-09-08 21:54:02 +05:30
Vinayak Mehta e0b55f0693 Remove examples and debug, restructure tests dir 2018-09-08 18:38:59 +05:30
Vinayak Mehta adb948d363 Fix column parameter 2016-10-13 16:54:45 +05:30