Skip to content

Use constructor in TargetSpec, allow union in builder#325

Merged
javiermtorres merged 2 commits intomainfrom
324-targetspec-handling
Mar 23, 2026
Merged

Use constructor in TargetSpec, allow union in builder#325
javiermtorres merged 2 commits intomainfrom
324-targetspec-handling

Conversation

@javiermtorres
Copy link
Copy Markdown
Contributor

A normal constructor can now be used with TargetSpec. Also, the builder config dict target accepts either a str or a prebuilt Target Spec. The stubtest uses the right _core module now.

Since the TargetSpec is now part of the EncoderfileConfig, it needs to derive JsonSchema. Let me know if that would be an issue. From the top of my head I don't know if we currently test schema generation and check something on it.

The version param takes None as default to make it consistent with the Rust-side option. However, it might be more appropriate to signal '0.1.0' as default, as it is the real value that will be set up when the default is used. A discussion for another day 😅

@javiermtorres javiermtorres requested a review from besaleli March 20, 2026 15:42
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 7.14286% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
encoderfile-py/src/builder.rs 0.00% 13 Missing ⚠️
Files with missing lines Coverage Δ
encoderfile/src/builder/base_binary/target_spec.rs 39.77% <ø> (ø)
encoderfile/src/builder/config.rs 76.86% <100.00%> (-0.27%) ⬇️
encoderfile-py/src/builder.rs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@javiermtorres javiermtorres requested a review from besaleli March 23, 2026 17:18
@javiermtorres javiermtorres merged commit 6079c12 into main Mar 23, 2026
3 checks passed
@javiermtorres javiermtorres deleted the 324-targetspec-handling branch March 23, 2026 17:21
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