Skip to content

Commit

Permalink
Merge branch 'master' into mh/kill-project_toml_formatting-test
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Oct 24, 2023
2 parents ce3cd5d + 7f18f15 commit 42c648a
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ jobs:
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: Remove compat entry for old julia versions
# This is needed for julia 1.0-1.3, see https://julialang.slack.com/archives/C67910KEH/p1697548190422019?thread_ts=1697546952.011759&cid=C67910KEH
if: matrix.julia-version == '1.0' || matrix.julia-version == '1.1' || matrix.julia-version == '1.2' || matrix.julia-version == '1.3'
shell: julia --project=. --color=yes {0}
run: |
using Pkg.TOML
prj = TOML.parsefile("Project.toml")
delete!(prj["compat"], "Test")
open(io -> TOML.print(io, prj), "Project.toml", "w")
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.4] - 2023-10-24

### Added

- `test_deps_compat` has two new kwargs `check_extras` and `check_weakdeps` to extend the test to these dependency categories. They are not run by default. ([#200](https://github.com/JuliaTesting/Aqua.jl/pull/200))

### Changed

- The docstring for `test_stale_deps` explains the situation with package extensions. ([#203](https://github.com/JuliaTesting/Aqua.jl/pull/203))
- The logo of Aqua.jl has been updated. ([#128](https://github.com/JuliaTesting/Aqua.jl/pull/128))

### Removed

Expand Down
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
badge.svg:
curl -o 'badge.svg' 'https://img.shields.io/badge/tested_with-Aqua.jl-05C3DD.svg?logo=data:image/svg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ThiMjtmaWxsLW9wYWNpdHk6MTtzdHJva2U6I2ZlZmVmZTtzdHJva2Utd2lkdGg6MC4zO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiCiAgICAgaWQ9InBhdGgxMDEwMy0zIgogICAgIGN4PSIzLjg4NDQ5NjUiCiAgICAgY3k9IjIuNTgyMTc1IgogICAgIHI9IjAuOTIwODU3NzMiIC8+CiAgPGcKICAgICBpZD0ibGF5ZXIyIgogICAgIHN0eWxlPSJkaXNwbGF5Om5vbmUiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC43OTM3NTA2MykiIC8+Cjwvc3ZnPgo='
all: generate_badge generate_favicon

.PHONY: all generate_badge generate_favicon

generate_badge:
SVG_BASE64=$(shell base64 -w 0 docs/src/assets/logo.svg); \
curl -o "badge.svg" "https://img.shields.io/badge/tested_with-Aqua.jl-05C3DD.svg?logo=data:image/svg+xml;base64,$$SVG_BASE64"

generate_favicon:
convert -background none docs/src/assets/logo.svg -resize 256x256 -gravity center -extent 256x256 logo.png
convert logo.png -define icon:auto-resize=256,64,48,32,16 docs/src/assets/favicon.ico
rm logo.png
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Aqua"
uuid = "4c88cf16-eb10-579e-8560-4a9242c79595"
authors = ["Takafumi Arakaki <aka.tkf@gmail.com> and contributors"]
version = "0.7.3"
version = "0.7.4"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand All @@ -10,6 +10,8 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Compat = "3.12, 4"
Pkg = "1.0"
Test = "1.0"
julia = "1.0"

[extras]
Expand Down
2 changes: 1 addition & 1 deletion badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ makedocs(;
modules = [Aqua],
pages = ["Home" => "index.md"],
sitename = "Aqua.jl",
format = Documenter.HTML(; repolink = "https://github.com/JuliaTesting/Aqua.jl"),
format = Documenter.HTML(;
repolink = "https://github.com/JuliaTesting/Aqua.jl",
assets = ["assets/favicon.ico"],
),
authors = "Takafumi Arakaki",
warnonly = true,
)
Expand Down
Binary file added docs/src/assets/favicon.ico
Binary file not shown.
60 changes: 60 additions & 0 deletions docs/src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 34 additions & 3 deletions src/deps_compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,43 @@ each package listed under `deps`.
them.
# Keyword Arguments
## Test choosers
- `check_extras = false`: If true, additionally check "extras". A NamedTuple
can be used to pass keyword arguments with test options (see below).
- `check_weakdeps = false`: If true, additionally check "weakdeps". A NamedTuple
can be used to pass keyword arguments with test options (see below).
## Test options
If these keyword arguments are set directly, they only apply to the standard test
for "deps". To apply them to "extras" and "weakdeps", pass them as a NamedTuple
to the corresponding `check_\$x` keyword argument.
- `broken::Bool = false`: If true, it uses `@test_broken` instead of
`@test`.
`@test` for "deps".
- `ignore::Vector{Symbol}`: names of dependent packages to be ignored.
"""
function test_deps_compat(pkg::PkgId; broken::Bool = false, kwargs...)
result = find_missing_deps_compat(pkg; kwargs...)
function test_deps_compat(
pkg::PkgId;
check_extras = false, # Maybe switch to `true` for next breaking version
check_weakdeps = false, # Maybe switch to `true` for next breaking version
kwargs...,
)
@testset "$pkg deps" begin
test_deps_compat(pkg, "deps"; kwargs...)
end
if check_extras !== false
@testset "$pkg extras" begin
result = test_deps_compat(pkg, "extras"; askwargs(check_extras)...)
end
end
if check_weakdeps !== false
@testset "$pkg weakdeps" begin
result = test_deps_compat(pkg, "weakdeps"; askwargs(check_weakdeps)...)
end
end
end

function test_deps_compat(pkg::PkgId, deps_type::String; broken::Bool = false, kwargs...)
result = find_missing_deps_compat(pkg, deps_type; kwargs...)
if broken
@test_broken isempty(result)
else
Expand Down
2 changes: 1 addition & 1 deletion src/unbound_args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Test that all methods in `module` and its submodules do not have
unbound type parameters. An unbound type parameter is a type parameter
with a `where`, that does not occurr in the signature of some dispatch
with a `where`, that does not occur in the signature of some dispatch
of the method.
# Keyword Arguments
Expand Down
2 changes: 1 addition & 1 deletion test/test_smoke.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Aqua.test_all(
undefined_exports = false,
project_extras = false,
stale_deps = false,
deps_compat = false,
deps_compat = (; check_extras = true, check_weakdeps = true),
piracy = false,
)

Expand Down

0 comments on commit 42c648a

Please sign in to comment.