Skip to content

Adds the ability to create Python-only property types - #387

Merged
ryanmrichard merged 6 commits into
masterfrom
python_property_type
Aug 3, 2026
Merged

Adds the ability to create Python-only property types#387
ryanmrichard merged 6 commits into
masterfrom
python_property_type

Conversation

@ryanmrichard

Copy link
Copy Markdown
Member

Is this pull request associated with an issue(s)?
No.

Description
For a long time we've only had the ability to declare property types in C++. This PR introduces a mechanism for declaring Python-only PTs. PTs declared this way can only be leveraged by modules written in Python. Python-only PTs are duck-typing compatible and largely amount to labeling arguments and enforcing numbers of inputs/results.

FWIW the motivation for this PR is that I need to declare an API compatible with the QCArchive ecosystem which requires me to take/return Pydantic objects, which are pure Python objects. I thus can't declare a C++ property type for such a module.

TODOs
None (if tests pass)

@ryanmrichard ryanmrichard self-assigned this Jul 29, 2026
@ryanmrichard
ryanmrichard requested a review from jwaldrop107 July 29, 2026 19:54
jwaldrop107
jwaldrop107 previously approved these changes Aug 3, 2026

@jwaldrop107 jwaldrop107 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.

LGTM, just the one typo.

Comment thread docs/source/developer/design/property_type.rst Outdated
Co-authored-by: Jonathan M. Waldrop <relik107@gmail.com>
@ryanmrichard
ryanmrichard disabled auto-merge August 3, 2026 17:48
@ryanmrichard
ryanmrichard merged commit 7959b5b into master Aug 3, 2026
5 checks passed
@ryanmrichard
ryanmrichard deleted the python_property_type branch August 3, 2026 17:48
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚀 [bumpr] Bumped!
New version:v1.0.62
Changes:v1.0.61...v1.0.62

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