From 98da06d8abfbd9e13a0e42012a5299dcbd2a2a35 Mon Sep 17 00:00:00 2001 From: Christian Merdon Date: Wed, 6 Nov 2024 14:08:31 +0100 Subject: [PATCH] added Tests for ExplicitImports, use latest julia version in ci.yml --- .github/workflows/ci.yml | 2 +- ext/ExtendableFEMBaseUnicodePlotsExt.jl | 8 ++++---- src/ExtendableFEMBase.jl | 6 +++--- test/Project.toml | 1 + test/runtests.jl | 7 +++++++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fe46dd..96c40dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: - - '1.9' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. + - 'lts' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. # - 'nightly' os: diff --git a/ext/ExtendableFEMBaseUnicodePlotsExt.jl b/ext/ExtendableFEMBaseUnicodePlotsExt.jl index b08a04f..085d1c3 100644 --- a/ext/ExtendableFEMBaseUnicodePlotsExt.jl +++ b/ext/ExtendableFEMBaseUnicodePlotsExt.jl @@ -3,7 +3,7 @@ module ExtendableFEMBaseUnicodePlotsExt using ExtendableGrids: ExtendableGrid, simplexgrid, ON_CELLS, ON_FACES, ON_EDGES, CellNodes, CellGeometries, BFaceNodes, BFaceRegions, Coordinates using ExtendableFEMBase: FEVector, FEVectorBlock, FESpace, lazy_interpolate!, num_cells, local_celledgenodes, get_ncomponents, H1P1, IdentityComponent, standard_kernel using UnicodePlots: UnicodePlots, BrailleCanvas, Plot, heatmap, lineplot, - lineplot!, lines! + lineplot!, lines! import ExtendableFEMBase: unicode_gridplot, unicode_scalarplot @@ -140,9 +140,9 @@ function unicode_scalarplot( title = title * (length(components) == 1 ? "" : "[$(components[c])]"), colormap = colormap, ) for c ∈ 1:length(components) - ] - return length(plts) == 1 ? plts[1] : plts - ## the following command looks nicer, but requires the Term-based extension of UnicodePlots + ] + return length(plts) == 1 ? plts[1] : plts + ## the following command looks nicer, but requires the Term-based extension of UnicodePlots ## return UnicodePlots.gridplot(map(i -> plts[i], 1:length(components)); layout = (nrows, nothing)) end end diff --git a/src/ExtendableFEMBase.jl b/src/ExtendableFEMBase.jl index dcf38fe..8ffc10e 100644 --- a/src/ExtendableFEMBase.jl +++ b/src/ExtendableFEMBase.jl @@ -13,7 +13,7 @@ using ExtendableGrids: ExtendableGrids, AT_NODES, AbstractElementGeometry, AbstractGridFloatArray2D, AbstractGridIntegerArray2D, Adjacency, AssemblyType, BEdgeEdges, BEdgeGeometries, BEdgeRegions, BEdgeVolumes, BFaceEdges, BFaceFaces, - BFaceGeometries, BFaceNodes, BFaceParents, BFaceRegions, + BFaceGeometries, BFaceParents, BFaceRegions, BFaceVolumes, CellEdgeSigns, CellEdges, CellFaceOrientations, CellFaceSigns, CellFaces, CellFinder, CellGeometries, CellNodes, CellParents, @@ -40,7 +40,7 @@ using ExtendableGrids: ExtendableGrids, AT_NODES, AbstractElementGeometry, local_celledgenodes, local_cellfacenodes, mapderiv!, max_num_targets_per_source, num_cells, num_edges, num_faces, num_nodes, num_sources, num_targets, - reference_domain, simplexgrid, subgrid, unique, + reference_domain, subgrid, unique, update_trafo! using ExtendableSparse: ExtendableSparse, ExtendableSparseMatrix, flush!, AbstractExtendableSparseMatrixCSC, ExtendableSparseMatrixCSC, MTExtendableSparseMatrixCSC, @@ -51,7 +51,7 @@ using LinearAlgebra: LinearAlgebra, convert, det, diagm, dot, eigen, ldiv!, lu, using Polynomials: Polynomials, Polynomial, coeffs using Printf: Printf, @printf using SparseArrays: SparseArrays, AbstractSparseArray, AbstractSparseMatrix, - SparseMatrixCSC, nzrange, rowvals, sparse + SparseMatrixCSC, nzrange, rowvals using SpecialPolynomials: SpecialPolynomials, ShiftedLegendre, basis include("functionoperators.jl") diff --git a/test/Project.toml b/test/Project.toml index 4496018..bf2d516 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -3,6 +3,7 @@ ExtendableFEMBase = "12fb9182-3d4c-4424-8fd1-727a0899810c" ExtendableSparse = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3" ExtendableGrids = "cfc395e8-590f-11e8-1f13-43a2532b2fa8" ExampleJuggler = "3bbe58f8-ed81-4c4e-a134-03e85fcf4a1a" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" GridVisualize = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl index d4cd50a..03ee753 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,7 @@ using Test using ExtendableGrids using ExtendableFEMBase +using ExplicitImports using ExampleJuggler using SparseArrays using Aqua @@ -14,12 +15,18 @@ using Aqua Aqua.test_ambiguities(ExtendableFEMBase) end +@testset "ExplicitImports" begin + @test ExplicitImports.check_no_implicit_imports(ExtendableFEMBase) === nothing + @test ExplicitImports.check_no_stale_explicit_imports(ExtendableFEMBase) === nothing +end + if isdefined(Docs, :undocumented_names) # >=1.11 @testset "UndocumentedNames" begin @test isempty(Docs.undocumented_names(ExtendableFEMBase)) end end + include("test_quadrature.jl") include("test_interpolators.jl") include("test_operators.jl")