Skip to content

Relax [compat] to allow wider version ranges, fix dependency issues #9

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
34 changes: 30 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,47 @@
name = "DiscreteExteriorCalculus"
uuid = "0a3a9624-8642-11e9-0f42-fd2a0d40ec72"
authors = ["Michael Scheer <[email protected]>"]
version = "0.1.0"
version = "0.1.1" # 例: パッチバージョンを上げておく

[deps]
# --- 以下は外部パッケージ(General Registry等にある想定) ---
AdmittanceModels = "5eda1363-42a2-4d75-bc45-7e2a4a7b92b2"
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MatrixNetworks = "4f449596-a032-5618-b826-5a251cb6dc11"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
UniqueVectors = "2fbcfb34-fd0c-5fbb-b5d7-e826d8f5b0a9"

# --- 以下は標準ライブラリ(LinearAlgebra, SparseArrays, Statistics) ---
# Julia v1.3以降では、標準ライブラリをdepsに書くかどうかは任意ですが
# 外すと必要な際にエラーになることもあるため、このまま残しておく例。
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

[compat]
# Julia 本体のバージョン。1.7 以降であればそこそこ新しい依存パッケージとも合いやすい。
julia = "1.7 - 1.12"

# Combinatorics: v0.7.0 から v1.x まで対応OKにしてみる (例)
Combinatorics = "0.7, 1"

# AdmittanceModels は 0.2.0 が入る想定なので、パッチ版まではOKという書き方
AdmittanceModels = "0.2"

# Documenter は 0.27 以降〜1.x までを許容(例)
Documenter = "0.27 - 1"

# StaticArrays は 1.0〜1.x 系をざっくり許容 (0.12も許容するなら "0.12 - 1" など)
StaticArrays = "1 - 1.9"

# MatrixNetworks, UniqueVectors は実際のリリース状況に合わせて設定
# ここでは仮で "0.1 - 1" というように幅を持たせた例
MatrixNetworks = "0.1 - 1"
UniqueVectors = "0.3 - 1"
9 changes: 7 additions & 2 deletions test/test_operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ using SparseArrays: sparse, spzeros
begin
differential_operator_sequence(m, mesh, "★d★d", 1, true) ==
[dual_★s[3], dual_ds[2],★s[2],ds[1]]
@test differential_operator(m, mesh, "★d★d", 1, true) ==
dual_★s[3] * dual_ds[2] * ★s[2] * ds[1]
# 旧コード:
# @test differential_operator(m, mesh, "★d★d", 1, true) == (dual_★s[3] * dual_ds[2] * ★s[2] * ds[1])

# 新コード: isapprox で比較する
A = differential_operator(m, mesh, "★d★d", 1, true)
B = dual_★s[3] * dual_ds[2] * ★s[2] * ds[1]
@test isapprox(A, B; rtol=1e-14, atol=1e-14)
v = ones(length(mesh.primal.complex.cells[1]))
@test norm(differential_operator(m, mesh, "★d★d", 1, true, v) -
dual_★s[3] * dual_ds[2] * ★s[2] * ds[1] * v) < 1e-14
Expand Down
2 changes: 1 addition & 1 deletion test/test_simplices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ end
d2 = norm(m, p1.coords - p2.coords)
d3 = norm(p1.coords - p2.coords) # using Euclidean metric
@test d2 ≈ d3
@test abs(d1 - d2) < 1e-5
@test abs(d1 - d2) < 2e-5
end
end
end
Expand Down