Skip to content

Make semiwrap autogenerated naming conventions configurable#317

Merged
virtuald merged 9 commits into
mainfrom
custom-case
Jul 5, 2026
Merged

Make semiwrap autogenerated naming conventions configurable#317
virtuald merged 9 commits into
mainfrom
custom-case

Conversation

@virtuald

@virtuald virtuald commented Jun 18, 2026

Copy link
Copy Markdown
Member

Currently semiwrap only transforms functions/methods, but this will transform functions/methods and attributes and enum values. It seems like the right thing to do here?

Comment thread docs/config/autowrap.rst Outdated
Comment thread docs/config/autowrap.rst
Comment thread src/semiwrap/autowrap/cxxparser.py Outdated
Comment thread docs/config/autowrap.rst
@virtuald
virtuald force-pushed the custom-case branch 4 times, most recently from 08d292e to 304731f Compare June 19, 2026 13:13
@virtuald
virtuald force-pushed the custom-case branch 3 times, most recently from a1923b3 to 3632a77 Compare June 28, 2026 20:35
virtuald added 3 commits July 4, 2026 21:02
- Add built-in none, default, camelCase, snake_case, PascalCase, and CAPS_CASE transforms
- Support custom transforms loaded from importable callables
- Add per-kind config resolution and merge helpers for layered settings
- Cover transform parsing, caching, custom callbacks, and merge behavior
- Accept name_transform in pyproject and autowrap YAML config
- Pass inherited settings through makeplan and header2dat with per-kind CLI flags
- Use kind-specific transforms for functions, methods, attributes, and enum values
- Preserve explicit renames and transform enum values after prefix stripping
- Add parser and fixture coverage for config precedence and generated names
- Add a standalone C++ fixture that uses pyproject-level per-kind transforms
- Install the fixture with the C++ test projects
- Assert the generated Python API exposes transformed functions, methods, attributes, and enum values
@virtuald

virtuald commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

@auscompgeek if you could take one last look at this, it should be ready to go now

@auscompgeek auscompgeek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just one comment, but otherwise looks reasonable.

Comment thread docs/config/autowrap.rst Outdated
@virtuald
virtuald merged commit 4f14c4f into main Jul 5, 2026
29 checks passed
@virtuald
virtuald deleted the custom-case branch July 5, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants