Skip to content

Commit

Permalink
Fix Vararg warning and update workflows (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlevy authored Oct 14, 2024
1 parent 4d67103 commit 0e0494e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ on:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: "3"
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Format check
on:
push:
branches: [master]
branches: [main]
tags: [v*]
pull_request:

Expand All @@ -10,8 +10,8 @@ jobs:
name: "Format Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: 1
- name: Install JuliaFormatter and format
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
Expand All @@ -15,7 +15,7 @@ jobs:
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format_suggestions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: 1
Expand Down
2 changes: 1 addition & 1 deletion src/ITensors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ end
#

ITensors.IndexSet(is::IndexSet...) = unioninds(is)
ITensors.IndexSet(is::Tuple{Vararg{<:IndexSet}}) = unioninds(is...)
ITensors.IndexSet(is::Tuple{Vararg{IndexSet}}) = unioninds(is...)

Base.copy(is::IndexSet) = IndexSet(copy.(ITensors.data(is)))

Expand Down
2 changes: 1 addition & 1 deletion src/infinitecanonicalmps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end
# of Index (Tuple, Vector, ITensor, etc.)
indtype(i::Index) = typeof(i)
indtype(T::Type{<:Index}) = T
indtype(is::Tuple{Vararg{<:Index}}) = eltype(is)
indtype(is::Tuple{Vararg{Index}}) = eltype(is)
indtype(is::Vector{<:Index}) = eltype(is)
indtype(A::ITensor...) = indtype(inds.(A))

Expand Down

0 comments on commit 0e0494e

Please sign in to comment.