From de684bb53dd0a09de969160ebf6c32e0f44628e2 Mon Sep 17 00:00:00 2001 From: mdtanker Date: Sat, 15 Jun 2024 08:10:20 +0200 Subject: [PATCH] refactor: use figshare sample shapefiles and remove data/ from repo --- data/Disco_deep_transect.zip | Bin 8017 -> 0 bytes data/Roosevelt_Island.zip | Bin 2045 -> 0 bytes src/polartoolkit/fetch.py | 14 ++++++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) delete mode 100644 data/Disco_deep_transect.zip delete mode 100644 data/Roosevelt_Island.zip diff --git a/data/Disco_deep_transect.zip b/data/Disco_deep_transect.zip deleted file mode 100644 index b871488259a4eeea32cdaa6d2bd23020e7253fad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8017 zcma)>Wl&t(+HSjXm!|OqZQPyU7J@s01Zgz5yL$-113`il2ogf$?oMzB!D(EBO9LI? z=Im2->+Jj8v+G+`bJd(b=BQ^q>-{&hR8i4z0RMXS%#ZZ6B*F;L|Lp&@r~pp@3U(fr zE>J6LYgeeJyScN6wWTMN&w<<0)ka?r8-SWZFmCaUVcf#Y7Z(6TJ0qy~`s<~yr^qF$ z^#=_8gTeX>EdC^+THwzKit>+OD~mV(7rgyH!IqU4>(*9gW=d8!xP`njI`;l=Xd?IV z7#<3SOLmI8G7Pu$Cq@MDA7i+>+y7GxC(RN2 zNM7)LdW9}uOhOA-{Tr$jFF`F4wrm6jBuz~vq_djvi*-wL>_y9Nor%ZzJfISNlQjl4 z*Pdh4YPN4Fh~%vRNBlB5qp5)q&~WmL=;iS#En%qNBD5U1)k*iWW3rO%B0w;d1=Rme zA(zk%6d)SM%e)>F$LQEvQ^;Mwt8?HZ^bK&AE8U}Na?NePP4F101&%~x5mitICGj|T ze0c>Gz5+a?Zaaq59`ebfu&B1y6-pjqoN_i~ZRssnOphQwW45fun>=m{lzk(nh81bo zg6_1tD<*4s1ze&?oZUCEx=OHC$n~d%&`)Is2>;&VT|aM&E)@V^{PZ7N^ssgPrxxQE z`~>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mdxGm9;!Sw`T(=p3@WVheOWjeS90GbY}0r0pTWIAeT vi0pQGU_FO5WWZ%3ai*iD0%X%$fweOZ(}8IMm+7o*pm1dc!fU|j69n@BRYNVK diff --git a/src/polartoolkit/fetch.py b/src/polartoolkit/fetch.py index b6282753..0b290806 100644 --- a/src/polartoolkit/fetch.py +++ b/src/polartoolkit/fetch.py @@ -278,20 +278,26 @@ def sample_shp(name: str) -> str: str file path as a string """ + if name == "Disco_deep_transect": - known_hash = "70e86b3bf9775dd824014afb91da470263edf23159a9fe34107897d1bae9623e" + known_hash = ( + None # "ffffeef15d7556cd60305e6222852e3b4e09da3b6c628a094c1e99ac6d605303" + ) elif name == "Roosevelt_Island": - known_hash = "83434284808d067b8b18b649e41287a63f01eb2ce581b2c34ee44ae3a1a5ca2a" + known_hash = ( + None # "f3821b8a4d24dd676f75db4b7f2b532a328de18e0bdcce8cee6a6abb3b3e70f6" + ) else: msg = "invalid name string" raise ValueError(msg) + path = pooch.retrieve( - url=f"https://github.com/mdtanker/polartoolkit/raw/main/data/{name}.zip", + url=f"doi:10.6084/m9.figshare.26039578.v1/{name}.zip", path=f"{pooch.os_cache('pooch')}/polartoolkit/shapefiles", + fname=name, processor=pooch.Unzip(), known_hash=known_hash, ) - val: str = next(p for p in path if p.endswith(".shp")) return val