BjoernLudwigPTB/pyxml2pdf

View on GitHub
Merge pull request #13 from BjoernLudwigPTB/upgrade_package #217
Björn Ludwig authored 3f6e8bc1
complete00:00:24
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.json.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-bandit:b866
b866: Pulling from codeclimate/codeclimate-bandit
a0e0ef996968: Pulling fs layer
00c69949e211: Pulling fs layer
124b11ffd9dc: Pulling fs layer
74d262bd6915: Pulling fs layer
963a4e0e1415: Pulling fs layer
ea041886215a: Pulling fs layer
3bbf7ff90c63: Pulling fs layer
963a4e0e1415: Waiting
74d262bd6915: Waiting
ea041886215a: Waiting
3bbf7ff90c63: Waiting
00c69949e211: Verifying Checksum
00c69949e211: Download complete
124b11ffd9dc: Verifying Checksum
124b11ffd9dc: Download complete
a0e0ef996968: Verifying Checksum
a0e0ef996968: Download complete
a0e0ef996968: Pull complete
963a4e0e1415: Verifying Checksum
963a4e0e1415: Download complete
ea041886215a: Verifying Checksum
ea041886215a: Download complete
00c69949e211: Pull complete
124b11ffd9dc: Pull complete
3bbf7ff90c63: Verifying Checksum
3bbf7ff90c63: Download complete
74d262bd6915: Verifying Checksum
74d262bd6915: Download complete
74d262bd6915: Pull complete
963a4e0e1415: Pull complete
ea041886215a: Pull complete
3bbf7ff90c63: Pull complete
Digest: sha256:b831294279e697e4402c0bd94153247577b1e1297055bac81a8e2922b4dedba5
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-bandit:b866
docker pull codeclimate/codeclimate-radon:b695
b695: Pulling from codeclimate/codeclimate-radon
e00d546a75ad: Pulling fs layer
21f0a0866768: Pulling fs layer
cd9d3946aa16: Pulling fs layer
2e56add6654f: Pulling fs layer
6c87f215a2be: Pulling fs layer
c2b31566ca3d: Pulling fs layer
2e56add6654f: Waiting
c2b31566ca3d: Waiting
6c87f215a2be: Waiting
21f0a0866768: Verifying Checksum
21f0a0866768: Download complete
e00d546a75ad: Verifying Checksum
e00d546a75ad: Download complete
e00d546a75ad: Pull complete
6c87f215a2be: Download complete
21f0a0866768: Pull complete
cd9d3946aa16: Download complete
c2b31566ca3d: Verifying Checksum
c2b31566ca3d: Download complete
2e56add6654f: Download complete
cd9d3946aa16: Pull complete
2e56add6654f: Pull complete
6c87f215a2be: Pull complete
c2b31566ca3d: Pull complete
Digest: sha256:dfeb7edc634b4e2f851f3c788f7c21bd8bae097d4c66af722c76a6ba51121f98
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-radon:b695
docker pull codeclimate/codeclimate-sonar-python:b10
b10: Pulling from codeclimate/codeclimate-sonar-python
709515475419: Pulling fs layer
d1c225ed7c34: Pulling fs layer
887f300163b6: Pulling fs layer
a3ed95caeb02: Pulling fs layer
9b412187b352: Pulling fs layer
8fe915fa1948: Pulling fs layer
a3ed95caeb02: Waiting
65145a386a45: Pulling fs layer
9b412187b352: Waiting
a64dfb9c0f27: Pulling fs layer
59a464ab5a51: Pulling fs layer
47413513c002: Pulling fs layer
9f30da6d3676: Pulling fs layer
8fe915fa1948: Waiting
9f30da6d3676: Waiting
65145a386a45: Waiting
a64dfb9c0f27: Waiting
59a464ab5a51: Waiting
47413513c002: Waiting
d1c225ed7c34: Download complete
a3ed95caeb02: Download complete
709515475419: Verifying Checksum
709515475419: Download complete
709515475419: Pull complete
9b412187b352: Verifying Checksum
9b412187b352: Download complete
d1c225ed7c34: Pull complete
887f300163b6: Verifying Checksum
887f300163b6: Download complete
65145a386a45: Download complete
59a464ab5a51: Download complete
8fe915fa1948: Verifying Checksum
8fe915fa1948: Download complete
887f300163b6: Pull complete
a3ed95caeb02: Pull complete
9b412187b352: Pull complete
47413513c002: Verifying Checksum
47413513c002: Download complete
a64dfb9c0f27: Download complete
9f30da6d3676: Verifying Checksum
9f30da6d3676: Download complete
8fe915fa1948: Pull complete
65145a386a45: Pull complete
a64dfb9c0f27: Pull complete
59a464ab5a51: Pull complete
47413513c002: Pull complete
9f30da6d3676: Pull complete
Digest: sha256:7904831e83e5474cba8a95726a691787d74d669d74a8721f114057ebb4a8943d
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-sonar-python:b10
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-04-15T01:25:42.279236 #1]  INFO -- : Skipping file ./src/pyxml2pdf/main.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 16
    def _add_arguments() -> Dict[str, str]:
                         ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.279414 #1]  INFO -- : Skipping file ./src/pyxml2pdf/tables/builder.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 17
    self._table_style: XMLTableStyle = XMLTableStyle()
                     ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.291751 #1]  INFO -- : Skipping file ./src/pyxml2pdf/tables/tables.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 19
    def __init__(self, title: str, include_filters: List[List[str]]):
                            ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.307368 #1]  INFO -- : Skipping file ./src/pyxml2pdf/input/properties.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 20
    fallback_setting_name: str, fallback_setting_value: object
                         ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.322747 #1]  INFO -- : Skipping file ./src/pyxml2pdf/styles/table_styles.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 35
    FULL_ROW: Tuple[Tuple[int, int], Tuple[int, int]] = ((0, 0), (-1, -1))
            ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.333408 #1]  INFO -- : Skipping file ./src/pyxml2pdf/core/events.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 24
    _table_builder: TableBuilder = TableBuilder()
                  ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.339537 #1]  INFO -- : Skipping file ./src/pyxml2pdf/core/parser.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 20
    _elements: List[KeepTogether]
             ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.350307 #1]  INFO -- : Skipping file ./src/pyxml2pdf/core/initializer.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 29
    def __init__(self, input_path: str, output_path: str):
                                 ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.360374 #1]  INFO -- : Skipping file ./src/pyxml2pdf/core/rows.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 39
    _style: ParagraphStyle
          ^
SyntaxError: invalid syntax


I, [2024-04-15T01:25:42.371584 #1]  INFO -- : Skipping file ./src/pyxml2pdf/core/post_processor.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 17
    _full_output_path_: str
                      ^
SyntaxError: invalid syntax
7
bandit
bandit engine documentation
View output
[main]	INFO	profile include tests: None
[main]	INFO	profile exclude tests: None
[main]	INFO	cli include tests: None
[main]	INFO	cli exclude tests: None
[node_visitor]	INFO	Unable to find qualified name for module: setup.py
8
radon
radon engine documentation
View output
Running radon3...
9
sonar-python
sonar-python engine documentation
View output
INFO: Java 1.8.0_111-internal Oracle Corporation (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: Invalid character encountered in file '/code/src/pyxml2pdf/styles/fonts/LiberationSans-Italic.ttf' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/src/pyxml2pdf/styles/fonts/LiberationSans-Regular.ttf' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/src/pyxml2pdf/styles/fonts/LiberationSans-Bold.ttf' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: Invalid character encountered in file '/code/src/pyxml2pdf/styles/fonts/LiberationSans-BoldItalic.ttf' at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 44 files indexed
ERROR: Unable to parse file: /code/src/pyxml2pdf/tables/builder.py
ERROR: Parse error at line 17 column 25:

    9: 
   10: from ..input.properties import COLUMNS, SUBTABLE_SETTINGS                
   11: 
   12: 
   13: class TableBuilder:
   14:     """Takes over all tasks for building and working with the tables created"""
   15: 
   16:     def __init__(self):
  -->          self._table_style: XMLTableStyle = XMLTableStyle()
   18:         self._stylesheet: TableStyle = self._table_style.custom_styles["stylesheet"]
   19:         self._subtables: List[XMLTable]

ERROR: Unable to parse file: /code/src/pyxml2pdf/input/properties.py
ERROR: Parse error at line 29 column 8:

   15: 
   16: from . import custom_properties
   17: 
   18: 
   19: def _inform_about_fallback_setting(
   20:     fallback_setting_name: str, fallback_setting_value: object
   21: ):
   22:     """Inform user about the absence of a custom value for one of the settings"""
   23:     print(
   24:         f"No custom setting found for '{fallback_setting_name}', falling back to "
   25:         f"{fallback_setting_value}."
   26:     )
   27: 
   28: 
  -->  PAGESIZE: PageSize
   30: """The page size of the output Pdf in mm"""
   31: 
   32: try:
   33:     PAGESIZE = custom_properties.PAGESIZE                              
   34: except AttributeError:
   35:     PAGESIZE = (90.1, 84.3)
   36:     _inform_about_fallback_setting

ERROR: Unable to parse file: /code/src/pyxml2pdf/styles/table_styles.py
ERROR: Parse error at line 35 column 12:

   20: int, int], Tuple[int, int], Union[Color, float, str]
   21: ]
   22: 
   23: 
   24: class XMLTableStyle:
   25:     """Create a collection of styling information about the table to create
   26: 
   27:     Beautiful colors are:
   28:         *   aliceblue (not with azure)
   29:         *   azure (not with aliceblue)
   30:         *   honeydew
   31:         * ...
   32:     """
   33: 
   34: 
  -->      FULL_ROW: Tuple[Tuple[int, int], Tuple[int, int]] = ((0, 0), (-1, -

ERROR: Unable to parse file: /code/src/pyxml2pdf/core/events.py
ERROR: Parse error at line 24 column 18:

   10: .tables.builder import TableBuilder
   11: 
   12: 
   13: defusedxml.defuse_stdlib()
   14: 
   15: __all__ = ["Event"]
   16: 
   17: 
   18: class Event(XMLRow):
   19:     """A specialisation of :class:`XMLRow` onto events from an ACB event program
   20: 
   21:     :param xml.etree.ElementTree.Element element: the element to build the instance from
   22:     """
   23: 
  -->      _table_builder: TableBuilder = TableBuilder()
   25:     _table_style: XMLTableStyle = XMLTableStyle()
   26: 
   27:     _categories: List[str]
   28:     _full_row: Table
   29:     _date: str
   30: 

ERROR: Unable to parse file: /code/src/pyxml2pdf/core/parser.py
ERROR: Parse error at line 20 column 13:

    8: flowables import KeepTogether                
    9: 
   10: from pyxml2pdf.core.rows import XMLRow
   11: from pyxml2pdf.tables.builder import TableBuilder
   12: 
   13: 
   14: class Parser:
   15:     """XML parser to extract all interesting information from XML input
   16: 
   17:     :param elements: cells to populate the Parser
   18:     """
   19: 
  -->      _elements: List[KeepTogether]
   21:     _table_manager: TableBuilder
   22: 
   23:     def __init__(self, elements: List[KeepTogether]):
   24:         self._elements = elements

ERROR: Unable to parse file: /code/src/pyxml2pdf/core/initializer.py
ERROR: Parse error at line 31 column 18:

   16: SORT_XMLTAG,
   17: )                
   18: 
   19: 
   20: class Initializer:
   21:     """Coordinate the construction of the pdf result
   22: 
   23:     Keep strings together, start the actual parsing and build the PDF
   24: 
   25:     :param str input_path: Path to input XML file
   26:     :param str output_path: Path to resulting PDF file
   27:     """
   28: 
   29:     def __init__(self, input_path: str, output_path: str):
   30: 
  -->          self._data: List[KeepTogether] = []
   32:         parser = Parser(self._data)
   33:         pdf = SimpleDocTemplate(
   34:             output_path,
   35:             pagesize=[size * mm

ERROR: Unable to parse file: /code/src/pyxml2pdf/core/rows.py
ERROR: Parse error at line 39 column 10:

   21: )
   22: from xml.etree.ElementTree import Element
   23: 
   24: __all__ = ["XMLCell", "XMLRow"]
   25: 
   26: 
   27: class XMLCell(Paragraph):
   28:     """This class represents the text of type reportlab.platypus.Paragraph in a cell
   29: 
   30:     It inherits from :class:`reportlab.platypus.Paragraph` and ensures the
   31:     unified styling of all table cells.
   32: 
   33:     :py:class:`reportlab.platypus.Paragraph` is solely used with one
   34:     certain style, which is supposed to be set as a class attribute during runtime.
   35: 
   36:     :param str text: the text to write into row
   37:     """
   38: 
  -->      _style: ParagraphStyle
   40: 
   41:     def __init__(self, text: str) -> None:
   42:         super().__init__(text, self.style)

ERROR: Unable to parse file: /code/src/pyxml2pdf/core/post_processor.py
ERROR: Parse error at line 17 column 22:

    1: """This module contains the class :class:`PostProcessor` to arrange the result pages"""
    2: 
    3: import os
    4: 
    5: from PyPDF2 import PageObject, PdfReader, PdfWriter                
    6: 
    7: 
    8: class PostProcessor:
    9:     """Arrange for needed modifications of the result to prepare for printing
   10: 
   11:     This creates an instance of a :py:mod:`pyxml2pdf.core.post_processor` for a
   12:     multipage PDF file to automate splitting and rotating.
   13: 
   14:     :param str path:  path to the PDF file which shall be processed
   15:     """
   16: 
  -->      _full_output_path_: str
   18:     _output_directory_name: str
   19:     _output_base_filename: str
   20: 
   21:     def __init__(self, path):
   22:         self._full_output_path_ = path
   23:         self._output_directory_name

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.342s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------