Skip to content

feature: add support for the checker tool - #31

Open
leon1995 wants to merge 6 commits into
Draegerwerk:mainfrom
leon1995:add-checker-tool
Open

feature: add support for the checker tool#31
leon1995 wants to merge 6 commits into
Draegerwerk:mainfrom
leon1995:add-checker-tool

Conversation

@leon1995

Copy link
Copy Markdown
Member

No description provided.

@leon1995 leon1995 changed the title Add checker tool feature: add support for the checker tool Jul 30, 2026
@leon1995 leon1995 added the feature New feature or request label Jul 30, 2026
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.09%. Comparing base (4dc89ea) to head (76eeac8).

Files with missing lines Patch % Lines
src/pysdccc/_checker_tool.py 95.45% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
- Coverage   97.15%   97.09%   -0.06%     
==========================================
  Files           7        9       +2     
  Lines         387      448      +61     
  Branches       38       44       +6     
==========================================
+ Hits          376      435      +59     
  Misses          6        6              
- Partials        5        7       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

__LOGGER__ = logging.getLogger('pysdccc.checker_tool')


class SdcccCheckerTool:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the checkcer tool is not mentioned in the README, for the user who is seeing the checker-tool for the first time (like me) it is very hard to deal with, i suggest enhancing the CLI doc

Comment thread src/pysdccc/_common.py

:param local_path: The local path to search for executables.
:param checker_tool: If True, select the checker tool executable (name contains
:data:`CHECKER_TOOL_MARKER`); otherwise select the test runner executable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is CHECKER_TOOL_MARKER

Comment thread src/pysdccc/_common.py
file matching the pattern "sdccc-*.exe" to be present in the directory. If no such file or more than one file is
found, a FileNotFoundError is raised.
This function searches the specified local path for the SDCcc test runner executable (``*.exe`` whose name does not
follow ``sdccc-internal-<version>.exe``). The checker tool executable, if present, is ignored.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the sdccc-internal is mentioned out of a sudden in multiple places, the original implemtation refered the SDCcc executable

"""Get the path to the SDCcc checker tool executable."""
return anyio.Path(self._exe)

def _prepare_command(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be static

mdib: _common.PATH_TYPE,
reference: _common.PATH_TYPE,
**kwargs: _common.CMD_TYPE,
) -> int:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
) -> int:
) -> int | None:

Comment thread tests/test_cli.py
@@ -16,7 +16,16 @@

import pysdccc
import pysdccc._cli

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

Comment thread tests/test_common.py

def test_get_exe_path_ignores_checker_tool():
"""Test that the runner and checker tool executables are told apart when both are present."""
runner = pathlib.Path('sdccc-internal-1.0.0.exe')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inconsistent with other tests which use pathlib.Path('sdccc-1.0.0.exe')

Comment thread tests/test_common.py
mock.patch('pathlib.Path.is_file', return_value=True),
pytest.raises(FileNotFoundError),
):
_common.get_checker_tool_exe_path(runner)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also assert the expected message

Comment thread CONTRIBUTING.md
### Formatting / Static Code Analysis

- Use [ruff](https://docs.astral.sh/ruff/) to ensure your code adheres to our coding standards.
- Use [pyright](https://github.com/microsoft/pyright) for type checking. Ensure your code is typed and passes pyright checks.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to changelog, was replaced by ty

Comment thread pyproject.toml
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but only the exe is executed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants