feat(custom_data): emit and round-trip importName in config.json#116
Merged
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
tillywoodfield
approved these changes
Jun 25, 2026
f32ba69 to
80bc13b
Compare
Add an optional top-level importName field to Config (also lifting the extra="forbid" block on loading platform configs), surface set_importName on CustomDataManager, and default it to the export directory name on export without mutating manager state. Co-authored-by: Claude <noreply@anthropic.com>
80bc13b to
61275ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #103.
What changed
Adds a top-level
importNametoconfig.json— the package can now both emit it and round-trip a platform config that already contains it.Config.importName: Optional[str]— adding the field also lifts theextra="forbid"block that previously rejected any config carryingimportName.CustomDataManager.set_importName()(chainable, matches theset_*pattern); surfaced in__repr__.export_configdefaultsimportNameto the export directory name when unset, applied to amodel_copyfor serialization only — no manager-state mutation, so re-exporting to another directory picks up that directory's name.importNameadded to the directory-merge simple-attrs so merges round-trip it.config_to_dict()documented as a raw state dump (does not defaultimportName).Acceptance
config.jsoncarries a top-levelimportNamematching the upload subdirectory. ✓config.jsonthat already containsimportName. ✓Testing
90 tests pass. New coverage: round-trip load, set + export-default, re-export to a different dir with no-mutation assertion, and an updated golden snapshot.
Co-authored-by: Claude noreply@anthropic.com