gotenberg-client 0.1.0__tar.gz → 0.2.0__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 (50) hide show
  1. gotenberg_client-0.2.0/.codecov.yml +4 -0
  2. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/CHANGELOG.md +13 -0
  3. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/PKG-INFO +2 -1
  4. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/README.md +1 -0
  5. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/pyproject.toml +2 -1
  6. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/__about__.py +1 -1
  7. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_client.py +2 -2
  8. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/conftest.py +1 -1
  9. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/test_merge.py +3 -2
  10. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/.editorconfig +0 -0
  11. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/.gitignore +0 -0
  12. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/.pre-commit-config.yaml +0 -0
  13. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/LICENSE +0 -0
  14. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/__init__.py +0 -0
  15. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_base.py +0 -0
  16. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_convert/__init__.py +0 -0
  17. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_convert/chromium.py +0 -0
  18. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_convert/common.py +0 -0
  19. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_convert/libre_office.py +0 -0
  20. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_convert/pdfa.py +0 -0
  21. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_health.py +0 -0
  22. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_merge.py +0 -0
  23. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_metrics.py +0 -0
  24. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_types_compat.py +0 -0
  25. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/_utils.py +0 -0
  26. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/options.py +0 -0
  27. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/src/gotenberg_client/py.typed +0 -0
  28. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/__init__.py +0 -0
  29. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/basic.html +0 -0
  30. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/complex.html +0 -0
  31. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/font.woff +0 -0
  32. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/footer.html +0 -0
  33. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/header.html +0 -0
  34. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/img.gif +0 -0
  35. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/markdown1.md +0 -0
  36. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/markdown2.md +0 -0
  37. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/markdown_index.html +0 -0
  38. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/sample.docx +0 -0
  39. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/sample.ods +0 -0
  40. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/sample.odt +0 -0
  41. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/sample.xlsx +0 -0
  42. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/sample1.pdf +0 -0
  43. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/samples/style.css +0 -0
  44. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/test_convert_chromium_html.py +0 -0
  45. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/test_convert_chromium_markdown.py +0 -0
  46. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/test_convert_chromium_url.py +0 -0
  47. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/test_convert_libre_office.py +0 -0
  48. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/test_convert_pdf_a.py +0 -0
  49. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/test_health.py +0 -0
  50. {gotenberg_client-0.1.0 → gotenberg_client-0.2.0}/tests/utils.py +0 -0
@@ -0,0 +1,4 @@
1
+ codecov:
2
+ require_ci_to_pass: true
3
+ comment:
4
+ require_changes: true
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.0] - 2023-10-16
9
+
10
+ ### Added
11
+
12
+ - CodeQL scanning via GitHub
13
+ - Codecov.io coverage shield
14
+
15
+ ### Changed
16
+
17
+ - Updated pypa/gh-action-pypi-publish from 1.8.8 to 1.8.10
18
+ - Updated actions/checkout from 3 to 4
19
+ - Mis-spelled `gotenerg_url` for a `Client` is now `host` and no longer keyword only
20
+
8
21
  ## [0.1.0] - 2023-10-15
9
22
 
10
23
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gotenberg-client
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: A Python client for interfacing with the Gotenberg API
5
5
  Project-URL: Documentation, https://github.com/stumpylog/gotenberg-client/#readme
6
6
  Project-URL: Issues, https://github.com/stumpylog/gotenberg-client/issues
@@ -34,6 +34,7 @@ Description-Content-Type: text/markdown
34
34
 
35
35
  [![PyPI - Version](https://img.shields.io/pypi/v/gotenberg-client.svg)](https://pypi.org/project/gotenberg-client)
36
36
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gotenberg-client.svg)](https://pypi.org/project/gotenberg-client)
37
+ [![codecov](https://codecov.io/gh/stumpylog/gotenberg-client/graph/badge.svg?token=PH25G91Q6J)](https://codecov.io/gh/stumpylog/gotenberg-client)
37
38
 
38
39
  ---
39
40
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![PyPI - Version](https://img.shields.io/pypi/v/gotenberg-client.svg)](https://pypi.org/project/gotenberg-client)
4
4
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gotenberg-client.svg)](https://pypi.org/project/gotenberg-client)
5
+ [![codecov](https://codecov.io/gh/stumpylog/gotenberg-client/graph/badge.svg?token=PH25G91Q6J)](https://codecov.io/gh/stumpylog/gotenberg-client)
5
6
 
6
7
  ---
7
8
 
@@ -65,6 +65,7 @@ dependencies = [
65
65
 
66
66
  [tool.hatch.envs.default.scripts]
67
67
  version = "python3 --version"
68
+ pip-list = "pip list"
68
69
  test = "pytest --pythonwarnings=all {args:tests}"
69
70
  test-cov = "coverage run -m pytest --pythonwarnings=all {args:tests}"
70
71
  cov-clear = "coverage erase"
@@ -76,13 +77,13 @@ cov-html = "coverage html"
76
77
  cov-json = "coverage json"
77
78
  cov = [
78
79
  "version",
80
+ "pip-list",
79
81
  "cov-clear",
80
82
  "test-cov",
81
83
  "cov-report",
82
84
  "cov-json",
83
85
  "cov-html"
84
86
  ]
85
- pip-list = "pip list"
86
87
 
87
88
  [[tool.hatch.envs.all.matrix]]
88
89
  python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2023-present Trenton H <rda0128ou@mozmail.com>
2
2
  #
3
3
  # SPDX-License-Identifier: MPL-2.0
4
- __version__ = "0.1.0"
4
+ __version__ = "0.2.0"
@@ -24,14 +24,14 @@ class GotenbergClient:
24
24
 
25
25
  def __init__(
26
26
  self,
27
+ host: str,
27
28
  *,
28
- gotenerg_url: str,
29
29
  timeout: float = 30.0,
30
30
  log_level: int = logging.ERROR,
31
31
  http2: bool = True,
32
32
  ):
33
33
  # Configure the client
34
- self._client = Client(base_url=gotenerg_url, timeout=timeout, http2=http2)
34
+ self._client = Client(base_url=host, timeout=timeout, http2=http2)
35
35
 
36
36
  # Set the log level
37
37
  logging.getLogger("httpx").setLevel(log_level)
@@ -20,5 +20,5 @@ if SAVE_OUTPUTS:
20
20
 
21
21
  @pytest.fixture()
22
22
  def client() -> GotenbergClient:
23
- with GotenbergClient(gotenerg_url=GOTENBERG_URL, log_level=logging.INFO) as client:
23
+ with GotenbergClient(host=GOTENBERG_URL, log_level=logging.INFO) as client:
24
24
  yield client
@@ -12,6 +12,7 @@ from gotenberg_client.options import PdfAFormat
12
12
  from tests.conftest import SAMPLE_DIR
13
13
  from tests.conftest import SAVE_DIR
14
14
  from tests.conftest import SAVE_OUTPUTS
15
+ from tests.utils import call_run_with_server_error_handling
15
16
 
16
17
 
17
18
  @pytest.fixture()
@@ -41,7 +42,7 @@ class TestMergePdfs:
41
42
  pike_format: str,
42
43
  ):
43
44
  with client.merge.merge() as route:
44
- resp = route.merge(create_files).pdf_format(gt_format).run()
45
+ resp = call_run_with_server_error_handling(route.merge(create_files).pdf_format(gt_format))
45
46
 
46
47
  assert resp.status_code == codes.OK
47
48
  assert "Content-Type" in resp.headers
@@ -63,7 +64,7 @@ class TestMergePdfs:
63
64
  create_files: List[Path],
64
65
  ):
65
66
  with client.merge.merge() as route:
66
- resp = route.merge(create_files).run()
67
+ resp = call_run_with_server_error_handling(route.merge(create_files))
67
68
 
68
69
  assert resp.status_code == codes.OK
69
70
  assert "Content-Type" in resp.headers