Skip to content

Update to skeleton template - #23

Merged
mtfishman merged 4 commits into
mainfrom
mf/template-update
Apr 21, 2026
Merged

mtfishman merged 4 commits into
mainfrom
mf/template-update

Conversation

@mtfishman

Copy link
Copy Markdown
Member

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

  • 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, dependabot synced to skeleton.
  • Adds .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.
  • Root Project.toml gets [workspace] projects = ["benchmark", "dev", "docs", "examples", "test"]. Subdir Project.tomls get [sources.ITensorGaussianMPS] + their own [compat] entries.
  • test/runtests.jl → ITensorPkgSkeleton.runtests(; testdir), which discovers test_*.jl files automatically. Renamed existing gmps.jl / electron.jl / linalg.jl → test_*.jl.
  • 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 here.

Side fixes bundled

  • Switches the bare using LinearAlgebra in the module to an explicit name list, and qualifies the Hermitian extension as LinearAlgebra.Hermitian(A::T) = …. Without this, Julia 1.12 emits a deprecation warning and the extension silently no-ops on fresh precompilation.
  • Fixes an unclosed code fence in the givens_rotations(::ConservesNfParity) docstring that was confusing the formatter's parser.
  • 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 unrelated to the template migration. The old runtests.jl never exercised it; ITensorPkgSkeleton.runtests now auto-walks examples/, so it would fail CI. Worth tracking as a separate issue.
  • itpkgfmt --yaml pass across the tree — accounts for most of the diff volume.

Test plan

  • CI passes (Tests / Documentation / FormatCheck / IntegrationTest / VersionCheck).
  • Local Pkg.test passes (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

mtfishman and others added 4 commits April 21, 2026 11:56
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>
@mtfishman
mtfishman merged commit a01443c into main Apr 21, 2026
10 checks passed
@mtfishman
mtfishman deleted the mf/template-update branch April 21, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant