Use standard_template_library/ as a subtree from the plainlang_examples repository#212
Merged
Merged
Conversation
4dbc302 to
05846cc
Compare
Contributor
Author
|
Matching PR in the @zanjonke I'd like to test if this will work for the shipped project like what clients will install from PyPI. Any suggestions how to test that locally? |
d9c0021 to
aa33727
Compare
aa33727 to
d70dcd1
Compare
Removes the inline copy of standard_template_library/ so it can be re-added as a git subtree from the plainlang-examples repository. Also drops the now-unnecessary importlib.resources lookup in plain2code.py and documents the subtree sync workflow in CLAUDE.md.
git-subtree-dir: standard_template_library git-subtree-split: 14f2c241482f2fbba8e3514759725630f36f85e9
…template_library'
d70dcd1 to
9ab217f
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.
Summary
The
standard_template_library/is now a git subtree from theplainlang_examplesrepo. This PR does two things on top of that:Converts the directory into a git subtree — It embeds the
git-subtree-splitmetadata in the commit history usinggit subtree. This is what enables future syncing withgit subtree pullwhenplainlang-examplesupdates the templates. Note that this needs to be done manually anytime the templates change in that repository.Fixes
plain2code.py— replaces theimportlib.resourcespath with a plain string, so the subtree directory is resolved correctly relative toplain2code.pyat runtime.The file diff appears empty because the standard template files' contents are unchanged — only the git history wiring is new.
Also fixes pre-existing date-sensitive test failures in
test_cli_output.py(hardcoded2026-06-01dates moved to2028-12-01).Test plan
--dry-runpasses forhello-world-python.plain,hello-world-golang.plain, andhello-world-react.plain(all import from the standard template library)pytest tests/)git subtree pullworks after a future update toplainlang-examplesCloses https://github.com/Codeplain-ai/next-microsoft/issues/33