Add beamtime functionality to backend.

Introduce new endpoint and model for managing beamtimes, including shifts and user-specific access. Updated test scripts and data to reflect beamtime integration, along with minor fixes for job status enumeration and example notebook refinement.
This commit is contained in:
GotthardG
2025-05-05 16:05:37 +02:00
parent db6474c86a
commit 102a11eed7
9 changed files with 220 additions and 196 deletions

View File

@@ -395,10 +395,11 @@ beamtimes = [
Beamtime(
id=1,
pgroups="p20001",
shift="morning",
beamtime_name="p20001-test",
beamline="X06DA",
start_date=datetime.strptime("06.02.2025", "%d.%m.%Y").date(),
end_date=datetime.strptime("07.02.2025", "%d.%m.%Y").date(),
start_date=datetime.strptime("06.05.2025", "%d.%m.%Y").date(),
end_date=datetime.strptime("06.05.2025", "%d.%m.%Y").date(),
status="confirmed",
comments="this is a test beamtime",
proposal_id=1,
@@ -407,10 +408,11 @@ beamtimes = [
Beamtime(
id=2,
pgroups="p20002",
shift="afternoon",
beamtime_name="p20001-test",
beamline="X06DA",
start_date=datetime.strptime("07.02.2025", "%d.%m.%Y").date(),
end_date=datetime.strptime("08.02.2025", "%d.%m.%Y").date(),
start_date=datetime.strptime("07.05.2025", "%d.%m.%Y").date(),
end_date=datetime.strptime("08.05.2025", "%d.%m.%Y").date(),
status="confirmed",
comments="this is a test beamtime",
proposal_id=2,