Skip to content

Fix ergonomics issues#339

Merged
javiermtorres merged 3 commits into
mainfrom
javiermtorres/py-ergonomics
Mar 24, 2026
Merged

Fix ergonomics issues#339
javiermtorres merged 3 commits into
mainfrom
javiermtorres/py-ergonomics

Conversation

@javiermtorres

Copy link
Copy Markdown
Contributor

Provides some ergonomics fixes in the Python bindings.

Closes #336
Closes #337
Closes #338

@javiermtorres
javiermtorres requested a review from besaleli March 24, 2026 11:34
@codecov-commenter

codecov-commenter commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
encoderfile-py/src/builder.rs 0.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

one tiny comment, this slays

@@ -15,7 +15,8 @@ class EncoderfileBuilder:
config: str,
) -> "EncoderfileBuilder": ...
@staticmethod

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.

remove @staticmethod here

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.

argh

@@ -46,7 +47,8 @@ class TokenizerBuildConfig:
stride: Optional[int]

@staticmethod

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.

same here

}
with pytest.raises(RuntimeError) as exc_info:
EncoderfileBuilder.from_dict(**config)
EncoderfileBuilder(**config)

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.

fire emoji

prelude::*,
};

#[pyclass(name = "Transform", frozen)]

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.

yalla byeeeeeeeee

@javiermtorres
javiermtorres force-pushed the javiermtorres/py-ergonomics branch from 0089bbc to 22f7734 Compare March 24, 2026 15:15
@javiermtorres
javiermtorres merged commit 0bc9d0c into main Mar 24, 2026
3 checks passed
@javiermtorres
javiermtorres deleted the javiermtorres/py-ergonomics branch March 24, 2026 15:18
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.

Provide PyTokenizerBuildConfig constructor Create EncoderfileBuilder as an instance Remove PyTransform

3 participants