@@ -980,64 +980,43 @@ def _check_set(self, iterable, to_check: set):
980
980
if not iterable .issubset (to_check ):
981
981
raise ValueError (f"All of iterable: { iterable } does not exist in { to_check } " )
982
982
983
-
984
- # GeospatialScenario no longer uses pipeline, instead job attributes are stored in attrbutes "func", "template"
985
- # def format_pipeline(self):
986
- # pipeline_html = "<div>"
987
- # if "geospatial_job" in self.pipeline:
988
- # step_name = "geospatial_job"
989
- # step = self.pipeline[step_name]
990
- # params_html = f"<pre>{json.dumps(step['params'], indent=2)}</pre>"
991
-
992
- # step_content = f"""
993
- # <div id="{step_name}" onclick="toggleVisibility('pipeline_{step_name}')" style="cursor: pointer; background-color: #000000; color: #FFFFFF; padding: 5px; border-radius: 3px; margin-bottom: 1px;">
994
- # <h4 style="font-family: monospace; margin: 0;">
995
- # <span id="arrow_pipeline_{step_name}" style="color: #b676c2;">►</span>
996
- # {step['job'].__name__}, <span style="color: #b676c2;">#{step_name}</span>
997
- # </h4>
998
- # </div>
999
- # <div id="pipeline_{step_name}" style="display:none; margin-left: 20px; padding: 5px; background-color: #f0f0f0; color: #000;">
1000
- # <p>Job: {step['job'].__name__}</p>
1001
- # <p>Parameters:</p>
1002
- # <div style="margin-left: 20px;">
1003
- # {params_html}
1004
- # </div>
1005
- # </div>
1006
- # """
1007
- # pipeline_html += step_content
1008
- # pipeline_html += "</div>"
1009
- # return pipeline_html
983
+ def format_geospatial_work (self ):
984
+ if self .func :
985
+ return f"""
986
+ <p><strong>self.func:</strong> { self .func .__name__ } </p>
987
+ <p><strong>self.template:</strong> { self .format_template ()} </p>
988
+ """
1010
989
1011
990
def _ipython_display_ (self ):
1012
991
file_url = f"file:///{ os .path .abspath (self .path ).replace (os .sep , '/' )} "
1013
992
html_content = f"""
1014
993
<div style="border:1px solid #ddd; border-radius: 5px; padding: 3px; margin-top: 5px;">
1015
- <h2>{ self .name } : Scenario Analysis </h2>
1016
- <p><strong>Path :</strong> <a href="{ file_url } " target="_blank">{ self .path } </a></p>
1017
- <p><strong>HPC Configuration :</strong> { self .hpc } </p>
1018
- <p><strong>GIDs :</strong> { self .gids } </p>
994
+ <h2>self.name: { self . name } </h2>
995
+ <p><strong>self.path :</strong> <a href="{ file_url } " target="_blank">{ self .path } </a></p>
996
+ <p><strong>self.hpc :</strong> { self .hpc } </p>
997
+ <p><strong>self.gids :</strong> { self .gids } </p>
1019
998
<div>
1020
- <h3>Results </h3>
999
+ <h3>self.results </h3>
1021
1000
{ self .format_results () if self .results else None }
1022
1001
</div>
1023
1002
<div>
1024
- <h3>Geospatial Job</h3>
1025
- Function : { self .func .__name__ }
1026
- { self .format_template ()}
1003
+ <h3>Geospatial Work</h3>
1004
+ { self .format_geospatial_work ()}
1027
1005
</div>
1028
1006
<div>
1029
- <h3>Modules </h3>
1007
+ <h3>self.modules </h3>
1030
1008
{ super ().format_modules ()}
1031
1009
</div>
1032
1010
<div>
1033
- <h3>Weather Dataset </h3>
1011
+ <h3>self.weather_data </h3>
1034
1012
{ self .format_geo_weather ()}
1035
1013
</div>
1036
1014
<div>
1037
- <h3>Meta Dataframe </h3>
1015
+ <h3>self.meta_data </h3>
1038
1016
{ self .format_geo_meta ()}
1039
1017
</div>
1040
1018
</div>
1019
+ <p><i>All attributes can be accessed by the names shown above.</i></p>
1041
1020
<script>
1042
1021
function toggleVisibility(id) {{
1043
1022
var content = document.getElementById(id);
0 commit comments