Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ZipArchives to v2 #2

Merged
merged 4 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.3.0

- Breaking: Update ZipArchives to version 2 (https://github.com/mpimd-csc/MORWiki.jl/pull/2)

# v0.2.0

- Breaking: Rename package back to MORWiki.jl
Expand Down
7 changes: 4 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name = "MORWiki"
uuid = "4add22a6-c4b7-49d8-833a-0e1707ec89d0"
authors = ["Jonas Schulze <[email protected]>"]
version = "0.2.0"
authors = ["Jonas Schulze <[email protected]> and contributors"]
version = "0.3.0"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MatrixMarket = "4d4711f2-db25-561a-b6b3-d35e7d4047d3"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
ZipArchives = "49080126-0e18-4c2a-b176-c102e4b3760c"
Expand All @@ -21,7 +22,7 @@ DocStringExtensions = "0.9"
MatrixMarket = "0.5"
SparseArrays = "1"
UnPack = "1"
ZipArchives = "1"
ZipArchives = "2"
julia = "1.6"
unzip_jll = "6"

Expand Down
3 changes: 2 additions & 1 deletion src/MORWiki.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ using DocStringExtensions: TYPEDEF
using MatrixMarket: mmread
using SparseArrays: sparse, spzeros
using UnPack: @unpack
using ZipArchives: zip_open_filereader, zip_openentry # v1
using ZipArchives: ZipReader, zip_openentry
using unzip_jll: unzip
using Mmap: mmap

"""
assemble(::Benchmark)::StateSpaceRepresentation
Expand Down
2 changes: 1 addition & 1 deletion src/misc/fenicsRail.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function assemble(rail::FenicsRail)
dir = @datadep_str dep
zipfile = joinpath(dir, "fenics_rail_$dim.zip")

archive = zip_open_filereader(zipfile)
archive = ZipReader(mmap(open(zipfile; read=true)))
zip_mmread(file) = zip_openentry(mmread, archive, file)
local E, A, B
@sync begin
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
using MORWiki: MORWiki, FenicsRail, SteelProfile, assemble
using LinearAlgebra, SparseArrays, Test, UnPack

# Ensure test downloads succeed without user input:
if !haskey(ENV, "DATADEPS_ALWAYS_ACCEPT")
@warn "Environment variable DATADEPS_ALWAYS_ACCEPT unset; setting to '1'"
ENV["DATADEPS_ALWAYS_ACCEPT"] = "1"
end

@testset "MORWiki.jl" begin
@test_throws ArgumentError SteelProfile(300)
@test_throws ArgumentError("Unsupported dimension 300. Did you mean 371?") SteelProfile(300)
Expand Down