Skip to content

Commit

Permalink
fix version bounds, improve compat with v1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Oct 28, 2023
1 parent 447b6b2 commit 1f98222
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
DocStringExtensions = "<1"
julia = "1.9"
DocStringExtensions = "0.8, 0.9"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ mktempdir() do dir
open(dest, "w") do f #src
write(f, "olleh") #src
end #src
@test_warn "different" A.download_data_file( #src
@test_logs (:warn, r".*") match_mode = :any A.download_data_file( #src
url, #src
dest, #src
"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824", #src
Expand Down
12 changes: 10 additions & 2 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ function accessors()
for nm in names(AbstractFBCModels; all = true)
f = getfield(AbstractFBCModels, nm)
if isa(f, Base.Callable)
methodswith(AbstractFBCModels.AbstractFBCModel, f, ms)
try
methodswith(AbstractFBCModels.AbstractFBCModel, f, ms)
catch
# Earlier versions of Julia tend to throw MethodErrors here
# whenever the method actually doesn't exist (e.g. 1.6.x
# reports that it's actually a missing `methodswith` method
# rather than the one of `f`. If that happens, we can simply do
# nothing.
end
end
end
ms
Expand All @@ -36,7 +44,7 @@ Check if the file at `path` has the expected hash.
function check_cached_file_hash(path, expected_checksum)
actual_checksum = bytes2hex(sha256(open(path)))
if actual_checksum != expected_checksum
@error "The downloaded data file `$path' seems to be different from the expected one. Tests will likely fail." actual_checksum expected_checksum
@warn "The downloaded data file `$path' seems to be different from the expected one. Tests will likely fail." actual_checksum expected_checksum
@info "You can likely remove `$path' to force re-downloading."
end
end
Expand Down

2 comments on commit 1f98222

@exaexa
Copy link
Member Author

@exaexa exaexa commented on 1f98222 Oct 28, 2023

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 updated: JuliaRegistries/General/94250

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.1.0 -m "<description of version>" 1f9822272e6c3dbf7d9b994d8e004c53857dc3b6
git push origin v0.1.0

Please sign in to comment.