Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace impl_pure_record and similar macros with common Python classes #271

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

prehner
Copy link
Contributor

@prehner prehner commented Feb 13, 2025

  • Removes PyIdentifier, PyChemicalRecord and builds the Python classes directly from the rust versions instead.
  • Removes the impl_pure_record, impl_binary_record, and impl_segment_record macros in favor of the new PyPureRecord, PyBinaryRecord and PySegmentRecord that use IndexMap (kwargs) instead of generics
  • Splits BinaryRecord<I,M> into BinaryRecord<M> and BinarySegmentRecord. BinarySegmentRecord is (for now) not generic, but rather always using f64 as model record.

No changes to the Rust interface at all. Will break all models that use non-f64 parameters (i.e., bool flags, enums, Vecs (especially with non-fixed lengths)). Therefore, the next step has to be to unify the parameter creation which I think is worth it in terms of maintainability and structure of the Python code.

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.

1 participant