Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • nomad-FAIR nomad-FAIR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 140
    • Issues 140
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nomad-lab
  • nomad-FAIRnomad-FAIR
  • Merge requests
  • !659

Merged
Created May 07, 2022 by Theodore Chang@thchangDeveloper2 of 2 tasks completed2/2 tasks

Resolve "Inter-entry reference resolution in client, cli, and archive reader"

  • Overview 31
  • Commits 21
  • Pipelines 11
  • Changes 5
  • add functionality to resolve references to different archives on the same server, using the provided user credentials
  • add a simple test which involves references to both the same and a different archive

A few points:

  1. References to another installation (a remote url such as: https://his.oasis/uploads/some_upload/archive/some_archive#path/relative/to/entry) will not be resolved accounting for the fact that there may not be access to that installation, even with the provided user credentials.
  2. All references to another entry are resolved by:
    • Retrieve the plain json data from the public API answer_entry_archive_request
    • Apply the same required to extract relavent data. At this stage, there is no need to distingush whether another entry is in the same upload or another upload. Using answer_entry_archive_request handles both case uniformly.
  3. In the case of references need to be resolved but not in-place, the current implementation adds the same data structure to the result json, this leads to data overlapping for references like entry_a#/run/0/system/0 and entry_b#/run/0/system/0. All references to another entry are prefixed by the corresponding entry id to avoid data overlapping. See the example for comparision.

The example archive has a reference to XUlSxqEvec0LvPQbSLWeysB1Ksns,

{"workflow":[{"calculation_result_ref":"../uploads/examples_template/archive/XUlSxqEvec0LvPQbSLWeysB1Ksns#/run/0/calculation/0"}]}

which further has references to itself.

{"run":[{"calculation":[{"system_ref":"/run/0/system/0","method_ref":"/run/0/method/0","energy":{"total":{"value":-1.5935696296699573e-18},"free":{"value":-1.5936767191492225e-18},"total_t0":{"value":-3.2126683561907e-22}}}]}]}

After resolving all references, it becomes (other associated data is removed here for clearer presentation):

{
  "XUlSxqEvec0LvPQbSLWeysB1Ksns":{
    "run":[
      {
        "calculation":[
          {
            "system_ref":"/XUlSxqEvec0LvPQbSLWeysB1Ksns/run/0/system/0",
            "method_ref":"/XUlSxqEvec0LvPQbSLWeysB1Ksns/run/0/method/0",
            "energy":{
              "total":{
                "value":-1.5935696296699573e-18
              },
              "free":{
                "value":-1.5936767191492225e-18
              },
              "total_t0":{
                "value":-3.2126683561907e-22
              }
            }
          }
        ]
      }
    ]
  },
  "workflow":[
    {
      "calculation_result_ref":"/XUlSxqEvec0LvPQbSLWeysB1Ksns/run/0/calculation/0"
    }
  ]
}
Edited May 15, 2022 by Theodore Chang
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 806-reader-resolve-reference