Download DMRG scripts from ALPSim/ALPS instead of vendoring them - #140
Open
marcusr2ML wants to merge 1 commit into
Open
Download DMRG scripts from ALPSim/ALPS instead of vendoring them#140marcusr2ML wants to merge 1 commit into
marcusr2ML wants to merge 1 commit into
Conversation
Collaborator
Author
|
@Ooolab Same deal as before. I just wanted to give you a heads up that the en DMRG-05 is much different than the translations as of now. It needed a lot of work over the weekend. |
Collaborator
Author
|
@egull I'll wait for Fei. I'll add Adrian as a reviewer, but might merge if we are waiting too long for a follow up. Also, I simply made Claude do the updates. I think it duplciated the JS I gave it. Will clean up today. |
The DMRG tutorials served 27 copies of the ALPS tutorial files out of content/en/tutorials/dmrg/codes/. Point the 26 download links at ALPSim/ALPS master over raw.githubusercontent.com and drop the copies, matching the DMFT and MCS series. All 27 vendored files were byte-identical to their master counterparts before removal, and all 26 new URLs were confirmed to return 200, so readers get the same bytes from the canonical source. English only. The Japanese and Chinese DMRG pages are left untouched for now: DMRG-05 has drifted badly (English is 293 lines across 17 sections after the restructure, the translations 127 lines across 8), and the translated text still walks the reader through spin_one and spin_one.py, which the English version no longer uses at all. Remapping those links would leave the prose describing one file and the button downloading another, so the translations need a content pass first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
marcusr2ML
force-pushed
the
feat/dmrg-source-downloads
branch
from
August 13, 2026 15:40
95af54c to
54e5ec0
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.
Brings the DMRG series in line with the DMFT and MCS tutorials: the scripts are fetched from ALPSim/ALPS instead of being copied into this repo.
What changed
dmrg03–dmrg06now point atraw.githubusercontent.com/ALPSim/ALPS/master/tutorials/...and use the sharedalps-download.jshandler, so a click saves the file instead of navigating the reader to GitHub.content/en/tutorials/dmrg/codes/are removed.assets/js/alps-download.jsand wires it up inlayouts/baseof.html.Tracking
masterrather than a pinned commit means the tutorials always serve the current source. The trade-off is deliberate: if a file is renamed upstream the link 404s instead of silently serving a stale snapshot, which is the failure mode you want to hear about.Verification
mastercounterparts before removal, so readers get exactly the same bytes from the canonical source.master.dmrg/codes/.hugo --gc --minify --cleanDestinationDirbuild: 26 anchors render (dmrg03: 10, dmrg04: 5, dmrg05: 7, dmrg06: 4), no stalecodes/output.Scope: English only
The Japanese and Chinese DMRG pages are deliberately untouched, and they need a separate content pass rather than a URL rewrite.
They are already broken on the live site: 9 of their 23 link targets point at
tutorials/dmrg-01-dmrg/...onmaster, which no longer exists after the upstream folder rename, so those are live 404s today. The remaining 14 are pinned tobd842d1and still resolve, but serve pre-rename content.Remapping the URLs would not be enough for DMRG-05. The English page is 293 lines across 17 sections after the restructure; the translations are 127 lines across 8, and still walk the reader through
spin_oneandspin_one.py, which the English version no longer uses at all — it usesspin_one_uniform,spin_one_capped, andbuild_lattice.py. Pointing those links at the new files would leave the prose describing one file while the button downloads another.DMRG-03/04/06 match the English structure and name the same files, so those would remap cleanly whenever the translation pass happens.
Note for merging
Two other open PRs (#138 MCS, #139 DMFT) add the same
assets/js/alps-download.jsand the samelayouts/baseof.htmlblock. Whichever merges first will make the other two conflict on those two files — identical content, so resolution is trivial, but it will come up.🤖 Generated with Claude Code