Add zip files for three data packages #1

Open
opened 2025-06-12 08:31:07 +00:00 by jsheunis · 8 comments
Owner

I haven't done this before so this is me figuring things out.

The goal is to do something similar to what happens in inm-icf-utilities, where uncurl special remote handles the urls for the raw archived files, and then have the "archivist" special remote handle the connection between the archive file and its extracted files. I don't understand what I just wrote on a technical level (yet), but conceptually it makes sense.

Looking at the example of https://github.com/psychoinformatics-de/inm-icf-utilities/blob/main/bin/deposit_visit_dataset, here are some comments that seem relevant:

# enable uncurl remote to have the tarball URL be claimed by it
# and future-proof access (via its reconfiguration possibilities
# without having to touch the annex record
# we need its UUID later

# register the URL of the tarball
# fish out annex key of tarball.
# we could also construct that, but let's not duplicate the setup above
# assure tar key availability

# here we register the archivist special remote, to claim
# the dl+archives URLs registered below.

# add to dataset
# ds.addurls(... f'dl+archive:{tarkey}#path={{path}}&size={{size}}', ...

# repo.call_git([
#        'remote', 'add',
# f'datalad-annex::?type=external&externaltype=uncurl&url=file://{repobasepath}'

I haven't done this before so this is me figuring things out. The goal is to do something similar to what happens in `inm-icf-utilities`, where uncurl special remote handles the urls for the raw archived files, and then have the "archivist" special remote handle the connection between the archive file and its extracted files. I don't understand what I just wrote on a technical level (yet), but conceptually it makes sense. Looking at the example of https://github.com/psychoinformatics-de/inm-icf-utilities/blob/main/bin/deposit_visit_dataset, here are some comments that seem relevant: ``` # enable uncurl remote to have the tarball URL be claimed by it # and future-proof access (via its reconfiguration possibilities # without having to touch the annex record # we need its UUID later # register the URL of the tarball # fish out annex key of tarball. # we could also construct that, but let's not duplicate the setup above # assure tar key availability # here we register the archivist special remote, to claim # the dl+archives URLs registered below. # add to dataset # ds.addurls(... f'dl+archive:{tarkey}#path={{path}}&size={{size}}', ... # repo.call_git([ # 'remote', 'add', # f'datalad-annex::?type=external&externaltype=uncurl&url=file://{repobasepath}' ```
Author
Owner
Archive download URLs: - Adélie - Pygoscelis adeliae - https://portal.edirepository.org/nis/archiveDownload?packageid=knb-lter-pal.219.5 - Gentoo - Pygoscelis papua - https://portal.edirepository.org/nis/archiveDownload?packageid=knb-lter-pal.220.5 - Chinstrap - Pygoscelis antarcticus - https://portal.edirepository.org/nis/archiveDownload?packageid=knb-lter-pal.221.6
Author
Owner

I started by running the following locally:

>> git annex initremote uncurl type=external externaltype=uncurl encryption=none autoenable=true

initremote uncurl ok
(recording state in git...)

>> git annex info

trusted repositories: 0
semitrusted repositories: 5
	00000000-0000-0000-0000-000000000001 -- web
	00000000-0000-0000-0000-000000000002 -- bittorrent
	00a375f4-5694-477b-b1c3-5c484a20afab -- jsheunis@... : .../edu/palmerpenguins [here]
	7b632dcc-6434-4409-b05a-18a67531feb7 -- [uncurl]
	9948e337-6ea4-4df5-81a6-ef4709b6121f -- origin
untrusted repositories: 0
transfers in progress: none
available local disk space: 5.16 gigabytes (+100 megabytes reserved)
local annex keys: 0
local annex size: 0 bytes
annexed files in working tree: 0
size of annexed files in working tree: 0 bytes
combined annex size of all repositories: 0 bytes
annex sizes of repositories:
backend usage:
bloom filter size: 32 mebibytes (0% full)

Next step is to use datalad addurls to add the archive URLs, but this needs some exploring first...

I started by running the following locally: ``` >> git annex initremote uncurl type=external externaltype=uncurl encryption=none autoenable=true initremote uncurl ok (recording state in git...) >> git annex info trusted repositories: 0 semitrusted repositories: 5 00000000-0000-0000-0000-000000000001 -- web 00000000-0000-0000-0000-000000000002 -- bittorrent 00a375f4-5694-477b-b1c3-5c484a20afab -- jsheunis@... : .../edu/palmerpenguins [here] 7b632dcc-6434-4409-b05a-18a67531feb7 -- [uncurl] 9948e337-6ea4-4df5-81a6-ef4709b6121f -- origin untrusted repositories: 0 transfers in progress: none available local disk space: 5.16 gigabytes (+100 megabytes reserved) local annex keys: 0 local annex size: 0 bytes annexed files in working tree: 0 size of annexed files in working tree: 0 bytes combined annex size of all repositories: 0 bytes annex sizes of repositories: backend usage: bloom filter size: 32 mebibytes (0% full) ``` Next step is to use `datalad addurls` to add the archive URLs, but this needs some exploring first...
jsheunis changed title from Add zip files for three data packages via uncurl to Add zip files for three data packages 2025-06-12 09:51:34 +00:00
Author
Owner

Some quick notes from office hour:

The following works:

>> git annex addurl https://portal.edirepository.org/nis/archiveDownload\?packageid\=knb-lter-pal.219.5

addurl https://portal.edirepository.org/nis/archiveDownload?packageid=knb-lter-pal.219.5 (from uncurl) (to portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5)
ok
(recording state in git...)

This new file is registered with uncurl, as can be seen from:

git annex whereis portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5
whereis portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5 (2 copies)
  	00a375f4-5694-477b-b1c3-5c484a20afab -- jsheunis@pool-53-54.vpn.kfa-juelich.de:~/Documents/psyinf/edu/palmerpenguins [here]
  	7b632dcc-6434-4409-b05a-18a67531feb7 -- [uncurl]

  uncurl: https://portal.edirepository.org/nis/archiveDownload?packageid=knb-lter-pal.219.5
ok

Looking at the zip-file content:

>> unzip -l portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5

Archive:  portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5
  Length      Date    Time    Name
---------  ---------- -----   ----
    23755  06-17-2025 14:13   table_219.csv
    24840  06-17-2025 14:13   knb-lter-pal.219.5.xml
    12423  06-17-2025 14:13   knb-lter-pal.219.5.txt
    31210  06-17-2025 14:13   knb-lter-pal.219.5.report.xml
      227  06-17-2025 14:13   manifest.txt
---------                     -------
    92455                     5 files

Some info:

Next steps:

  • use git annex addurl for all source archives, with --file flag to save to particular filename
  • get archive annex key
  • extract archive into files in dedicated directory, save them
  • act on each specific annex file key: addurl with dl+archive:<archive-key>#path=<path-in-archive>&size=<size-in-bytes>&atype=<archive-type>
Some quick notes from office hour: The following works: ``` >> git annex addurl https://portal.edirepository.org/nis/archiveDownload\?packageid\=knb-lter-pal.219.5 addurl https://portal.edirepository.org/nis/archiveDownload?packageid=knb-lter-pal.219.5 (from uncurl) (to portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5) ok (recording state in git...) ``` This new file is registered with uncurl, as can be seen from: ``` git annex whereis portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5 whereis portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5 (2 copies) 00a375f4-5694-477b-b1c3-5c484a20afab -- jsheunis@pool-53-54.vpn.kfa-juelich.de:~/Documents/psyinf/edu/palmerpenguins [here] 7b632dcc-6434-4409-b05a-18a67531feb7 -- [uncurl] uncurl: https://portal.edirepository.org/nis/archiveDownload?packageid=knb-lter-pal.219.5 ok ``` Looking at the zip-file content: ``` >> unzip -l portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5 Archive: portal.edirepository.org_nis_archiveDownload_packageid_knb-lter-pal.219.5 Length Date Time Name --------- ---------- ----- ---- 23755 06-17-2025 14:13 table_219.csv 24840 06-17-2025 14:13 knb-lter-pal.219.5.xml 12423 06-17-2025 14:13 knb-lter-pal.219.5.txt 31210 06-17-2025 14:13 knb-lter-pal.219.5.report.xml 227 06-17-2025 14:13 manifest.txt --------- ------- 92455 5 files ``` Some info: - Archivist usage in `inm-icf-utilities`: https://github.com/psychoinformatics-de/inm-icf-utilities/blob/main/bin/deposit_visit_dataset#L147-L158 - Archivist source with docstrings: https://github.com/datalad/datalad-next/blob/main/datalad_next/annexremotes/archivist.py - `datalad addurls` docs: https://docs.datalad.org/en/stable/generated/man/datalad-addurls.html Next steps: - use `git annex addurl` for all source archives, with --file flag to save to particular filename - get archive annex key - extract archive into files in dedicated directory, save them - act on each specific annex file key: `addurl` with `dl+archive:<archive-key>#path=<path-in-archive>&size=<size-in-bytes>&atype=<archive-type>`
Owner

We discussed this in the office hour today. This is a summary.

download zip files recording URLs

Yes, the next step is to use datalad addurls to download the zip files and associate them with URLs. The addurls command is good for downloading things in batches. In its most basic form, it would need a simple csv file with URLs and file names -- see examples in its manpage. Alternatively, git annex addurl ----file=name url can be used to download the zip files one by one.

Because the uncurl special remote is enabled, it will claim the http(s) URLs. One major feature of uncurl is its reconfiguration mechanism, where we can define matching patterns and substitutions as configuration options (this may become useful in the hypothetical situation when content moves and base URL or path changes). We do not need to define these configurations upfront. Had uncurl not been enabled, the URLs would have been claimed by git-annex's built in web remote.

record availability of files in archives

The second step is to enable another special remote, archivist, and use it to register file availability in the archives. Again, this is done by associating URLs with files using the datalad urls swiss army knife of the command. The format of the archivist URL is: dl+archive:<archive-key>#path=<path-in-archive>&size=<size-in-bytes> where the archive-key is the git-annex key of the zip file (i.e. the zip file is identified by its annex key, not by its path in the worktree).

I know of two public places where examples can be found: here in inm-icf utils and here in trr remix of these utils. See the documentation for addurls options - it really helps.

The best way to get the required properties for addurls is probably datalad ls-file-collection, which can iterate over zipfiles and provide both paths and sizes. JSON output format and some jq magic on the command line, or some Python scripting will be needed. Note that (due to different starting points) the INM-ICF version creates the annex keys for the files, while the trr remix attaches URLs to already extracted and saved files -- addurls is flexible in that regard.

As a side note, the online documentation for the archivist special remote is missing (see datalad-next issue 774); the documentation can be found in source code of datalad_next.annexremotes.archivist.ArchivistRemote and (for URL patterns specifically) datalad_next.types.archivist.ArchivistLocator.

We discussed this in the office hour today. This is a summary. ### download zip files recording URLs Yes, the next step is to use `datalad addurls` to download the zip files and associate them with URLs. The addurls command is good for downloading things in batches. In its most basic form, it would need a simple csv file with URLs and file names -- see examples in its manpage. Alternatively, `git annex addurl ----file=name url` can be used to download the zip files one by one. Because the uncurl special remote is enabled, it will claim the http(s) URLs. One major feature of uncurl is its reconfiguration mechanism, where we can define matching patterns and substitutions as configuration options (this may become useful in the hypothetical situation when content moves and base URL or path changes). We do not need to define these configurations upfront. Had uncurl not been enabled, the URLs would have been claimed by git-annex's built in web remote. ### record availability of files in archives The second step is to enable another special remote, archivist, and use it to register file availability in the archives. Again, this is done by associating URLs with files using the `datalad urls` swiss army knife of the command. The format of the archivist URL is: `dl+archive:<archive-key>#path=<path-in-archive>&size=<size-in-bytes>` where the archive-key is the git-annex key of the zip file (i.e. the zip file is identified by its annex key, not by its path in the worktree). I know of two public places where examples can be found: [here in inm-icf utils](https://github.com/psychoinformatics-de/inm-icf-utilities/blob/main/bin/deposit_visit_dataset#L147-L158) and [here in trr remix of these utils](https://hub.trr379.de/q02/dicom-utilities/src/branch/trunk/dataladify_dicom_dataset.py#L172-L180). See the documentation for addurls options - it really helps. The best way to get the required properties for addurls is probably `datalad ls-file-collection`, which can iterate over zipfiles and provide both paths and sizes. JSON output format and some jq magic on the command line, or some Python scripting will be needed. Note that (due to different starting points) the INM-ICF version *creates* the annex keys for the files, while the trr remix attaches URLs to already extracted and saved files -- addurls is flexible in that regard. As a side note, the online documentation for the archivist special remote is missing (see [datalad-next issue 774](https://github.com/datalad/datalad-next/issues/774)); the documentation can be found in source code of `datalad_next.annexremotes.archivist.ArchivistRemote` and (for URL patterns specifically) `datalad_next.types.archivist.ArchivistLocator`.
Author
Owner
>> git annex initremote archivist type=external externaltype=archivist encryption=none autoenable=true

initremote archivist ok
(recording state in git...)
>> git annex info
trusted repositories: 0
semitrusted repositories: 7
	00000000-0000-0000-0000-000000000001 -- web
	00000000-0000-0000-0000-000000000002 -- bittorrent
	00a375f4-5694-477b-b1c3-5c484a20afab -- jsheunis@...
	41726d7d-6e14-4e23-936b-89452c0dccf8 -- [uncurl]
	83f2736d-70a7-412a-89df-01ee16326913 -- [here]
	92813bb4-4217-4837-b618-85d633eb9565 -- [archivist]
	9948e337-6ea4-4df5-81a6-ef4709b6121f -- [origin]

untrusted repositories: 0
transfers in progress: none
available local disk space: 14.56 gigabytes (+100 megabytes reserved)
local annex keys: 28
local annex size: 474.45 kilobytes
annexed files in working tree: 18
size of annexed files in working tree: 311 kilobytes
combined annex size of all repositories: 1.05 megabytes
annex sizes of repositories:
	474.45 kB: 83f2736d-70a7-412a-89df-01ee16326913 -- [here]
	363.44 kB: 9948e337-6ea4-4df5-81a6-ef4709b6121f -- [origin]
	209.74 kB: 41726d7d-6e14-4e23-936b-89452c0dccf8 -- [uncurl]
backend usage:
	MD5E: 18
bloom filter size: 32 mebibytes (0% full)

>> archivist_uuid=92813bb4-4217-4837-b618-85d633eb9565

>> git annex info portal.edirepository.org/knb-lter-pal.219.5.zip
file: portal.edirepository.org/knb-lter-pal.219.5.zip
size: 18.66 kilobytes
key: MD5E-s18662--c4475172c54b34240aa1fc5cf577e555.5.zip
present: true

>> git annex info portal.edirepository.org/knb-lter-pal.220.5.zip
file: portal.edirepository.org/knb-lter-pal.220.5.zip
size: 17.51 kilobytes
key: MD5E-s17506--7c5573ab04ac7055a71197909e073894.5.zip
present: true

>> git annex info portal.edirepository.org/knb-lter-pal.221.6.zip
file: portal.edirepository.org/knb-lter-pal.221.6.zip
size: 16.27 kilobytes
key: MD5E-s16268--2c326c49fcfb6154968f42283d2e71a6.6.zip
present: true

``` >> git annex initremote archivist type=external externaltype=archivist encryption=none autoenable=true initremote archivist ok (recording state in git...) ``` ``` >> git annex info trusted repositories: 0 semitrusted repositories: 7 00000000-0000-0000-0000-000000000001 -- web 00000000-0000-0000-0000-000000000002 -- bittorrent 00a375f4-5694-477b-b1c3-5c484a20afab -- jsheunis@... 41726d7d-6e14-4e23-936b-89452c0dccf8 -- [uncurl] 83f2736d-70a7-412a-89df-01ee16326913 -- [here] 92813bb4-4217-4837-b618-85d633eb9565 -- [archivist] 9948e337-6ea4-4df5-81a6-ef4709b6121f -- [origin] untrusted repositories: 0 transfers in progress: none available local disk space: 14.56 gigabytes (+100 megabytes reserved) local annex keys: 28 local annex size: 474.45 kilobytes annexed files in working tree: 18 size of annexed files in working tree: 311 kilobytes combined annex size of all repositories: 1.05 megabytes annex sizes of repositories: 474.45 kB: 83f2736d-70a7-412a-89df-01ee16326913 -- [here] 363.44 kB: 9948e337-6ea4-4df5-81a6-ef4709b6121f -- [origin] 209.74 kB: 41726d7d-6e14-4e23-936b-89452c0dccf8 -- [uncurl] backend usage: MD5E: 18 bloom filter size: 32 mebibytes (0% full) >> archivist_uuid=92813bb4-4217-4837-b618-85d633eb9565 >> git annex info portal.edirepository.org/knb-lter-pal.219.5.zip file: portal.edirepository.org/knb-lter-pal.219.5.zip size: 18.66 kilobytes key: MD5E-s18662--c4475172c54b34240aa1fc5cf577e555.5.zip present: true >> git annex info portal.edirepository.org/knb-lter-pal.220.5.zip file: portal.edirepository.org/knb-lter-pal.220.5.zip size: 17.51 kilobytes key: MD5E-s17506--7c5573ab04ac7055a71197909e073894.5.zip present: true >> git annex info portal.edirepository.org/knb-lter-pal.221.6.zip file: portal.edirepository.org/knb-lter-pal.221.6.zip size: 16.27 kilobytes key: MD5E-s16268--2c326c49fcfb6154968f42283d2e71a6.6.zip present: true ```
Author
Owner
>>datalad -f json ls-file-collection annexworktree adelie | jq '. | select(.annexkey)' | jq --slurp . | datalad addurls  - 'dl+archive:MD5E-s18662--c4475172c54b34240aa1fc5cf577e555.5.zip#path={item}&size={annexsize}' '{collection}/{item}'

addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.report.xml (file) [from archivist; to adelie/knb-lter-pal.219.5.report.xml]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.txt (file) [from archivist; to adelie/knb-lter-pal.219.5.txt]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.xml (file) [from archivist; to adelie/knb-lter-pal.219.5.xml]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/manifest.txt (file) [from archivist; to adelie/manifest.txt]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/table_219.csv (file) [from archivist; to adelie/table_219.csv]
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.report.xml (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.txt (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.xml (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/manifest.txt (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/table_219.csv (file)
action summary:
  addurl (ok: 5)
  metadata (ok: 5)
  save (notneeded: 1)


>> datalad -f json ls-file-collection annexworktree gentoo | jq '. | select(.annexkey)' | jq --slurp . | datalad addurls  - 'dl+archive:MD5E-s17506--7c5573ab04ac7055a71197909e073894.5.zip#path={item}&size={annexsize}' '{collection}/{item}'

addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.report.xml (file) [from archivist; to gentoo/knb-lter-pal.220.5.report.xml]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.txt (file) [from archivist; to gentoo/knb-lter-pal.220.5.txt]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.xml (file) [from archivist; to gentoo/knb-lter-pal.220.5.xml]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/manifest.txt (file) [from archivist; to gentoo/manifest.txt]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/table_220.csv (file) [from archivist; to gentoo/table_220.csv]
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.report.xml (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.txt (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.xml (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/manifest.txt (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/table_220.csv (file)
action summary:
  addurl (ok: 5)
  metadata (ok: 5)
  save (notneeded: 1)


>> datalad -f json ls-file-collection annexworktree chinstrap | jq '. | select(.annexkey)' | jq --slurp . | datalad addurls  - 'dl+archive:MD5E-s16268--2c326c49fcfb6154968f42283d2e71a6.6.zip#path={item}&size={annexsize}' '{collection}/{item}'

addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.report.xml (file) [from archivist; to chinstrap/knb-lter-pal.221.6.report.xml]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.txt (file) [from archivist; to chinstrap/knb-lter-pal.221.6.txt]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.xml (file) [from archivist; to chinstrap/knb-lter-pal.221.6.xml]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/manifest.txt (file) [from archivist; to chinstrap/manifest.txt]
addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/table_221.csv (file) [from archivist; to chinstrap/table_221.csv]
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.report.xml (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.txt (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.xml (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/manifest.txt (file)
metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/table_221.csv (file)
action summary:
  addurl (ok: 5)
  metadata (ok: 5)
  save (notneeded: 1)

``` >>datalad -f json ls-file-collection annexworktree adelie | jq '. | select(.annexkey)' | jq --slurp . | datalad addurls - 'dl+archive:MD5E-s18662--c4475172c54b34240aa1fc5cf577e555.5.zip#path={item}&size={annexsize}' '{collection}/{item}' addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.report.xml (file) [from archivist; to adelie/knb-lter-pal.219.5.report.xml] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.txt (file) [from archivist; to adelie/knb-lter-pal.219.5.txt] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.xml (file) [from archivist; to adelie/knb-lter-pal.219.5.xml] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/manifest.txt (file) [from archivist; to adelie/manifest.txt] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/table_219.csv (file) [from archivist; to adelie/table_219.csv] metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.report.xml (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.txt (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/knb-lter-pal.219.5.xml (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/manifest.txt (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/adelie/table_219.csv (file) action summary: addurl (ok: 5) metadata (ok: 5) save (notneeded: 1) >> datalad -f json ls-file-collection annexworktree gentoo | jq '. | select(.annexkey)' | jq --slurp . | datalad addurls - 'dl+archive:MD5E-s17506--7c5573ab04ac7055a71197909e073894.5.zip#path={item}&size={annexsize}' '{collection}/{item}' addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.report.xml (file) [from archivist; to gentoo/knb-lter-pal.220.5.report.xml] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.txt (file) [from archivist; to gentoo/knb-lter-pal.220.5.txt] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.xml (file) [from archivist; to gentoo/knb-lter-pal.220.5.xml] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/manifest.txt (file) [from archivist; to gentoo/manifest.txt] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/table_220.csv (file) [from archivist; to gentoo/table_220.csv] metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.report.xml (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.txt (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/knb-lter-pal.220.5.xml (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/manifest.txt (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/gentoo/table_220.csv (file) action summary: addurl (ok: 5) metadata (ok: 5) save (notneeded: 1) >> datalad -f json ls-file-collection annexworktree chinstrap | jq '. | select(.annexkey)' | jq --slurp . | datalad addurls - 'dl+archive:MD5E-s16268--2c326c49fcfb6154968f42283d2e71a6.6.zip#path={item}&size={annexsize}' '{collection}/{item}' addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.report.xml (file) [from archivist; to chinstrap/knb-lter-pal.221.6.report.xml] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.txt (file) [from archivist; to chinstrap/knb-lter-pal.221.6.txt] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.xml (file) [from archivist; to chinstrap/knb-lter-pal.221.6.xml] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/manifest.txt (file) [from archivist; to chinstrap/manifest.txt] addurl(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/table_221.csv (file) [from archivist; to chinstrap/table_221.csv] metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.report.xml (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.txt (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/knb-lter-pal.221.6.xml (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/manifest.txt (file) metadata(ok): /Users/jsheunis/Documents/psyinf/edu/palmerpenguins/chinstrap/table_221.csv (file) action summary: addurl (ok: 5) metadata (ok: 5) save (notneeded: 1) ```
Author
Owner
>> git annex whereis adelie/table_219.csv

whereis adelie/table_219.csv (3 copies)
  	83f2736d-70a7-412a-89df-01ee16326913 -- jsheunis@bnbmac48.local:~/Documents/psyinf/edu/palmerpenguins [here]
  	92813bb4-4217-4837-b618-85d633eb9565 -- [archivist]
  	9948e337-6ea4-4df5-81a6-ef4709b6121f -- git@2f026f1d3470:/var/lib/gitea/git/repositories/jsheunis/palmerpenguins.git [origin]

  archivist: dl+archive:MD5E-s18662--c4475172c54b34240aa1fc5cf577e555.5.zip#path=table_219.csv&size=23755
ok
``` >> git annex whereis adelie/table_219.csv whereis adelie/table_219.csv (3 copies) 83f2736d-70a7-412a-89df-01ee16326913 -- jsheunis@bnbmac48.local:~/Documents/psyinf/edu/palmerpenguins [here] 92813bb4-4217-4837-b618-85d633eb9565 -- [archivist] 9948e337-6ea4-4df5-81a6-ef4709b6121f -- git@2f026f1d3470:/var/lib/gitea/git/repositories/jsheunis/palmerpenguins.git [origin] archivist: dl+archive:MD5E-s18662--c4475172c54b34240aa1fc5cf577e555.5.zip#path=table_219.csv&size=23755 ok ```
Owner

I cloned the dataset and the archivist + uncurl setup looks to be done as intended, with two caveats (copying from the group chat):

For archivist, Datalad-next already has the tools to do handle zip files, but it doesn't want to use them -- https://github.com/datalad/datalad-next/pull/776

For uncurl, the zip files generated by edirepository are not reproducible due to the manifest containing the date:

❱ git annex get portal.edirepository.org/knb-lter-pal.219.5.zip --from uncurl
get portal.edirepository.org/knb-lter-pal.219.5.zip (from uncurl...)

  Verification of content failed
failed
get: 1 failed

Re-downloading the archive twice, unzipping, and diffing the directories:

diff '--color=auto' first/manifest.txt second/manifest.txt
1c1
< Manifest file for knb-lter-pal.220.5.zip created on Mon Jun 23 14:48:39 UTC 2025
---
> Manifest file for knb-lter-pal.220.5.zip created on Mon Jun 23 14:48:49 UTC 2025

I don't know what would be the recommended approach. The URLs are certainly valuable. One thing to consider: git annex addurl can be done with --fast or --relaxed, but I think git-annex might try to migrate to a checksum-based backend (plus - storing a copy in forgejo implies a checksum) so this likely isn't a solution (although - it would be theoretically sufficient to reproducibly get the files other than the manifest).

I cloned the dataset and the archivist + uncurl setup looks to be done as intended, with two caveats (copying from the group chat): For archivist, Datalad-next already has the tools to do handle zip files, but it doesn't want to use them -- https://github.com/datalad/datalad-next/pull/776 For uncurl, the zip files generated by edirepository are not reproducible due to the manifest containing the date: ``` ❱ git annex get portal.edirepository.org/knb-lter-pal.219.5.zip --from uncurl get portal.edirepository.org/knb-lter-pal.219.5.zip (from uncurl...) Verification of content failed failed get: 1 failed ``` Re-downloading the archive twice, unzipping, and diffing the directories: ```diff diff '--color=auto' first/manifest.txt second/manifest.txt 1c1 < Manifest file for knb-lter-pal.220.5.zip created on Mon Jun 23 14:48:39 UTC 2025 --- > Manifest file for knb-lter-pal.220.5.zip created on Mon Jun 23 14:48:49 UTC 2025 ``` I don't know what would be the recommended approach. The URLs are certainly valuable. One thing to consider: [git annex addurl](https://git-annex.branchable.com/git-annex-addurl/) can be done with `--fast` or `--relaxed`, but I think git-annex might try to migrate to a checksum-based backend (plus - storing a copy in forgejo implies a checksum) so this likely isn't a solution (although - it would be theoretically sufficient to reproducibly get the files other than the manifest).
Sign in to join this conversation.
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
edu/penguins#1
No description provided.