Skip to content

Commit 9fc4e0e

Browse files
authored
Merge pull request #1 from tensor4all/umbrella/update-submodules-v0.7.0
Umbrella: update submodule pointers (incl. T4AITensorCompat v0.7.0)
2 parents f616707 + e9413f1 commit 9fc4e0e

16 files changed

+299
-4
lines changed

.JuliaFormatter.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
style="sciml"
2+
align_assignment=true
3+
align_struct_field=true
4+
always_for_in=true
5+
whitespace_ops_in_indices=true
6+
remove_extra_newlines=true
7+
always_use_return=false
8+
whitespace_in_kwargs=false
9+
format_docstrings=true
10+
normalize_line_endings="unix"
11+
trailing_comma=false
12+
separate_kwargs_with_semicolon=true
13+
whitespace_typedefs=false
14+
short_to_long_function_def=false

.github/workflows/CI.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
pull_request:
7+
branches:
8+
- main
9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: only if it is a pull request build.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
14+
15+
# needed to allow julia-actions/cache to delete old caches that it has created
16+
permissions:
17+
actions: write
18+
contents: read
19+
20+
jobs:
21+
test:
22+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version:
28+
- 'lts'
29+
- '1'
30+
os:
31+
- ubuntu-latest
32+
#- macOS-latest
33+
#- windows-latest
34+
arch:
35+
- x64
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: julia-actions/setup-julia@v2
39+
with:
40+
version: ${{ matrix.version }}
41+
arch: ${{ matrix.arch }}
42+
- name: Add Julia Registries
43+
run: |
44+
julia -e '
45+
using Pkg
46+
Pkg.Registry.add(
47+
RegistrySpec(url = "https://github.com/tensor4all/T4ARegistry.git")
48+
)'
49+
- uses: julia-actions/cache@v2
50+
- uses: julia-actions/julia-buildpkg@v1
51+
- uses: julia-actions/julia-runtest@v1
52+
continue-on-error: ${{ matrix.version == 'nightly' }}
53+
- uses: julia-actions/julia-processcoverage@v1
54+
- uses: codecov/codecov-action@v3
55+
docs:
56+
name: Documentation
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v4
60+
- uses: julia-actions/setup-julia@v2
61+
with:
62+
version: '1'
63+
- name: Add Julia Registries
64+
run: |
65+
julia -e '
66+
using Pkg
67+
Pkg.Registry.add(
68+
RegistrySpec(url = "https://github.com/tensor4all/T4ARegistry.git")
69+
)'
70+
- uses: julia-actions/julia-buildpkg@v1
71+
- uses: julia-actions/julia-docdeploy@v1
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: "3"
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
23+
jobs:
24+
TagBot:
25+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: JuliaRegistries/TagBot@v1
29+
with:
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
32+
ssh: ${{ secrets.DOCUMENTER_KEY }}
33+
# ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }}

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.*
2+
*~
3+
\#*\#
4+
5+
!.gitignore
6+
!/.github/
7+
!/.gitlab*
8+
9+
*.jl.*.cov
10+
*.jl.cov
11+
*.jl.mem
12+
.DS_Store
13+
/Manifest.toml
14+
/notebook*/
15+
/docs/Manifest.toml
16+
/docs/build/
17+
docs/build
18+
__pycache__/

.gitlab-ci.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
before_script:
2+
- which git || (apt-get update -qq && apt-get install --no-install-recommends -qqqy git)
3+
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "[email protected]:"
4+
- git config --global url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/".insteadOf "https://gitlab.com/" --add
5+
- |
6+
julia -e '
7+
using Pkg
8+
Pkg.Registry.add(
9+
RegistrySpec(url = "https://github.com/JuliaRegistries/General.git")
10+
)
11+
Pkg.Registry.add(
12+
RegistrySpec(url = "https://gitlab.com/tensors4fields/tensors4fieldsregistry.git")
13+
)'
14+
15+
variables:
16+
CI_JULIA_CACHE_DIR: ${CI_PROJECT_DIR}/julia_pkg
17+
JULIA_DEPOT_PATH: ${CI_JULIA_CACHE_DIR}
18+
cache:
19+
key:
20+
files:
21+
- Project.toml
22+
- docs/Project.toml
23+
prefix: ${CI_JOB_NAME}
24+
paths:
25+
- ${CI_JULIA_CACHE_DIR}
26+
27+
.script:
28+
script:
29+
- |
30+
julia --project=@. -e '
31+
using Pkg
32+
Pkg.build()
33+
Pkg.test(coverage=true)'
34+
.coverage:
35+
coverage: /Test coverage (\d+\.\d+%)/
36+
after_script:
37+
- |
38+
julia -e '
39+
using Pkg
40+
Pkg.add("Coverage")
41+
using Coverage
42+
c, t = get_summary(process_folder())
43+
using Printf
44+
@printf "Test coverage %.2f%%\n" 100c / t'
45+
Julia test:
46+
image: julia:${JULIA_VERSION}
47+
extends:
48+
- .script
49+
- .coverage
50+
parallel:
51+
matrix:
52+
- JULIA_VERSION:
53+
- "1.9"
54+
- "1" # latest stable version
55+
.doctest:
56+
script:
57+
- |
58+
julia --project=docs -e '
59+
using Pkg
60+
Pkg.develop(PackageSpec(path=pwd()))
61+
Pkg.instantiate()
62+
using Documenter: doctest
63+
using Quantics
64+
doctest(Quantics)
65+
include("docs/make.jl")'
66+
doctest:
67+
image: julia:1.6
68+
extends:
69+
- .doctest
70+
pages:
71+
image: julia:1.6
72+
stage: deploy
73+
extends:
74+
- .doctest
75+
after_script:
76+
- mkdir -p public
77+
- mv docs/build public/dev
78+
artifacts:
79+
paths:
80+
- public
81+
only:
82+
- main
83+
84+
CompatHelper:
85+
image: julia:1 # Set to the Julia version you want to use
86+
rules:
87+
- if: $CI_PIPELINE_SOURCE == "schedule"
88+
script:
89+
- |
90+
julia --color=yes -e "
91+
import Pkg;
92+
name = \"CompatHelper\";
93+
uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\";
94+
version = \"3\";
95+
Pkg.add(; name, uuid, version)"
96+
- |
97+
julia --color=yes -e "
98+
import CompatHelper;
99+
CompatHelper.main(;use_existing_registries=true)"

.gitmodules

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,14 @@
4343
[submodule "PartitionedMPSs.jl"]
4444
path = PartitionedMPSs.jl
4545
url = [email protected]:tensor4all/PartitionedMPSs.jl.git
46+
[submodule "T4APartitionedMPSs.jl"]
47+
path = T4APartitionedMPSs.jl
48+
url = https://github.com/tensor4all/T4APartitionedMPSs.jl
49+
[submodule "T4AQuantics.jl"]
50+
url = [email protected]:tensor4all/T4AQuantics.jl.git
51+
path = T4AQuantics.jl
52+
branch = develop
53+
[submodule "T4ATCIAlgorithms.jl"]
54+
path = T4ATCIAlgorithms.jl
55+
url = https://github.com/tensor4all/T4ATCIAlgorithms.jl
56+
branch = develop

AGENTS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,36 @@
1212

1313
- Run tests for a specific package by navigating to its directory and running `julia --project=. -e 'using Pkg; Pkg.test()'` or `julia --project=. test/runtests.jl`
1414

15+
- **When running tests, always redirect stdout and stderr to files and use tee for real-time output**: **Always save test output to files** - this is critical because test output contains detailed error messages, stack traces, and diagnostic information that you'll need for debugging. Without saving to files, you would need to run tests twice: once to see what happened, and again to capture the details. Using `tee` allows you to see progress in real-time while simultaneously saving everything to files. Example:
16+
```bash
17+
julia --project=. test/runtests.jl 2>&1 | tee test_output.log
18+
```
19+
Or to separate stdout and stderr while still seeing both in real-time:
20+
```bash
21+
julia --project=. test/runtests.jl > >(tee test_stdout.log) 2> >(tee test_stderr.log >&2)
22+
```
23+
**Important**: Always save test output to files. The saved logs are essential for debugging failures, understanding test behavior, and reviewing detailed error messages without re-running tests.
24+
1525
- For debugging specific tests, it's more efficient to run only the relevant test file. For packages using `include()` statements in `runtests.jl` (like TensorCrossInterpolation.jl), comment out unnecessary includes and run only the test file you're debugging
1626

1727
- Some libraries use ReTestItems as their test framework (e.g., Quantics.jl, QuanticsGrids.jl, TreeTCI.jl, SimpleTensorTrains.jl). However, ReTestItems has compatibility issues with libraries that use Distributed for parallel computation, so those libraries use the standard Test.jl framework instead
1828

29+
- **For ReTestItems packages, you can run individual test files**: ReTestItems supports running specific test files by passing file paths to `runtests()`. This is useful for debugging specific tests without running the entire test suite. Examples:
30+
```bash
31+
# Run a specific test file
32+
julia --project=. -e "using ReTestItems; runtests(\"test/binaryop_tests.jl\")"
33+
34+
# Run multiple specific test files
35+
julia --project=. -e "using ReTestItems; runtests(\"test/binaryop_tests.jl\", \"test/mul_tests.jl\")"
36+
37+
# Run with specific options (e.g., single worker for debugging)
38+
julia --project=. -e "using ReTestItems; runtests(\"test/binaryop_tests.jl\"; nworkers=1)"
39+
```
40+
Note: The file paths should be relative to the package root directory. Always redirect output to files when debugging:
41+
```bash
42+
julia --project=. -e "using ReTestItems; runtests(\"test/binaryop_tests.jl\")" 2>&1 | tee test_binaryop.log
43+
```
44+
1945
- If a package has a `.JuliaFormatter.toml` file, follow its formatting rules. Otherwise, follow standard Julia style guidelines
2046

2147
- When making changes that affect multiple packages, consider the dependency graph and test affected packages accordingly

ITensorMPS.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 56f0cbf1b0d30dd5a6f25f7d4fbd248b22f38160

0 commit comments

Comments
 (0)