842 Commits

Author SHA1 Message Date
Benito López
fdd4e7cd01
Merge branch 'master' into pr#554_pytest_printers 2023-10-27 12:34:05 +02:00
belono
34cd71df2d Extend cups tests 2023-10-27 12:15:32 +02:00
belono
97912daf8c Include more tests to cups 2023-10-26 23:39:59 +02:00
belono
5b6be2bb2d Replace wrong exception in cups 2023-10-26 20:45:29 +02:00
belono
a97502fe45 Replace general exceptions in win32raw 2023-10-26 20:08:16 +02:00
belono
4f05109fd1 Include test _raw methods to win32raw 2023-10-26 19:35:28 +02:00
dependabot[bot]
e7dd97554c
Bump werkzeug from 2.3.4 to 3.0.1 in /examples/docker-flask (#588)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.3.4 to 3.0.1.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/2.3.4...3.0.1)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 18:55:56 +02:00
belono
18e1040f67 Include win32raw close_on_reopen test 2023-10-25 23:48:01 +02:00
belono
504af10718 Fix win32raw failing tests (maybe) 2023-10-25 22:58:34 +02:00
belono
5daf3efa30 Cancel close only if literal False|None _device 2023-10-25 22:45:46 +02:00
belono
363d322265 Fix failing LP tests 2023-10-22 22:31:32 +02:00
belono
a48e0f2f23 Fix conftest import formatting 2023-10-22 21:08:52 +02:00
belono
3fb5ce27a1 Test the 'printers' property 2023-10-22 19:06:41 +02:00
belono
5019b88430 Add test_printer_win32raw.py 2023-10-22 17:17:01 +02:00
belono
dd8aa8c7b1 Add test_printer_cups.py 2023-10-22 16:58:03 +02:00
belono
7c063dc5c6 Add test_printer_lp.py 2023-10-22 16:46:42 +02:00
belono
7650912e15 Add test_printer_usb.py 2023-10-22 14:39:30 +02:00
belono
33c23abbb6 Add test_printer_serial.py 2023-10-22 14:23:47 +02:00
belono
dae5e68c2d Add test_printer_network.py 2023-10-22 14:05:53 +02:00
belono
6b951e0fe3 Include a close_on_reopen test 2023-10-22 13:44:04 +02:00
belono
d6b146102c Remove old broken printer tests 2023-10-22 12:45:38 +02:00
belono
bab7c2d1e5 Add test_printer_file.py 2023-10-22 12:44:40 +02:00
belono
32cc334dd1 Add fixtures 2023-10-22 12:44:06 +02:00
Benito López
425d3d209f
Update capabilities data (#586) 2023-10-18 13:20:08 +02:00
Benito López
a00b98937b
Separate method open() and constructor, enhance consistency between connectors. (#584)
* Add self-open mechanism
* self-open mechanism through the 'device' property
* Separate open() and store connection in 'device'
* Restore device status to False on close()
* Add default value to all params + type annotations
* Add generic DeviceNotFoundError exception
* Update USBNotFoundError return code
* Enhance connectors consistency
* Fix LP printer stall
* Fix LP waste of paper due to auto-flush + flush on close
* Move platform dependent printers' guard to init

---------

Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
2023-10-16 11:36:07 +02:00
Patrick Kanzler
3a8af8a6f5
switch to python 3.12 (#582)
* switch to python 3.12
* 3.11 on RTD
* fix SyntaxWarning (regex strings were invalid partially)
2023-10-09 00:13:39 +02:00
Patrick Kanzler
e4f4844983
add action for windows build (#581)
* copy action for windows
* exclude cups on windows
* update changelog
2023-10-08 23:27:37 +02:00
Patrick Kanzler
a70e1604d6
Magic encoder: fix codepage usage (#580)
* add unit test for issue pointed out by @scott-r in #570

* swap order of encoder search

As described by @scott-r in
Magic encoder does not use
previously used code pages
when possible #570
Thank you!
2023-10-05 14:55:12 +02:00
Patrick Kanzler
5018f7f377
add checkpoint to release checklist for changelog (#578) 2023-10-05 14:22:21 +02:00
Patrick Kanzler
ecfeeb9b13
Improve diagnostic output (#577)
* add extended version information

* autodocument argparser

* add spelling exception

* fix docstrings

* add annotations

* use typing types

* add test
2023-10-05 14:15:19 +02:00
dependabot[bot]
ba0167f1fd
Bump pillow from 9.5.0 to 10.0.1 in /examples/docker-flask (#576)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.5.0 to 10.0.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.5.0...10.0.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 08:44:44 +02:00
dependabot[bot]
87e488ce11
Bump actions/setup-python from 4.7.0 to 4.7.1 (#575)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.7.0...v4.7.1)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 20:10:41 +02:00
Patrick Kanzler
6d0c475b9a
refactor set method (#547)
* add type annotations
* Update setup.cfg
* improve mypy and test config
* get_profile_class returns a baseProfile
* mute mypy type issue
* add set_with_default
* docstring
* add test for empty call
* correct type annotations in set_with_default
* improve tests
* test for exception
* sort with isort
* add default value to get call
* empty string has the same effect: will not be found --> None
* add mypy test to workflow
* explicitely call mypy
* update spelling
2023-09-19 07:51:39 +02:00
Patrick Kanzler
adcde8abda
Install types-pywin32 for mypy (#568) 2023-09-17 23:39:16 +02:00
Patrick Kanzler
89aaae0186
get mypy configuration change from #547 (#567) 2023-09-17 23:24:16 +02:00
Patrick Kanzler
f3ee049ee1
Update spelling_wordlist.txt (#566)
* Update spelling_wordlist.txt

* update apt
2023-09-17 23:00:38 +02:00
Patrick Kanzler
cfa9ecf16d
Enable spell checking (#563)
* add spellchecking

* improve spelling

* improve spelling config

* extend word list

* improve spelling

* improve spelling

* escalate warning in spell check to failure

* fix spelling

* fix spelling

* add plural

* Update doc/spelling_wordlist.txt

* do not stop on warning

* require newest sphinxcontrib spelling

* remove old comment

* add authors as single line entry to spelling list

* reenable stop on warning
2023-09-07 22:08:31 +02:00
Patrick Kanzler
8f07c1da0f
isort imports on save (#564) 2023-09-06 23:42:01 +02:00
Patrick Kanzler
24217756f7
558 improve capabilities handling (#562)
* add handling for missing capabilities file

* improve documentation

* Update doc/user/installation.rst
2023-09-06 00:05:38 +02:00
dependabot[bot]
e3e1500d35
Bump actions/checkout from 3 to 4 (#561)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 13:07:02 +02:00
Patrick Kanzler
44444f3c51
Maintenance: fix read the docs and some annotations (#557) 2023-09-03 09:57:56 +02:00
Patrick Kanzler
c7c01cdbff
fix rtd theme (#553)
* use rtd_theme

* add types for serial

* annotate types where possible

* fix imports
2023-08-25 01:19:23 +02:00
dependabot[bot]
6c49e4a057
Bump sphinx-rtd-theme from 1.2.2 to 1.3.0 (#550) 2023-08-24 21:30:22 +00:00
Benito López
f23bcacabe
fix typo in lp connector (#548) 2023-08-24 23:17:34 +02:00
Patrick Kanzler
c11d192e65
Fix import issues with qrcode in sphinx 7.2 (#552)
* 7.2 introduces the issue

* mock module qrcode for documentation build

This prevents issues with sphinx 7.2
2023-08-24 23:02:33 +02:00
Patrick Kanzler
3177c8d411
split off dependencies for optional installation (#546)
* add inheritance diagrams to all printers and exceptions
* split off printer implementations into separate files
* add wrapper that thros RuntimeError if not importable
* add dependency check for lp
* add dependency check for pyserial
* added check for usability
* import Win32Raw
* include WIn32Raw in documentation
* enable all extras on tox
* update github workflow
2023-08-17 01:37:50 +02:00
Patrick Kanzler
fbabd8ed88
Drop Py37, improve typing and docstrings (#544)
Drops Py3.7, improves typing and adds a mypy config, improves the docstrings and isorts the imports.

* configure isort
* sort with isort
* add github action
* enable flake8-docstrings
* fix docstrings
* add mypy env
* no implicit optional
* add type for raw
* add some type hints
2023-08-15 01:03:36 +02:00
Patrick Kanzler
2b62c8e28d
modernize and cleanup documentation (#542)
* disable system packages on rtd

* install pycups on rtd

* enable cups binding in documentation

* document CupsPrinter

* fix formatting

* revise methods and installation

* revise user/printers

* revise raspi section

* further revise
2023-08-10 01:38:47 +02:00
Patrick Kanzler
4c2dcdfac6
Clean up tests and migrate (#540)
* migrate
  * abstract base class test
  * remove assert_equal in test_cli
  * remove nose from test_cli
  * remove nose dependencies
  * use tempfile
* configure coverage
  * flag python version in name
  * enable comment
* drop EOL py37
2023-08-10 00:18:02 +02:00
Patrick Kanzler
31daabcbea
Improve documentation build (#539)
* use imgconverter
* enable pdf build with xelatex
* change heading levels
* restructure headings
* add chapter intro
* remove extensions from index
2023-08-09 00:52:01 +02:00