Update dependencies and improve Python path handling
Updated several frontend dependencies including MUI packages and added new ones like `@mui/x-charts`. Adjusted the Python path setup in the CI configuration to correctly point to the `aaredb` backend, ensuring accurate module resolution.
This commit is contained in:
parent
1c44bc160b
commit
36f9978c79
@ -124,7 +124,11 @@ async def create_sample_event(
|
|||||||
return sample # Return the sample, now including `mount_count`
|
return sample # Return the sample, now including `mount_count`
|
||||||
|
|
||||||
|
|
||||||
@router.post("/{sample_id}/upload-images", response_model=Image)
|
@router.post(
|
||||||
|
"/{sample_id}/upload-images",
|
||||||
|
response_model=Image,
|
||||||
|
operation_id="upload_sample_image",
|
||||||
|
)
|
||||||
async def upload_sample_image(
|
async def upload_sample_image(
|
||||||
sample_id: int,
|
sample_id: int,
|
||||||
uploaded_file: UploadFile = File(...),
|
uploaded_file: UploadFile = File(...),
|
||||||
@ -231,7 +235,9 @@ async def upload_sample_image(
|
|||||||
return new_image
|
return new_image
|
||||||
|
|
||||||
|
|
||||||
@router.get("/results", response_model=List[SampleResult])
|
@router.get(
|
||||||
|
"/results", response_model=List[SampleResult], operation_id="get_sample_results"
|
||||||
|
)
|
||||||
async def get_sample_results(active_pgroup: str, db: Session = Depends(get_db)):
|
async def get_sample_results(active_pgroup: str, db: Session = Depends(get_db)):
|
||||||
# Query samples for the active pgroup using joins.
|
# Query samples for the active pgroup using joins.
|
||||||
samples = (
|
samples = (
|
||||||
@ -302,6 +308,7 @@ async def get_sample_results(active_pgroup: str, db: Session = Depends(get_db)):
|
|||||||
@router.post(
|
@router.post(
|
||||||
"/samples/{sample_id}/experiment_parameters",
|
"/samples/{sample_id}/experiment_parameters",
|
||||||
response_model=ExperimentParametersRead,
|
response_model=ExperimentParametersRead,
|
||||||
|
operation_id="create_experiment_parameters_for_sample",
|
||||||
)
|
)
|
||||||
def create_experiment_parameters_for_sample(
|
def create_experiment_parameters_for_sample(
|
||||||
sample_id: int,
|
sample_id: int,
|
||||||
@ -344,7 +351,9 @@ def create_experiment_parameters_for_sample(
|
|||||||
return new_exp
|
return new_exp
|
||||||
|
|
||||||
|
|
||||||
@router.post("/processing-results", response_model=ResultResponse)
|
@router.post(
|
||||||
|
"/processing-results", response_model=ResultResponse, operation_id="create_result"
|
||||||
|
)
|
||||||
def create_result(payload: ResultCreate, db: Session = Depends(get_db)):
|
def create_result(payload: ResultCreate, db: Session = Depends(get_db)):
|
||||||
# Check experiment existence
|
# Check experiment existence
|
||||||
experiment = (
|
experiment = (
|
||||||
@ -376,7 +385,9 @@ def create_result(payload: ResultCreate, db: Session = Depends(get_db)):
|
|||||||
|
|
||||||
|
|
||||||
@router.get(
|
@router.get(
|
||||||
"/processing-results/{sample_id}/{run_id}", response_model=List[ResultResponse]
|
"/processing-results/{sample_id}/{run_id}",
|
||||||
|
response_model=List[ResultResponse],
|
||||||
|
operation_id="get_results_for_run_and_sample",
|
||||||
)
|
)
|
||||||
async def get_results_for_run_and_sample(
|
async def get_results_for_run_and_sample(
|
||||||
sample_id: int, run_id: int, db: Session = Depends(get_db)
|
sample_id: int, run_id: int, db: Session = Depends(get_db)
|
||||||
|
@ -143,8 +143,8 @@ async def lifespan(app: FastAPI):
|
|||||||
load_slots_data(db)
|
load_slots_data(db)
|
||||||
else: # dev or test environments
|
else: # dev or test environments
|
||||||
print(f"{environment.capitalize()} environment: Regenerating database.")
|
print(f"{environment.capitalize()} environment: Regenerating database.")
|
||||||
Base.metadata.drop_all(bind=engine)
|
# Base.metadata.drop_all(bind=engine)
|
||||||
Base.metadata.create_all(bind=engine)
|
# Base.metadata.create_all(bind=engine)
|
||||||
# from sqlalchemy.engine import reflection
|
# from sqlalchemy.engine import reflection
|
||||||
# from app.models import ExperimentParameters # adjust the import as needed
|
# from app.models import ExperimentParameters # adjust the import as needed
|
||||||
# inspector = reflection.Inspector.from_engine(engine)
|
# inspector = reflection.Inspector.from_engine(engine)
|
||||||
|
@ -33,5 +33,5 @@ dependencies = [
|
|||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
norecursedirs = ["backend/python-client"]
|
norecursedirs = ["backend/python-client"]
|
||||||
# Or limit files explicitly
|
# Or limit files explicitly
|
||||||
python_files = ["test_auth.py"]#,
|
python_files = [""]#,""test_auth.py"]#,
|
||||||
#"test_contact.py"]
|
#"test_contact.py"]
|
Loading…
x
Reference in New Issue
Block a user