Skip to content
Snippets Groups Projects
Commit c82e4bb2 authored by Carsten Hinz's avatar Carsten Hinz
Browse files

bug fixes

parent 54c52e54
No related branches found
No related tags found
3 merge requests!11Creation of first beta release version,!10change in metadata of notebook,!9change in metadata of notebook
......@@ -15,7 +15,7 @@ class contributors_manager(ABC):
Each derived class needs to implement the method setup_contributors_endpoint_for_metadata.
A processing of the timeseries IDs can be done by the _do_add_timeseries_id method, which also has to add the result to the timeseriesIDs set.
"""
def __init__(self, requestID):
def __init__(self, requestID : int):
self.requestID = requestID
self.contributors = set()
def add_timeseries_id(self, id : int) -> None:
......@@ -43,7 +43,7 @@ class contributions_manager_by_id(contributors_manager):
The future plan is to run toargridding as a service. Then the request ID will be provided as a unique identify to retrieve the contributors from a database.
"""
def __init__(self, requestID, contributors_path : Path = None, endpoint="https://toar-data.fz-juelich.de/api/v2/request_contributors"):
super.__init__(requestID)
super().__init__(requestID)
self.endpoint = endpoint
self.runsAsService = True
self.inline_mode = False
......@@ -67,7 +67,7 @@ class contributions_manager_by_id(contributors_manager):
def setup_contributors_id_file(self) -> str:
ext = "contributors"
file_name = f"{self.requestID}.{ext}"
with open(self.contributors_path / {file_name}, "w") as f:
with open(self.contributors_path / file_name, "w") as f:
for id in self.contributors:
f.write(f"{id}\n")
return f'Endpoint: {self.endpoint} with data file {file_name}'
......@@ -84,7 +84,7 @@ class contributions_manager_by_name(contributions_manager_by_id):
The resulting string is typically shorter than the list of all timeseries IDs.
"""
def __init__(self, requestID, contributors_path : Path = None, metadata_endpoint="https://toar-data.fz-juelich.de/api/v2/timeseries"):
super.__init__(requestID)
super().__init__(requestID)
self.contributors_path = contributors_path
self.metadata_endpoint = metadata_endpoint
self.inline_mode = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment