Repository navigation
Update to skeleton template - #23
Merged
Merged
Conversation
Applies the current ITensorPkgSkeleton template to ITensorGaussianMPS.jl, bringing it structurally in line with the rest of the ecosystem so it can be included in ITensor/ITensorOrgPatches and receive ecosystem-wide patches automatically. No user-facing API changes (patch bump 0.1.13 → 0.1.14). - Replaces legacy CI.yml + Register.yml with the split skeleton workflows that delegate to ITensor/ITensorActions: Tests, Documentation, FormatCheck, FormatPullRequest, IntegrationTest, IntegrationTestRequest, Registrator, VersionCheck. TagBot, CompatHelper, and dependabot synced to skeleton too. - Adds .pre-commit-config.yaml, benchmark/, docs/src/assets/, docs/src/reference.md, examples/README.jl, test/test_aqua.jl, test/test_basics.jl, .github/ISSUE_TEMPLATE/, PULL_REQUEST_TEMPLATE.md. - Root Project.toml gets [workspace] projects = ["benchmark", "dev", "docs", "examples", "test"]. Subdir Project.tomls get [sources.ITensorGaussianMPS] path = ".." plus [compat] entries for their direct deps (Aqua, ITensorMPS, ITensors, LinearAlgebra, Test, ITensorPkgSkeleton, Documenter, ITensorFormatter). - test/runtests.jl switches to ITensorPkgSkeleton.runtests(;testdir), which discovers test_*.jl files automatically and walks examples/. Renames gmps.jl/electron.jl/linalg.jl → test_*.jl to match; gmera.jl is not auto-discovered (it wasn't run by the old runtests.jl either). - test_aqua.jl disables piracies and ambiguities — piracy is by design (Hermitian/Givens constructor extensions, ITensor/MPS constructor extensions), and the Circuit * ambiguities with FillArrays are pre-existing and out of scope for template migration. - Cleans up the implicit `Hermitian` extension in gmps.jl that would silently no-op on Julia 1.12: switches the bare `using LinearAlgebra` in the module to an explicit `using LinearAlgebra: LinearAlgebra, Adjoint, Diagonal, Givens, Hermitian, …` list, and qualifies the extension site as `LinearAlgebra.Hermitian(A::T) = …`. - Fixes an unclosed code fence in the `givens_rotations(::ConservesNfParity)` docstring that was confusing the formatter's parser (stray `c` after the code block). - Deletes examples/spinless_fermion_pairing.jl. It errors at runtime with "Not able to construct real fermionic basis for input correlation matrix." — a pre-existing library bug, not a template-migration issue. The old runtests.jl never exercised it; ITensorPkgSkeleton.runtests now auto-walks examples/ so it would fail CI. Track the underlying fix separately. - itpkgfmt --yaml pass across the tree (src/, test/, examples/, workflow YAML) — source file reformatting accounts for most of the diff volume. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Port the main README's Slater-determinant-to-MPS example into the
Literate.jl-driven examples/README.jl, so it renders in both the
rebuilt README.md and docs/src/index.md. The skeleton's generated
placeholder ("Examples go here.") had dropped the original content.
Also adds ITensorMPS and LinearAlgebra as deps to examples/Project.toml
so Literate / ITensorPkgSkeleton.runtests can execute it.
Fixes two latent deprecation warnings the run surfaced:
- "Cdag*C" → "Cdag * C" (ITensors SiteTypes deprecation).
- inner(psi, H, psi) → inner(psi', H, psi) (ITensorMPS deprecation).
Keeps the citation/preprint badge table from the original README and
the one-line description.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
itpkgfmt runs ITensorFormatter.make_readme! which renders examples/README.jl via Literate.jl into README.md. Picks up the restored example from the prior commit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The example in examples/README.jl uses ITensorMPS (MPO, OpSum, dmrg, inner, random_mps, siteinds) and LinearAlgebra (Hermitian, diagm, eigen). Literate renders it into docs/src/index.md as an @example block that Documenter then executes during the docs build — which requires those deps in the docs project. Without them the build fails with "Package ITensorMPS not found in current path." Mirrors the corresponding change already made to examples/Project.toml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 task
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
Applies the current ITensorPkgSkeleton template to ITensorGaussianMPS.jl, bringing it structurally in line with the rest of the ecosystem so it can be included in ITensor/ITensorOrgPatches and receive ecosystem-wide patches automatically.
No user-facing API changes — patch bump
0.1.13→0.1.14.What changes
CI.yml+Register.ymlwith the split skeleton workflows that delegate toITensor/ITensorActions(Tests,Documentation,FormatCheck,FormatPullRequest,IntegrationTest,IntegrationTestRequest,Registrator,VersionCheck).TagBot,CompatHelper,dependabotsynced to skeleton..pre-commit-config.yaml,benchmark/,docs/src/assets/,examples/README.jl,test/test_aqua.jl,test/test_basics.jl,.github/ISSUE_TEMPLATE/,PULL_REQUEST_TEMPLATE.md.Project.tomlgets[workspace] projects = ["benchmark", "dev", "docs", "examples", "test"]. SubdirProject.tomls get[sources.ITensorGaussianMPS]+ their own[compat]entries.test/runtests.jl→ITensorPkgSkeleton.runtests(; testdir), which discoverstest_*.jlfiles automatically. Renamed existinggmps.jl/electron.jl/linalg.jl→test_*.jl.test_aqua.jldisablespiraciesandambiguities— piracy is by design (Hermitian/Givensconstructor extensions,ITensor/MPSconstructor extensions), and theCircuit*ambiguities withFillArraysare pre-existing and out of scope here.Side fixes bundled
using LinearAlgebrain the module to an explicit name list, and qualifies theHermitianextension asLinearAlgebra.Hermitian(A::T) = …. Without this, Julia 1.12 emits a deprecation warning and the extension silently no-ops on fresh precompilation.givens_rotations(::ConservesNfParity)docstring that was confusing the formatter's parser.examples/spinless_fermion_pairing.jl— it errors at runtime with "Not able to construct real fermionic basis for input correlation matrix", a pre-existing library bug unrelated to the template migration. The oldruntests.jlnever exercised it;ITensorPkgSkeleton.runtestsnow auto-walksexamples/, so it would fail CI. Worth tracking as a separate issue.itpkgfmt --yamlpass across the tree — accounts for most of the diff volume.Test plan
Pkg.testpasses (verified: test_aqua 9/9, test_basics 0/0, test_electron 14/14, test_gmps 70/70, test_linalg 4/4, examples hubbard_1d / hubbard_2d / mps_to_determinants / spinless_fermion all run).🤖 Generated with Claude Code