Movatterモバイル変換


[0]ホーム

URL:


GitHub

Aqua.jl:AutoQUalityAssurance for Julia packages

Aqua.jl provides functions to run a few automatable checks for Julia packages:

Quick usage

CallAqua.test_all(YourPackage) from the REPL, e.g.,

using YourPackageusing AquaAqua.test_all(YourPackage)

How to add Aqua.jl...

...as a test dependency?

There are two ways to add Aqua.jl as a test dependency to your package. To avoid breaking tests when a new Aqua.jl version is released, it is recommended to add a version bound for Aqua.jl.

  1. InYourPackage/test/Project.toml, add Aqua.jl to[dep] and[compat] sections, like

    [deps]Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"[compat]Aqua = "0.8"
  2. InYourPackage/Project.toml, add Aqua.jl to[compat] and[extras] section and thetest target, like

    [compat]Aqua = "0.8"[extras]Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"[targets]test = ["Aqua", "Test"]

If your package supports Julia pre-1.2, you need to use the second approach, although you can use both approaches at the same time.

Warning

In normal use,Aqua.jl should not be added to[deps] inYourPackage/Project.toml!

...to your tests?

It is recommended to create a separate fileYourPackage/test/Aqua.jl that gets included inYourPackage/test/runtests.jl with either

using AquaAqua.test_all(YourPackage)

or some fine-grained checks with options, e.g.,

using Aqua@testset "Aqua.jl" begin  Aqua.test_all(    YourPackage;    ambiguities=(exclude=[SomePackage.some_function], broken=true),    stale_deps=(ignore=[:SomePackage],),    deps_compat=(ignore=[:SomeOtherPackage],),    piracies=false,  )end

Note, that for all tests with no explicit options provided, the default options are used.

For more details on the options, see the respective functionshere.

Examples

The following is a small selection of packages that use Aqua.jl:

Settings


This document was generated withDocumenter.jl version 1.11.4 onWednesday 28 May 2025. Using Julia version 1.11.5.


[8]ページ先頭

©2009-2025 Movatter.jp