Skip to content

Commit 043e62c

Browse files
committed
Merge branch 'main' into gd/coherent_map
2 parents 0955815 + 08d5708 commit 043e62c

161 files changed

Lines changed: 8731 additions & 4262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.JuliaFormatter.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
style = "blue"
2-
align_assignment = true
3-
align_struct_field = true
4-
align_conditional = true
5-
align_pair_arrow = true
6-
align_matrix = true
2+
format_docstrings = true
3+
format_markdown = true

.buildkite/pipeline.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
steps:
22
- label: "DI GPU tests"
3-
if: |
4-
!build.pull_request.draft &&
5-
build.pull_request.labels includes "gpu"
63
plugins:
74
- JuliaCI/julia#v1:
85
version: "1"
96
command: |
10-
julia ./DifferentiationInterface/test/GPU/CUDA/simple.jl
7+
julia ./DifferentiationInterface/test/GPU/CUDA/main.jl
118
agents:
129
queue: "juliagpu"
1310
cuda: "*"
14-
timeout_in_minutes: 60
11+
timeout_in_minutes: 60

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
env:
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45-
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/Documentation.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1616

1717
jobs:
18-
18+
1919
docs:
2020
name: ${{ matrix.pkg.shortcut }}
2121
runs-on: ubuntu-latest
@@ -33,15 +33,15 @@ jobs:
3333
- name: DifferentiationInterfaceTest
3434
shortcut: DIT
3535
dir: './DifferentiationInterfaceTest'
36-
36+
3737
steps:
3838
- uses: actions/checkout@v4
3939
- uses: julia-actions/setup-julia@v2
4040
with:
4141
version: '1' # TODO: 1
4242
- uses: julia-actions/cache@v1
4343
- name: Install dependencies
44-
run: julia --project=${{ matrix.pkg.dir}}/docs/ -e '
44+
run: julia --project=${{ matrix.pkg.dir}}/docs/ --color=yes -e '
4545
using Pkg;
4646
Pkg.Registry.update();
4747
if "${{ matrix.pkg.name}}" == "DifferentiationInterface";
@@ -54,4 +54,4 @@ jobs:
5454
env:
5555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
5656
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
57-
run: julia --project=${{ matrix.pkg.dir}}/docs/ ${{ matrix.pkg.dir}}/docs/make.jl
57+
run: julia --project=${{ matrix.pkg.dir}}/docs/ --color=yes ${{ matrix.pkg.dir}}/docs/make.jl

.github/workflows/PreCommit.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Pre-Commit
2+
3+
# needed to allow julia-actions/cache to delete old caches that it has created
4+
permissions:
5+
actions: write
6+
contents: read
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
tags: ["*"]
13+
pull_request:
14+
types: [opened, reopened, synchronize, ready_for_review]
15+
workflow_dispatch:
16+
17+
jobs:
18+
pre-commit:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: julia-actions/setup-julia@v2
23+
- uses: julia-actions/cache@v2
24+
- run: julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
25+
- uses: astral-sh/setup-uv@v6
26+
- run: uv tool install pre-commit
27+
- run: pre-commit run --all-files --show-diff-on-failure --color always

.github/workflows/Register.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
steps:
1414
- uses: julia-actions/RegisterAction@latest
1515
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
16+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/TagBot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
with:
3737
token: ${{ secrets.GITHUB_TOKEN }}
3838
ssh: ${{ secrets.DOCUMENTER_KEY }}
39-
subdir: DifferentiationInterfaceTest
39+
subdir: DifferentiationInterfaceTest

.github/workflows/Test.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
name: ${{ matrix.version }} - DI (${{ matrix.group }})
2121
runs-on: ubuntu-latest
2222
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skipci') }}
23-
timeout-minutes: 60
23+
timeout-minutes: 120
2424
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
2525
actions: write
2626
contents: read
2727
strategy:
28-
fail-fast: false # TODO: toggle
28+
fail-fast: true # TODO: toggle
2929
matrix:
3030
version:
3131
- "1.10"
@@ -60,6 +60,7 @@ jobs:
6060
group: Back/ChainRules
6161
env:
6262
JULIA_DI_TEST_GROUP: ${{ matrix.group }}
63+
JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}
6364
steps:
6465
- uses: actions/checkout@v4
6566
- uses: julia-actions/setup-julia@v2
@@ -69,10 +70,14 @@ jobs:
6970
- uses: julia-actions/cache@v2
7071
- name: Install dependencies & run tests
7172
# how to add the local DIT to the DI test env?
72-
run: julia --project=./DifferentiationInterface -e '
73+
run: julia --project=./DifferentiationInterface --color=yes -e '
7374
using Pkg;
7475
Pkg.Registry.update();
75-
Pkg.test("DifferentiationInterface"; coverage=true);'
76+
if ENV["JULIA_DI_PR_DRAFT"] == "true";
77+
Pkg.test("DifferentiationInterface"; coverage=true, julia_args=["-O1"]);
78+
else;
79+
Pkg.test("DifferentiationInterface"; coverage=true);
80+
end;'
7681
- uses: julia-actions/julia-processcoverage@v1
7782
with:
7883
directories: ./DifferentiationInterface/src,./DifferentiationInterface/ext,./DifferentiationInterface/test
@@ -109,6 +114,7 @@ jobs:
109114
version: "1.10"
110115
env:
111116
JULIA_DIT_TEST_GROUP: ${{ matrix.group }}
117+
JULIA_DI_PR_DRAFT: ${{ github.event.pull_request.draft }}
112118
steps:
113119
- uses: actions/checkout@v4
114120
- uses: julia-actions/setup-julia@v2
@@ -117,11 +123,15 @@ jobs:
117123
arch: x64
118124
- uses: julia-actions/cache@v2
119125
- name: Install dependencies & run tests
120-
run: julia --project=./DifferentiationInterfaceTest -e '
126+
run: julia --project=./DifferentiationInterfaceTest --color=yes -e '
121127
using Pkg;
122128
Pkg.Registry.update();
123129
Pkg.develop(path="./DifferentiationInterface");
124-
Pkg.test("DifferentiationInterfaceTest"; coverage=true);'
130+
if ENV["JULIA_DI_PR_DRAFT"] == "true";
131+
Pkg.test("DifferentiationInterfaceTest"; coverage=true, julia_args=["-O1"]);
132+
else;
133+
Pkg.test("DifferentiationInterfaceTest"; coverage=true);
134+
end;'
125135
- uses: julia-actions/julia-processcoverage@v1
126136
with:
127137
directories: ./DifferentiationInterfaceTest/src,./DifferentiationInterfaceTest/ext,./DifferentiationInterfaceTest/test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
*.csv
1212

1313
playground.jl
14-
.vscode
14+
.vscode

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: check-yaml
6+
- id: check-added-large-files
7+
- id: check-merge-conflict
8+
- id: no-commit-to-branch
9+
- repo: "https://github.com/domluna/JuliaFormatter.jl"
10+
rev: "v2.1.6" # or whatever the desired release is
11+
hooks:
12+
- id: "julia-formatter"
13+
fail_fast: true

0 commit comments

Comments
 (0)