Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .amazonq/rules/memory-bank/guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.clang-format
.clang-tidy
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
1 change: 0 additions & 1 deletion Modules/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/python/python/phlex/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/demo-giantdata/waveform_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ std::pair<std::size_t, demo::Waveforms> 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;
}
}
6 changes: 3 additions & 3 deletions test/python/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ 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."""
# None type
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
Expand Down
Loading