Skip to content

Commit

Permalink
Remove /livepapers resource, since the livepaper API has been separat…
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Jun 19, 2024
1 parent a2993e0 commit 11df0e8
Show file tree
Hide file tree
Showing 37 changed files with 3 additions and 9,482 deletions.
476 changes: 0 additions & 476 deletions validation_service_api/validation_service/data_models.py

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions validation_service_api/validation_service/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from fastapi import HTTPException, status
from fairgraph.openminds.core import Model, ModelVersion, SoftwareVersion
from fairgraph.openminds.computation import ValidationTest, ValidationTestVersion
from fairgraph.openminds.publications import LivePaper
from . import settings

RETRY_INTERVAL = 60 # seconds
Expand Down Expand Up @@ -94,19 +93,3 @@ def _get_test_instance_by_id(instance_id, kg_client, scope):
detail=f"Test instance with ID '{instance_id}' not found.",
)
return test_instance


def _get_live_paper_by_id_or_alias(lp_id, kg_client, scope):

if isinstance(lp_id, UUID):
identifier_type = "ID"
live_paper = LivePaper.from_uuid(str(lp_id), kg_client, scope=scope)
else:
identifier_type = "alias"
live_paper = LivePaper.from_alias(lp_id, kg_client, space=LivePaper.default_space, scope=scope)
if not live_paper:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Live paper with {identifier_type} '{lp_id}' not found.",
)
return live_paper
1,633 changes: 1 addition & 1,632 deletions validation_service_api/validation_service/examples.py

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions validation_service_api/validation_service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from starlette.middleware.sessions import SessionMiddleware
from starlette.middleware.cors import CORSMiddleware

from .resources import models, tests, vocab, results, auth, livepapers
from .resources import models, tests, vocab, results, auth
from . import settings


Expand Down Expand Up @@ -50,5 +50,4 @@
app.include_router(tests.router, tags=["Validation Tests"])
app.include_router(results.router, tags=["Validation Results"])
#app.include_router(simulations.router, tags=["Simulations"])
app.include_router(livepapers.router, tags=["Live Papers"])
app.include_router(vocab.router, tags=["Controlled vocabularies"])
356 changes: 0 additions & 356 deletions validation_service_api/validation_service/resources/livepapers.py

This file was deleted.

Loading

0 comments on commit 11df0e8

Please sign in to comment.