diff --git a/.amazonq/rules/memory-bank/guidelines.md b/.amazonq/rules/memory-bank/guidelines.md index 0bac9cc3c..9e2ac2f4d 100644 --- a/.amazonq/rules/memory-bank/guidelines.md +++ b/.amazonq/rules/memory-bank/guidelines.md @@ -366,12 +366,12 @@ coverage_root: Path | None = None, ) -> tuple[list[str], list[str]]: """Normalize filenames within a Cobertura XML report. - + Args: report_path: Path to the Cobertura XML. repo_root: Root of the repository. coverage_root: Directory gcovr treated as root. - + Returns: A tuple containing missing files and external files. """ diff --git a/.github/actions/README.md b/.github/actions/README.md index 8f4537f8e..137687865 100644 --- a/.github/actions/README.md +++ b/.github/actions/README.md @@ -92,24 +92,24 @@ jobs: runs-on: ubuntu-24.04 container: image: ghcr.io/framework-r-d/phlex-ci:latest - + steps: - name: Checkout code uses: actions/checkout@v4 with: path: phlex-src - + - name: Setup build environment uses: ./phlex-src/.github/actions/setup-build-env - + - name: Configure CMake uses: ./phlex-src/.github/actions/configure-cmake with: build-type: Release - + - name: Build uses: ./phlex-src/.github/actions/build-cmake - + - name: Run tests run: | . /entrypoint.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70d85b24d..e3d6073ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -39,3 +39,8 @@ repos: hooks: - id: prettier types_or: [yaml] + - repo: https://github.com/DavidAnson/markdownlint-cli2 + rev: v0.21.0 + hooks: + - id: markdownlint-cli2 + args: [--fix] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..cc9fad3bd --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +.clang-format +.clang-tidy diff --git a/DEVELOPING.md b/DEVELOPING.md index f915e6252..6e8ee3e81 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -131,7 +131,7 @@ To set up this tool locally, first install `pre-commit` (or `prek`, a faster re- So set up the hooks in the Phlex repository, run the `pre-commit install` command once in the repository. The hooks now should run automatically prior to each commit. -To skip a check temporarily, run `SKIP=ruff-format git commit -m "...". To skip all hooks, you can use the `--no-verify` flag to `git commit`. +To skip a check temporarily, run `SKIP=ruff-format git commit -m "..."`. To skip all hooks, you can use the `--no-verify` flag to `git commit`. To manually run hooks over all files, run `pre-commit run --all-files`. diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt deleted file mode 100644 index 8b1378917..000000000 --- a/Modules/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/plugins/python/python/phlex/_typing.py b/plugins/python/python/phlex/_typing.py index dede90608..34018a205 100644 --- a/plugins/python/python/phlex/_typing.py +++ b/plugins/python/python/phlex/_typing.py @@ -78,7 +78,7 @@ def _build_ctypes_map() -> dict[type, str]: for tp in _CTYPES_INTEGER: bits = ctypes.sizeof(tp) * 8 # _type_ uses struct format chars: lowercase = signed, uppercase = unsigned - signed = tp._type_.islower() # type: ignore # somehow mypy is confused + signed = tp._type_.islower() # type: ignore # somehow mypy is confused result[tp] = f"{'int' if signed else 'uint'}{bits}_t" return result diff --git a/test/demo-giantdata/waveform_generator.cpp b/test/demo-giantdata/waveform_generator.cpp index 101b89a29..069cf30cf 100644 --- a/test/demo-giantdata/waveform_generator.cpp +++ b/test/demo-giantdata/waveform_generator.cpp @@ -25,4 +25,4 @@ std::pair demo::WaveformGenerator::op(std::size_t auto result = std::make_pair(made_so_far + newsize, Waveforms{newsize, 1.0 * made_so_far, -1, -1, -1, -1}); return result; -} \ No newline at end of file +} diff --git a/test/python/test_typing.py b/test/python/test_typing.py index 12cf1898e..69ce1afba 100644 --- a/test/python/test_typing.py +++ b/test/python/test_typing.py @@ -66,7 +66,7 @@ def test_numpy_array_normalization(self): (np.float32, "float"), (np.float64, "double"), ): - assert normalize_type(npt.NDArray[t]) == "ndarray["+s+"]" + assert normalize_type(npt.NDArray[t]) == "ndarray[" + s + "]" def test_special_cases(self): """Special cases.""" @@ -74,8 +74,8 @@ def test_special_cases(self): assert normalize_type(None) == "None" # use of namespaces for evaluation - assert("foo") == "foo" - global foo # lgtm[py/unused-global-variable] + assert ("foo") == "foo" + global foo # lgtm[py/unused-global-variable] foo = np.int64 assert normalize_type("foo", globals()) == "int64_t" bar = np.int32