Skip to content

Commit 76353fe

Browse files
authored
Add Aqua.jl for quality assurance (#112)
* add aqua * Add compat bounds * All tests pass now * Add button to README.md --------- Co-authored-by: Uwe Fechner <[email protected]>
1 parent d3dcd16 commit 76353fe

File tree

6 files changed

+37
-18
lines changed

6 files changed

+37
-18
lines changed

Project.toml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
1919
SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
2020
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2121
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
22-
Timers = "21f18d07-b854-4dab-86f0-c15a3821819a"
2322

2423
[weakdeps]
2524
ControlPlots = "23c2ee80-7a9e-4350-b264-8e670f12517c"
@@ -28,31 +27,44 @@ ControlPlots = "23c2ee80-7a9e-4350-b264-8e670f12517c"
2827
VortexStepMethodControlPlotsExt = "ControlPlots"
2928

3029
[compat]
30+
Aqua = "0.8"
3131
BenchmarkTools = "1"
3232
Colors = "0.13"
3333
ControlPlots = "0.2.5"
34+
CSV = "0.10"
35+
DataFrames = "1.7"
3436
DefaultApplication = "1"
3537
DelimitedFiles = "1"
38+
Distributed = "1.10"
39+
Documenter = "1.8"
3640
Interpolations = "0.15"
3741
LaTeXStrings = "1"
42+
LinearAlgebra = "1"
43+
Logging = "1"
3844
Measures = "0.3"
3945
NonlinearSolve = "4"
4046
Parameters = "0.12"
4147
Pkg = "1"
48+
Serialization = "1"
49+
SharedArrays = "1"
4250
StaticArrays = "1"
4351
Statistics = "1"
4452
Timers = "0.1"
53+
Test = "1"
54+
Xfoil = "0.5"
4555
julia = "1.10, 1.11"
4656

4757
[extras]
58+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
4859
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
4960
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
5061
ControlPlots = "23c2ee80-7a9e-4350-b264-8e670f12517c"
5162
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
5263
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
5364
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
5465
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
66+
Timers = "21f18d07-b854-4dab-86f0-c15a3821819a"
5567
Xfoil = "19641d66-a62d-11e8-2441-8f57a969a9c4"
5668

5769
[targets]
58-
test = ["Test", "DataFrames", "CSV", "Distributed", "Documenter", "Xfoil", "BenchmarkTools", "ControlPlots"]
70+
test = ["Test", "DataFrames", "CSV", "Distributed", "Documenter", "Xfoil", "Timers", "BenchmarkTools", "ControlPlots", "Aqua"]

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://Albatross-Kite-Transport.github.io/VortexStepMethod.jl/stable) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://Albatross-Kite-Transport.github.io/VortexStepMethod.jl/dev) [![Build Status](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/Albatross-Kite-Transport/VortexStepMethod.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/Albatross-Kite-Transport/VortexStepMethod.jl)
1+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://Albatross-Kite-Transport.github.io/VortexStepMethod.jl/stable)
2+
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://Albatross-Kite-Transport.github.io/VortexStepMethod.jl/dev)
3+
[![Build Status](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/actions/workflows/CI.yml?query=branch%3Amain)
4+
[![Coverage](https://codecov.io/gh/Albatross-Kite-Transport/VortexStepMethod.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/Albatross-Kite-Transport/VortexStepMethod.jl)
5+
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
26

37

48
# Aerodynamic models of 3D wings using the Vortex Step Method

examples/menu.jl

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
11
using ControlPlots
22
using VortexStepMethod
33
using REPL.TerminalMenus
4-
using DefaultApplication
54

65
url = "https://albatross-kite-transport.github.io/VortexStepMethod.jl/dev"
76

8-
function help()
9-
if Sys.islinux()
10-
io = IOBuffer()
11-
run(pipeline(`xdg-open $url`, stderr = io))
12-
# ignore any error messages
13-
out_data = String(take!(io))
14-
else
15-
DefaultApplication.open(url)
16-
end
17-
nothing
18-
end
19-
207
options = ["rectangular_wing = include(\"rectangular_wing.jl\")",
218
"ram_air_kite = include(\"ram_air_kite.jl\")",
229
"stall_model = include(\"stall_model.jl\")",
2310
"bench = include(\"bench.jl\")",
2411
"cleanup = include(\"cleanup.jl\")",
25-
"help_me = help()",
12+
"help_me = VortexStepMethod.help(url)",
2613
"quit"]
2714

2815
function example_menu()

src/VortexStepMethod.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ using Logging
66
using Statistics
77
using Colors
88
using DelimitedFiles
9+
using DefaultApplication
910
using Measures
1011
using LaTeXStrings
1112
using NonlinearSolve
@@ -20,7 +21,7 @@ using Pkg
2021
export Wing, Section, KiteWing
2122
export BodyAerodynamics
2223
export Solver, solve, solve_base, solve!, VSMSolution
23-
export calculate_results, solve_circulation_distribution
24+
export calculate_results
2425
export add_section!, set_va!
2526
export calculate_span, calculate_projected_area
2627
export menu, MVec3
@@ -218,6 +219,18 @@ function copy_files(relpath, files)
218219
files
219220
end
220221

222+
function help(url)
223+
if Sys.islinux()
224+
io = IOBuffer()
225+
run(pipeline(`xdg-open $url`, stderr = io))
226+
# ignore any error messages
227+
out_data = String(take!(io))
228+
else
229+
DefaultApplication.open(url)
230+
end
231+
nothing
232+
end
233+
221234
# Include core functionality
222235
include("wing_geometry.jl")
223236
include("kite_geometry.jl")

test/aqua.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
using Aqua
2+
Aqua.test_all(VortexStepMethod)

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ println("Running tests...")
1111
include("test_kite_geometry.jl")
1212
include("test_wing_geometry.jl")
1313
include("test_plotting.jl")
14+
include("aqua.jl")
1415
end

0 commit comments

Comments
 (0)