Skip to content

Commit

Permalink
Add precompile and update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Svoboda committed May 5, 2023
1 parent d2ea126 commit 69025ee
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Jadex"
uuid = "302b6ea9-03d1-47d0-b3e6-7bc5ec1c11d5"
authors = ["Brian Svoboda <[email protected]> and contributors"]
version = "0.3.2"
version = "0.3.3"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand All @@ -10,6 +10,7 @@ Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
RecursiveFactorization = "f2c3362d-daeb-58d1-803e-2bc74f2840b4"

[compat]
Expand Down
2 changes: 2 additions & 0 deletions src/Jadex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ using .RunDefinition
using .EscapeProbability
using .GridRunner

include("precompile.jl")

end
18 changes: 18 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using PrecompileTools

@setup_workload begin
datadir = joinpath(pkgdir(Jadex), "test", "data")
@compile_workload begin
βlvg(0.5)
βslab(0.5)
βsphere(0.5)
mol = Specie("hco+", datadir=datadir)
rdf = RunDef(mol, density=Dict("h2" => 1e4))
sol = Solution(rdf)
solve!(sol, rdf)
reset!(sol)
solve(rdf)
get_results(rdf)
get_results(sol, rdf)
end
end
2 changes: 1 addition & 1 deletion test/profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using Jadex.RunDefinition: get_collision_rates


function get_test_data(;reduced=false)
datadir = joinpath(@__DIR__, "data")
datadir = joinpath(pkgdir(Jadex), "test", "data")
mol = Specie("hco+", datadir=datadir)
bg = blackbody_background(mol, tbg=2.730)
rdf = RunDef(mol, density=Dict("h2" => 1e4), tkin=20.0, cdmol=1e13,
Expand Down
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Test
using Logging

using Jadex
using Jadex.Solver
using Jadex.ReadData
using Jadex.Background
Expand All @@ -9,7 +10,7 @@ using Jadex.EscapeProbability
using Jadex.GridRunner


const TEST_DATA_DIR = joinpath(@__DIR__, "data")
const TEST_DATA_DIR = joinpath(pkgdir(Jadex), "test", "data")

Logging.disable_logging(Logging.Info)

Expand Down

2 comments on commit 69025ee

@autocorr
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/83007

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.3 -m "<description of version>" 69025eefba2d93251d73df4d93f3ef2c8fc014d1
git push origin v0.3.3

Please sign in to comment.