Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 115
    • Issues 115
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • 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
  • Issues
  • #503

Closed
Open
Created Mar 02, 2021 by Markus Scheidgen@mscheidgOwner

A reimplementation of the upload API with fastapi

This is related to #408 (closed) and https://github.com/nomad-coe/nomad/issues/1

endpoint description in out
GET uploads retrieve list of uploads owner, modified since, pagination, processing filters, required upload metadata (JSON)
GET uploads/id retrieve upload metadata required upload metadata (JSON)
GET uploads/id/entries retrieve list of upload entries pagination, modified since, processing filters, required entry processing metadata (JSON)
GET uploads/id/entries/id retrieve entry required entry processing metadata (JSON)
GET uploads/id/mirror stream upload and entry mongodb records pagination, modified since new line separated JSON docs
POST upload created upload name, auth upload metadata (JSON)
POST upload/id/raw/upload upload and overwrite raw files file archive human readable acknowledgement or JSON depending on header
GET upload/id/raw/download/path stream recursive contents as .zip - * or .zip depending on path
POST upload/id/raw/path upload and overwrite a specific file, dirs are created a file human readable acknowledgement or JSON depending on header
GET upload/id/raw/path retrieve directory contents or file (JSON or HTML depending on header) or file depending on path (think HTTP file-server)
POST upload/id/action trigger an action reprocess, publish upload metadata (JSON)
POST upload/id edit upload metadata name upload metadata (JSON)
DELETE upload/id delete upload metadata (JSON)
  • implement this in nomad.app.v1.routers.uploads
  • mimic/use the models and principles in nomad.app.v1.routers.entries
  • the major differences with nomad.app.v1.routers.entries are: its about the processing data (nomad.processing.*), not the entries metadata (nomad.datamodel.*). Respectively, it's about using mongo and not elasticsearch.
  • start "duplicating" the functionality of the existing API nomad.app.flask.api.upload.py
  • after this mirror should get priority (data synchronization with NOMAD Oasis)
  • returning un-modeled JSON-fied version of the mongoengine objects (nomad.processing.*) should be enough in the beginning, only use modeling for the outer shell (pagination, etc.)
  • apply excessive testing, one method per endpoint, lots of parametrisation, reuse example data from entries test
Edited Mar 02, 2021 by Markus Scheidgen
Assignee
Assign to
Time tracking