Skip to content

feat: Add Python bindings to PrefixData#2267

Open
jaimergp wants to merge 3 commits intoconda:mainfrom
jaimergp:prefix-data-python-bindings
Open

feat: Add Python bindings to PrefixData#2267
jaimergp wants to merge 3 commits intoconda:mainfrom
jaimergp:prefix-data-python-bindings

Conversation

@jaimergp
Copy link
Copy Markdown
Contributor

@jaimergp jaimergp commented Mar 20, 2026

Description

Python bindings were missing in #2074

How Has This Been Tested?

See doctests

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: {e.g., Claude, Codex, GitHub Copilot, ChatGPT, etc.}

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.


match record {
Some(Ok(record)) => Ok(Some(record.clone().into())),
// TODO: Expose underlying error
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know how to deal with this. PrefixDataError cannot be converted to PyRattlerError so I assume we need some extra wiring, but I don't know where that goes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it can go in this struct:

pub enum PyRattlerError {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So you could maybe add a explicit mapping or use the #[from] value like in other cases? .map_err can be useful to map between error types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants