Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Oct 22, 2024
1 parent 8b6d283 commit 85bfb0c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
10 changes: 8 additions & 2 deletions assets/scripts/build_all.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
#!/usr/bin/env bash

set -e

arg1="$1"
arg2="$2"

# optionally prune/clear system and cache prior to build
if [ "$arg1" == "-p" ]; then
yes | docker system prune -a
yes | docker buildx prune -a
fi

# remove old spec, create new
sudo rm compose_api/spec/openapi_3_1_0_generated.yaml
cd compose_api && python3 openapi_spec.py && cd ..

# remove pycache to clean images
sudo rm -r compose_api/__pycache__
sudo rm -r compose_worker/__pycache__

# build and push containers
docker compose build --no-cache

if [ "$arg2" == "-r" ]; then
docker compose up
fi
4 changes: 1 addition & 3 deletions compose_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import logging
import uuid
from enum import Enum
from typing import *

import dotenv
Expand All @@ -13,12 +12,11 @@
from fastapi.responses import FileResponse
from pydantic import BeforeValidator, Field, BaseModel
from starlette.middleware.cors import CORSMiddleware
from sympy.multipledispatch.dispatcher import source

from compatible import COMPATIBLE_VERIFICATION_SIMULATORS
from compose_api.data_model import ObservableData
# from bio_check import MONGO_URI
from data_model import (
ObservableData,
SimulatorRMSE,
SmoldynJob,
VerificationOutput,
Expand Down
34 changes: 29 additions & 5 deletions compose_api/spec/openapi_3_1_0_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -703,21 +703,27 @@ components:
title: HTTPValidationError
ObservableData:
properties:
name:
observable_name:
type: string
title: Name
title: Observable Name
mse:
type: object
title: Mse
proximity:
type: object
title: Proximity
output_data:
additionalProperties:
anyOf:
- items:
type: number
type: array
- type: string
type: object
title: Output Data
type: object
required:
- name
- observable_name
- mse
- proximity
- output_data
Expand Down Expand Up @@ -858,6 +864,21 @@ components:
required:
- name
title: Simulator
SimulatorRMSE:
properties:
simulator:
type: string
title: Simulator
rmse_matrix:
additionalProperties:
type: number
type: object
title: Rmse Matrix
type: object
required:
- simulator
- rmse_matrix
title: SimulatorRMSE
SmoldynRun:
properties:
job_id:
Expand Down Expand Up @@ -942,10 +963,13 @@ components:
title: Requested Simulators
results:
anyOf:
- type: object
- items:
$ref: '#/components/schemas/ObservableData'
anyOf:
- $ref: '#/components/schemas/ObservableData'
- $ref: '#/components/schemas/SimulatorRMSE'
- {}
type: array
- type: object
- type: 'null'
title: Results
type: object
Expand Down

0 comments on commit 85bfb0c

Please sign in to comment.