Skip to content

Commit

Permalink
latest worker update and k8
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Aug 16, 2024
1 parent 865f2e6 commit 08eac17
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async def verify_omex(
_time = db_connector.timestamp()

# bucket params
upload_prefix = f"uploads/{job_id}/"
upload_prefix = f"file_uploads/{job_id}/"
bucket_prefix = f"gs://{BUCKET_NAME}/" + upload_prefix

save_dest = mkdtemp()
Expand Down Expand Up @@ -217,7 +217,7 @@ async def verify_sbml(
_time = db_connector.timestamp()

# bucket params
upload_prefix = f"uploads/{job_id}/"
upload_prefix = f"file_uploads/{job_id}/"
bucket_prefix = f"gs://{BUCKET_NAME}/" + upload_prefix

save_dest = mkdtemp()
Expand Down
2 changes: 1 addition & 1 deletion compose_api/io_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def upload_blob(bucket_name, source_file_name, destination_blob_name):

async def write_uploaded_file(job_id: str, bucket_name: str, uploaded_file: UploadFile, extension: str) -> str:
# bucket params
upload_prefix = f"uploads/{job_id}/"
upload_prefix = f"file_uploads/{job_id}/"
bucket_prefix = f"gs://{bucket_name}/" + upload_prefix

save_dest = mkdtemp()
Expand Down
2 changes: 1 addition & 1 deletion compose_api/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

def file_upload_prefix(job_id: str):
# bucket params
upload_prefix = f"file_uploads/{job_id}/"
upload_prefix = f"file_file_uploads/{job_id}/"
bucket_prefix = f"gs://{BUCKET_NAME}/" + upload_prefix
return upload_prefix, bucket_prefix

Expand Down
2 changes: 1 addition & 1 deletion compose_worker/.CONTAINER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.2
1.2.3
2 changes: 1 addition & 1 deletion compose_worker/io_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def download_file(source_blob_path: str, out_dir: str, bucket_name: str) -> str:

async def write_uploaded_file(job_id: str, bucket_name: str, uploaded_file: UploadFile | str, extension: str) -> str:
# bucket params
upload_prefix = f"uploads/{job_id}/"
upload_prefix = f"file_uploads/{job_id}/"
bucket_prefix = f"gs://{bucket_name}/" + upload_prefix

save_dest = mkdtemp()
Expand Down
4 changes: 2 additions & 2 deletions compose_worker/test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
}
},
"cell_type": "code",
"source": "job = {'status': 'PENDING', 'job_id': 'files-generate-simularium-file00f049df-3211-469c-b009-1c95aae5dc11', 'timestamp': '2024-08-16 16:09:28.578099', 'path': 'uploads/files-generate-simularium-file00f049df-3211-469c-b009-1c95aae5dc11/modelout.txt', 'filename': 'simulation', 'box_size': 10.0}",
"source": "job = {'status': 'PENDING', 'job_id': 'files-generate-simularium-file00f049df-3211-469c-b009-1c95aae5dc11', 'timestamp': '2024-08-16 16:09:28.578099', 'path': 'file_uploads/files-generate-simularium-file00f049df-3211-469c-b009-1c95aae5dc11/modelout.txt', 'filename': 'simulation', 'box_size': 10.0}",
"id": "e28c150926800fd6",
"outputs": [],
"execution_count": 1
Expand Down Expand Up @@ -251,7 +251,7 @@
{
"data": {
"text/plain": [
"{'results': {'results_file': 'uploads/files-generate-simularium-file00f049df-3211-469c-b009-1c95aae5dc11/modelouttxt-simulation.simularium'}}"
"{'results': {'results_file': 'file_uploads/files-generate-simularium-file00f049df-3211-469c-b009-1c95aae5dc11/modelouttxt-simulation.simularium'}}"
]
},
"execution_count": 3,
Expand Down
2 changes: 1 addition & 1 deletion compose_worker/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def test_worker(uploaded_file: str, ground_truth_report: str = None, simul
# save_dest = mkdtemp()

# bucket params
upload_prefix = f"uploads/{job_id}/"
upload_prefix = f"file_uploads/{job_id}/"
bucket_prefix = f"gs://{BUCKET_NAME}/" + upload_prefix

# Save uploaded omex file to Google Cloud Storage
Expand Down
4 changes: 2 additions & 2 deletions demos/verification_api_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@
" 'status': 'PENDING',\n",
" 'timestamp': '2024-08-12 13:54:13.175583',\n",
" 'comparison_id': None,\n",
" 'path': 'uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/Elowitz-Nature-2000-Repressilator.omex',\n",
" 'path': 'file_uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/Elowitz-Nature-2000-Repressilator.omex',\n",
" 'simulators': ['amici,copasi,tellurium'],\n",
" 'expected_results': 'uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/reports.h5',\n",
" 'expected_results': 'file_uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/reports.h5',\n",
" 'include_output': True,\n",
" 'rTol': None,\n",
" 'aTol': None,\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/verification_api_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ submission
'status': 'PENDING',
'timestamp': '2024-08-12 13:54:13.175583',
'comparison_id': None,
'path': 'uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/Elowitz-Nature-2000-Repressilator.omex',
'path': 'file_uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/Elowitz-Nature-2000-Repressilator.omex',
'simulators': ['amici,copasi,tellurium'],
'expected_results': 'uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/reports.h5',
'expected_results': 'file_uploads/bio_check-request-ba8caf28-3350-4e17-905c-8b768b98b517_35987621-19c0-43c1-a83d-2d031d537240/reports.h5',
'include_output': True,
'rTol': None,
'aTol': None,
Expand Down
12 changes: 6 additions & 6 deletions worker/tests.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -547,19 +547,19 @@
"[{'_id': ObjectId('66aa3842d1e5f99d9dd7b8c5'),\n",
" 'status': 'PENDING',\n",
" 'job_id': 'localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf',\n",
" 'path': 'uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/Elowitz-Nature-2000-Repressilator.omex',\n",
" 'path': 'file_uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/Elowitz-Nature-2000-Repressilator.omex',\n",
" 'simulators': ['amici', 'copasi', 'tellurium'],\n",
" 'comparison_id': 'localomex0',\n",
" 'timestamp': '2024-07-31 13:12:33.189310',\n",
" 'ground_truth_report_path': 'uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/reports.h5',\n",
" 'ground_truth_report_path': 'file_uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/reports.h5',\n",
" 'include_outputs': True,\n",
" 'rTol': None,\n",
" 'aTol': None,\n",
" 'selection_list': ['cI mRNA']},\n",
" {'_id': ObjectId('66aa385dd1e5f99d9dd7b8c6'),\n",
" 'status': 'PENDING',\n",
" 'job_id': 'localsbml0_2b484464-691d-48b1-8184-05abe9207d7c',\n",
" 'path': 'uploads/localsbml0_2b484464-691d-48b1-8184-05abe9207d7c/BIOMD0000000012_url.xml',\n",
" 'path': 'file_uploads/localsbml0_2b484464-691d-48b1-8184-05abe9207d7c/BIOMD0000000012_url.xml',\n",
" 'simulators': ['copasi', 'tellurium'],\n",
" 'comparison_id': 'localsbml0',\n",
" 'timestamp': '2024-07-31 13:13:00.724845',\n",
Expand Down Expand Up @@ -608,11 +608,11 @@
"{'_id': ObjectId('66aa3842d1e5f99d9dd7b8c5'),\n",
" 'status': 'PENDING',\n",
" 'job_id': 'localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf',\n",
" 'path': 'uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/Elowitz-Nature-2000-Repressilator.omex',\n",
" 'path': 'file_uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/Elowitz-Nature-2000-Repressilator.omex',\n",
" 'simulators': ['amici', 'copasi', 'tellurium'],\n",
" 'comparison_id': 'localomex0',\n",
" 'timestamp': '2024-07-31 13:12:33.189310',\n",
" 'ground_truth_report_path': 'uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/reports.h5',\n",
" 'ground_truth_report_path': 'file_uploads/localomex0_2d35f3a6-9310-4bf3-8635-2f9cafd1b2cf/reports.h5',\n",
" 'include_outputs': True,\n",
" 'rTol': None,\n",
" 'aTol': None,\n",
Expand Down Expand Up @@ -2687,7 +2687,7 @@
"{'_id': ObjectId('66aa385dd1e5f99d9dd7b8c6'),\n",
" 'status': 'PENDING',\n",
" 'job_id': 'localsbml0_2b484464-691d-48b1-8184-05abe9207d7c',\n",
" 'path': 'uploads/localsbml0_2b484464-691d-48b1-8184-05abe9207d7c/BIOMD0000000012_url.xml',\n",
" 'path': 'file_uploads/localsbml0_2b484464-691d-48b1-8184-05abe9207d7c/BIOMD0000000012_url.xml',\n",
" 'simulators': ['copasi', 'tellurium'],\n",
" 'comparison_id': 'localsbml0',\n",
" 'timestamp': '2024-07-31 13:13:00.724845',\n",
Expand Down
2 changes: 1 addition & 1 deletion worker/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async def test_worker(uploaded_file: str, ground_truth_report: str = None, simul
# save_dest = mkdtemp()

# bucket params
upload_prefix = f"uploads/{job_id}/"
upload_prefix = f"file_uploads/{job_id}/"
bucket_prefix = f"gs://{BUCKET_NAME}/" + upload_prefix

# Save uploaded omex file to Google Cloud Storage
Expand Down

0 comments on commit 08eac17

Please sign in to comment.