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

Patch file path, content size and checksum in distributions during import batch #4892

Open
imsdu opened this issue Apr 23, 2024 · 0 comments · May be fixed by #4999
Open

Patch file path, content size and checksum in distributions during import batch #4892

imsdu opened this issue Apr 23, 2024 · 0 comments · May be fixed by #4999
Assignees

Comments

@imsdu
Copy link
Contributor

imsdu commented Apr 23, 2024

Motivation
At least the path should change in distributions, the other may also change as for example in some cases they also may be absent.

"distribution": {
    "@type": "DataDownload",
    "atLocation": {
      "@type": "Location",
      "location": "/path/bbp/atlas/b/7/a/3/4/4/6/1/L1_HAC%7CcNAC_INH_densities_v3.nrrd",
      "store": {
        "@id": "https://bbp.epfl.ch/neurosciencegraph/data/xxx",
        "@type": "RemoteDiskStorage",
        "_rev": 1
      }
    },
    "contentSize": {
      "unitCode": "bytes",
      "value": 1920289
    },
    "contentUrl": "https://bbp.epfl.ch/nexus/v1/files/bbp/project/...",
    "digest": {
      "algorithm": "SHA-256",
      "value": "6e9eb5e1169ee937c37651e7ff6c60de47dc3c2e58a5d1cf22c6ee44d2023b50"
    },
    "encodingFormat": "application/nrrd",
    "name": "L1_HAC|cNAC_INH_densities_v3.nrrd"
  }

Acceptance criteria

  1. The distribution is patched with the information from the file
  2. If the file can't be resolved, we keep the distribution as it was

Implementation notes
We already patch the contentUrl where we extract the project and file id.
This can be used to get the file and its attributes for this other step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants