Skip to content

Commit

Permalink
Issue JuliaDynamics#399 package dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Franziska Knop committed Aug 20, 2024
1 parent 8b06296 commit 2f077f8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[weakdeps]
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"

[extensions]
Requires = "Requires"
DataFrames = "DataFrames"

[compat]
FileIO = "1.0.6"
JLD2 = "0.4.15"
Expand Down
13 changes: 12 additions & 1 deletion src/DrWatson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,18 @@ include("saving_files.jl")
include("dict_list.jl")

# Functionality that requires Dataframes and other heavy dependencies:
using Requires

if !isdefined(Base, :get_extension)
using Requires
end

function __init__()
# Other init functionality here

@static if !isdefined(Base, :get_extension)
@require DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
end
end

# Update messages
using Scratch
Expand Down
2 changes: 2 additions & 0 deletions src/result_collection.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export collect_results, collect_results!

isdefined(Base, :get_extension) ? (using DataFrames) : (using ..DataFrames)

"""
collect_results!([filename,] folder; kwargs...) -> df
Expand Down

0 comments on commit 2f077f8

Please sign in to comment.