Shorten packaged example paths (MAX_PATH) and fix flagship A123 org id - #327
Merged
Conversation
Drop the redundant <type>- prefix from component example filenames (<type>/<type>-<uid>.json -> <type>/<uid>.json) so the packaged tree no longer breaks pip install on default Windows (MAX_PATH). Fix the dead A123 organization IRI in the flagship record and everywhere it appears.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
<type>-prefix from the component example filenamesin both
examples/**and the packaged mirrorsrc/battinfo/data/examples/**(
<type>/<type>-<uid>.json-><type>/<uid>.json), across 14 componentdirectories (98 file renames total).
organization/9k3e-absq-8131-vyjd->organization/8z6j-n7vw-e73w-smh7("A123 Systems", verified live) in the flagship cell-spec, the A123
organization record, and every other file embedding it.
tests/test_packaged_example_path_length.py) that fails ifany packaged example path regrows past the budget.
Why
(
LongPathsEnabled=0)pip installfails when a packaged data file's pathcrosses 260 chars. The worst offender duplicated its directory in the
filename, e.g.
current-collector-spec/current-collector-spec-vkaf-f5bv-fwt2-e6yz.jsonat 93 chars below site-packages. The 0.8 PyPI release widens Windows
exposure, so this lands first.
manufacturer.id404s on w3id and on theregistry's own resolver; the live A123 org is
8z6j-n7vw-e73w-smh7.How
A123 IRI fix). The runtime loaders glob
*.jsonand derive record ids fromfile content, not the filename, so no loader changes were needed.
cell-instance/,cell-spec/,dataset/,test/,test-protocol/) andmaterial/unchanged: their filenames are referencedby name in tests owned by a sibling agent (including a constructed
material-{uid}.jsonpath intests/test_phase4.py), and they are alreadyshort (<= 75 chars below site-packages), so renaming them would gain nothing
for the budget while breaking those tests. The redundant-prefix directories
that actually threatened MAX_PATH are all in the renamed set.
scripts/sync_examples.pyand the webartifacts via
scripts/gen_web_jsonld.py,scripts/gen_web_examples.py, andweb/scripts/sync-examples.mjs(outputs not hand-edited).package-data = data/**/*), so no MANIFEST/packagingchanges were needed.
Rename map
<type>/<type>-<uid>.json-><type>/<uid>.jsonin:channel,current-collector,current-collector-spec,electrode,electrode-spec,electrolyte,electrolyte-spec,equipment,equipment-spec,housing,housing-spec,material-spec,separator,separator-spec.Worst-case packaged path (below site-packages)
cell-spec/research/pouch-single-layer-detailed.example.json)data/profiles/cell-spec/generated/quantitative-properties.schema.fragment.json)The remaining 82-char ceiling is the descriptive
cell-spec/research/*.example.jsonrecords, which are referenced by name inseveral sibling-owned tests and so are not renamed here. The 87-char worst-any
file is a generated schema fragment under
data/profiles/(outside this PR'sterritory) — flagged for a follow-up if the sub-80 target is to be met fully.
Testing
uv run pytest: 1602 passed, 1 skipped.uv run ruff check src tests scripts .tools: clean.uv run mypy: clean(69 files).
scripts/sync_examples.py --check, examples/web drift guards, and theschema-version stamp guard: green.
removal.
git grep 9k3e-absq-8131-vyjd: no matches.Deep-path wheel install (Windows,
LongPathsEnabled=0):Notes / seams
docs/engineering-cell-description.md(owned here) updated for the renamedhousing-spec/example paths.docs/guides/01-concepts.ipynboutput cell andtests/fixtures/served/flagship-cell-spec.jsonldcarried the dead org IRI;both fixed (the flagship id fix authorizes editing every embedding).
example path appears in those sibling-owned pages.
later (out of scope here).