Skip to content

Commit b88ccf5

Browse files
mtfishmanclaude
andauthored
Sync to latest ITensorPkgSkeleton template (#34)
## Summary Sync the repo to the latest ITensorPkgSkeleton template. Most workflow files now match the template verbatim; `IntegrationTest.yml` keeps the existing downstream package (`ITensorBase`). Notable behavioral changes: - Pre-commit hook switches from `runic-pre-commit` to `itensorformatter-pre-commit` v1.0.0 (this is what supersedes #33, which autoupdated the now-retired runic hook). - `Tests.yml` and `IntegrationTest.yml` gain status-gate jobs (`tests-gate`, `integration-gate`) so branch protection works correctly when matrix legs are skipped. - `IntegrationTest.yml` moves to `pull_request_target` with `secrets: inherit`, drops the `Project.toml` paths filter, and adds `fail-fast: false`. - `Registrator.yml` gains the `issue_comment` trigger plus `issues: write` permission, and uses `secrets: inherit`. - `CompatHelper.yml` uses `secrets: inherit`. - `Tests.yml` and `IntegrationTest.yml` trigger on `converted_to_draft`. - `LiterateCheck.yml` is removed. - `test/runtests.jl` delegates to `ITensorPkgSkeleton.runtests`; `docs/make.jl` uses `ITensorFormatter.make_index!` instead of an inlined `Literate` driver, and `docs/make_index.jl` / `docs/make_readme.jl` are removed. - Root `Project.toml` gets a `[workspace]` section; `test/Project.toml` and `docs/Project.toml` get `[sources.UnallocatedArrays]` entries pointing at `..`. - Patch version bump 0.1.11 → 0.1.12. Closes #33. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 13a5e03 commit b88ccf5

19 files changed

Lines changed: 143 additions & 238 deletions

.github/workflows/CompatHelper.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: "CompatHelper"
2-
32
on:
43
schedule:
5-
- cron: '0 0 * * *'
6-
workflow_dispatch:
4+
- cron: "0 0 * * *"
5+
workflow_dispatch: ~
76
permissions:
8-
contents: write
9-
pull-requests: write
10-
7+
contents: "write"
8+
pull-requests: "write"
119
jobs:
1210
compat-helper:
1311
name: "CompatHelper"
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
name: "Documentation"
2-
32
on:
43
push:
54
branches:
6-
- main
7-
tags: '*'
8-
pull_request:
5+
- "main"
6+
tags: "*"
7+
pull_request: ~
98
schedule:
10-
- cron: '1 4 * * 4'
11-
9+
- cron: "1 4 * * 4"
1210
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }}
15-
11+
group: "${{ github.workflow }}-${{ github.ref }}"
12+
cancel-in-progress: "${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }}"
1613
jobs:
1714
build-and-deploy-docs:
1815
name: "Documentation"
1916
uses: "ITensor/ITensorActions/.github/workflows/Documentation.yml@main"
2017
with:
21-
localregistry: https://github.com/ITensor/ITensorRegistry.git
18+
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
2219
secrets:
23-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
20+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"

.github/workflows/FormatCheck.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: "Format Check"
2-
32
on:
43
pull_request_target:
5-
paths: ['**/*.jl']
6-
types: [opened, synchronize, reopened, ready_for_review]
7-
4+
types:
5+
- "opened"
6+
- "synchronize"
7+
- "reopened"
8+
- "ready_for_review"
89
permissions:
9-
contents: read
10-
actions: write
11-
pull-requests: write
12-
10+
contents: "read"
11+
actions: "write"
12+
pull-requests: "write"
1313
jobs:
1414
format-check:
1515
name: "Format Check"
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
name: "Format Pull Request"
2-
32
on:
43
schedule:
5-
- cron: '0 0 * * *'
6-
workflow_dispatch:
4+
- cron: "0 0 * * *"
5+
workflow_dispatch: ~
6+
issue_comment:
7+
types:
8+
- "created"
79
permissions:
8-
contents: write
9-
pull-requests: write
10-
10+
contents: "write"
11+
pull-requests: "write"
1112
jobs:
1213
format-pull-request:
1314
name: "Format Pull Request"
1415
uses: "ITensor/ITensorActions/.github/workflows/FormatPullRequest.yml@main"
16+
secrets: "inherit"
Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
11
name: "IntegrationTest"
2-
32
on:
43
push:
54
branches:
6-
- 'main'
7-
tags: '*'
8-
paths:
9-
- 'Project.toml'
10-
pull_request:
11-
paths:
12-
- 'Project.toml'
13-
5+
- "main"
6+
tags: "*"
7+
pull_request_target:
8+
types:
9+
- "opened"
10+
- "synchronize"
11+
- "reopened"
12+
- "ready_for_review"
13+
- "converted_to_draft"
1414
jobs:
1515
integration-test:
1616
name: "IntegrationTest"
1717
strategy:
18-
matrix:
19-
pkg:
20-
- 'ITensorBase'
18+
fail-fast: false
19+
matrix:
20+
pkg:
21+
- "ITensorBase"
2122
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTest.yml@main"
23+
secrets: "inherit"
2224
with:
2325
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
2426
pkg: "${{ matrix.pkg }}"
27+
integration-gate:
28+
name: "IntegrationTest"
29+
needs: "integration-test"
30+
if: "${{ always() && needs.integration-test.result != 'skipped' }}"
31+
runs-on: "ubuntu-latest"
32+
steps:
33+
- name: "Fail if any downstream integration test failed"
34+
run: |
35+
echo "integration-test.result = ${{ needs.integration-test.result }}"
36+
test "${{ needs.integration-test.result }}" = "success"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: "Integration Test Request"
2-
32
on:
43
issue_comment:
5-
types: [created]
6-
4+
types:
5+
- "created"
76
jobs:
87
integrationrequest:
98
if: |
109
github.event.issue.pull_request &&
1110
contains(fromJSON('["OWNER", "COLLABORATOR", "MEMBER"]'), github.event.comment.author_association)
12-
uses: ITensor/ITensorActions/.github/workflows/IntegrationTestRequest.yml@main
11+
12+
uses: "ITensor/ITensorActions/.github/workflows/IntegrationTestRequest.yml@main"
1313
with:
14-
localregistry: https://github.com/ITensor/ITensorRegistry.git
14+
localregistry: "https://github.com/ITensor/ITensorRegistry.git"

.github/workflows/LiterateCheck.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/Registrator.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
name: Register Package
1+
name: "Register Package"
22
on:
3-
workflow_dispatch:
3+
workflow_dispatch: ~
44
push:
55
branches:
6-
- 'master'
7-
- 'main'
6+
- "master"
7+
- "main"
88
paths:
9-
- 'Project.toml'
10-
9+
- "Project.toml"
10+
issue_comment:
11+
types:
12+
- "created"
1113
permissions:
12-
contents: write
13-
pull-requests: write
14-
14+
contents: "write"
15+
pull-requests: "write"
16+
issues: "write"
1517
jobs:
1618
Register:
1719
uses: "ITensor/ITensorActions/.github/workflows/Registrator.yml@main"
1820
with:
19-
localregistry: ITensor/ITensorRegistry
20-
secrets:
21-
REGISTRATOR_KEY: ${{ secrets.REGISTRATOR_KEY }}
21+
localregistry: "ITensor/ITensorRegistry"
22+
secrets: "inherit"

.github/workflows/Tests.yml

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,53 @@
1-
name: Tests
1+
name: "Tests"
22
on:
33
push:
44
branches:
5-
- 'master'
6-
- 'main'
7-
- 'release-'
8-
tags: '*'
5+
- "master"
6+
- "main"
7+
- "release-"
8+
tags: "*"
99
paths-ignore:
10-
- 'docs/**'
10+
- "docs/**"
1111
pull_request:
12-
workflow_dispatch:
13-
12+
types:
13+
- "opened"
14+
- "synchronize"
15+
- "reopened"
16+
- "ready_for_review"
17+
- "converted_to_draft"
18+
workflow_dispatch: ~
1419
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
16-
# Cancel intermediate builds: only if it is a pull request build.
17-
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18-
20+
group: "${{ github.workflow }}-${{ github.ref }}"
21+
cancel-in-progress: "${{ startsWith(github.ref, 'refs/pull/') }}"
1922
jobs:
2023
tests:
2124
name: "Tests"
2225
strategy:
2326
fail-fast: false
2427
matrix:
2528
version:
26-
- 'lts' # minimal supported version
27-
- '1' # latest released Julia version
28-
# group:
29-
# - 'core'
30-
# - 'optional'
29+
- "lts"
30+
- "1"
3131
os:
32-
- ubuntu-latest
33-
- macOS-latest
34-
- windows-latest
32+
- "ubuntu-latest"
33+
- "macOS-latest"
34+
- "windows-latest"
3535
uses: "ITensor/ITensorActions/.github/workflows/Tests.yml@main"
3636
with:
3737
group: "${{ matrix.group }}"
3838
julia-version: "${{ matrix.version }}"
3939
os: "${{ matrix.os }}"
40-
localregistry: https://github.com/ITensor/ITensorRegistry.git
40+
localregistry: "https://github.com/ITensor/ITensorRegistry.git"
4141
secrets:
42-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
42+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
43+
tests-gate:
44+
name: "Tests"
45+
needs: "tests"
46+
if: "${{ always() && needs.tests.result != 'skipped' }}"
47+
runs-on: "ubuntu-latest"
48+
steps:
49+
- name: "Fail if any matrix leg failed"
50+
run: |
51+
echo "tests.result = ${{ needs.tests.result }}"
52+
test "${{ needs.tests.result }}" = "success"
53+

.github/workflows/VersionCheck.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: "Version Check"
2-
32
on:
4-
pull_request:
5-
3+
pull_request: ~
64
jobs:
75
version-check:
86
name: "Version Check"
97
uses: "ITensor/ITensorActions/.github/workflows/VersionCheck.yml@main"
108
with:
11-
localregistry: https://github.com/ITensor/ITensorRegistry.git
9+
localregistry: "https://github.com/ITensor/ITensorRegistry.git"

0 commit comments

Comments
 (0)