diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..5336703c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +enable-beta-ecosystems: true # Julia ecosystem +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + - package-ecosystem: "julia" + directories: # Location of Julia projects + - "/" + - "/docs" + - "/test" + schedule: + interval: "weekly" + groups: + # Group all Julia package updates into a single PR: + all-julia-packages: + patterns: + - "*" \ No newline at end of file diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9084de46..08d630ed 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.10', '1'] + version: ['1.10', '1.11'] os: [ubuntu-latest] arch: [x64] allow_failure: [false] @@ -47,7 +47,7 @@ jobs: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: - version: '1' + version: '1.11' - uses: julia-actions/cache@v1 - name: Install dependencies run: julia --project=docs/ -e 'using Pkg; Pkg.Registry.update(); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' @@ -55,4 +55,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key - run: julia --project=docs/ docs/make.jl \ No newline at end of file + run: julia --project=docs/ docs/make.jl diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml deleted file mode 100644 index d1891a4b..00000000 --- a/.github/workflows/CompatHelper.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: CompatHelper -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: -permissions: - contents: write - pull-requests: write -jobs: - CompatHelper: - runs-on: ubuntu-latest - steps: - - name: Check if Julia is already available in the PATH - id: julia_in_path - run: which julia - continue-on-error: true - - name: Install Julia, but only if it is not already available in the PATH - uses: julia-actions/setup-julia@v2 - with: - version: '1' - arch: ${{ runner.arch }} - if: steps.julia_in_path.outcome != 'success' - - name: "Add the General registry via Git" - run: | - import Pkg - ENV["JULIA_PKG_SERVER"] = "" - Pkg.Registry.add("General") - shell: julia --color=yes {0} - - name: "Install CompatHelper" - run: | - import Pkg - name = "CompatHelper" - uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" - version = "3" - Pkg.add(; name, uuid, version) - shell: julia --color=yes {0} - - name: "Run CompatHelper" - run: | - import CompatHelper - CompatHelper.main() - shell: julia --color=yes {0} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # This repo uses Documenter, so we can reuse our [Documenter SSH key](https://documenter.juliadocs.org/stable/man/hosting/walkthrough/). - # If we didn't have one of those setup, we could configure a dedicated ssh deploy key `COMPATHELPER_PRIV` following https://juliaregistries.github.io/CompatHelper.jl/dev/#Creating-SSH-Key. - # Either way, we need an SSH key if we want the PRs that CompatHelper creates to be able to trigger CI workflows themselves. - # That is because GITHUB_TOKEN's can't trigger other workflows (see https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow). - # Check if you have a deploy key setup using these docs: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys. - COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} - # COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} \ No newline at end of file diff --git a/.github/workflows/Format.yml b/.github/workflows/Format.yml new file mode 100644 index 00000000..fe8b9dc4 --- /dev/null +++ b/.github/workflows/Format.yml @@ -0,0 +1,13 @@ +name: Format suggestions +on: + pull_request: + # this argument is not required if you don't use the `suggestion-label` input + types: [opened, reopened, synchronize, labeled, unlabeled] +jobs: + code-style: + runs-on: ubuntu-latest + steps: + - uses: julia-actions/julia-format@v4 + with: + version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1') + suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs diff --git a/Project.toml b/Project.toml index d9fd8b2a..74a036d7 100644 --- a/Project.toml +++ b/Project.toml @@ -21,78 +21,10 @@ ImplicitDifferentiationZygoteExt = "Zygote" [compat] ADTypes = "1.9.0" -Aqua = "0.8.13" ChainRulesCore = "1.25.0" -ChainRulesTestUtils = "1.13.0" -ComponentArrays = "0.15.27" DifferentiationInterface = "0.6.1,0.7" -Documenter = "1.12.0" -ExplicitImports = "1" -FiniteDiff = "2.27.0" ForwardDiff = "0.10.36, 1" -JET = "0.9, 0.10" -JuliaFormatter = "2.1.2" -Krylov = "0.9.6, 0.10" KrylovKit = "0.10.0" LinearAlgebra = "1" -NLsolve = "4.5.1" -Optim = "1.12.0" -Random = "1" -SparseArrays = "1" -StaticArrays = "1.9.13" -Test = "1" -TestItemRunner = "1.1.0" -TestItems = "1.0.0" Zygote = "0.7.4" julia = "1.10" - -[extras] -ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" -ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a" -ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" -DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" -Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" -FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" -JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" -Optim = "429524aa-4258-5aef-a3af-852621145aeb" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" -SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" -TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe" -Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[targets] -test = [ - "ADTypes", - "Aqua", - "ChainRulesCore", - "ChainRulesTestUtils", - "ComponentArrays", - "DifferentiationInterface", - "Documenter", - "ExplicitImports", - "FiniteDiff", - "ForwardDiff", - "JET", - "JuliaFormatter", - "LinearAlgebra", - "NLsolve", - "Optim", - "Random", - "SparseArrays", - "StaticArrays", - "Test", - "TestItems", - "TestItemRunner", - "Zygote", -] diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 00000000..41019f99 --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,52 @@ +[deps] +ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" +ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a" +ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" +DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" +FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" +ImplicitDifferentiation = "57b37032-215b-411a-8a7c-41a003a55207" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" +Optim = "429524aa-4258-5aef-a3af-852621145aeb" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" +TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe" +Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[sources] +ImplicitDifferentiation = { path = ".." } + +[compat] +ADTypes = "1.9.0" +Aqua = "0.8.13" +ChainRulesCore = "1.25.0" +ChainRulesTestUtils = "1.13.0" +ComponentArrays = "0.15.27" +DifferentiationInterface = "0.6.1,0.7" +Documenter = "1.12.0" +ExplicitImports = "1" +FiniteDiff = "2.27.0" +ForwardDiff = "0.10.36, 1" +JET = "0.9, 0.10, 0.11" +KrylovKit = "0.10.2" +LinearAlgebra = "1" +NLsolve = "4.5.1" +Optim = "1.12.0" +Random = "1" +SparseArrays = "1" +StaticArrays = "1.9.13" +Test = "1" +TestItemRunner = "1.1.0" +TestItems = "1.0.0" +Zygote = "0.7.4" +julia = "1.10" diff --git a/test/formalities.jl b/test/formalities.jl index 16770760..22aedc14 100644 --- a/test/formalities.jl +++ b/test/formalities.jl @@ -7,16 +7,11 @@ using TestItems Aqua.test_all(ImplicitDifferentiation; ambiguities=false, undocumented_names=true) end -@testitem "Formatting" begin - using JuliaFormatter - @test format(ImplicitDifferentiation; verbose=false, overwrite=false) -end - @testitem "Static checking" begin using JET using ForwardDiff: ForwardDiff using Zygote: Zygote - JET.test_package(ImplicitDifferentiation; target_defined_modules=true) + JET.test_package(ImplicitDifferentiation; target_modules=(ImplicitDifferentiation,)) end @testitem "Imports" begin