Skip to content

Commit

Permalink
fixed url definition structuring
Browse files Browse the repository at this point in the history
Signed-off-by: Duncan Ragsdale <[email protected]>
  • Loading branch information
Thistleman committed Nov 30, 2023
1 parent ca2d7d2 commit d09dd34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions workers/pvinsight-validation-runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ def run(module_to_import_s3_path,
# Load in data set that we're going to analyze.

# Make GET requests to the Django API to get the system metadata
system_metadata_response = requests.get('http://{api_base_url}/system_metadata/systemmetadata/')
# http://api.pv-validation-hub.org/system_metadata/systemmetadata/
smd_url = f'http://{api_base_url}/system_metadata/systemmetadata/'
system_metadata_response = requests.get(smd_url)

# Convert the responses to DataFrames

Expand Down Expand Up @@ -241,7 +243,8 @@ def run(module_to_import_s3_path,
# For each unique file id, make a GET request to the Django API to get the corresponding file metadata
file_metadata_list = []
for file_id in unique_file_ids:
response = requests.get(f'http://{api_base_url}/file_metadata/filemetadata/{file_id}/')
fmd_url = f'http://{api_base_url}/file_metadata/filemetadata/{file_id}/'
response = requests.get(fmd_url)
file_metadata_list.append(response.json())

# Convert the list of file metadata to a DataFrame
Expand Down

0 comments on commit d09dd34

Please sign in to comment.