easysewer 0.0.3__py3-none-any.whl → 0.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
easysewer/ModelAPI.py CHANGED
@@ -68,21 +68,27 @@ class Model(UrbanDrainageModel):
68
68
  unique_id = str(uuid.uuid4())
69
69
  # Define output directory
70
70
  output_dir = 'simulation_output'
71
- # Check if directory exists, create it if not
72
- if not os.path.exists(output_dir):
73
- os.makedirs(output_dir)
71
+
74
72
  # Combine datetime and UUID for a unique filename
75
73
  model_name = f"{date_string}_{unique_id}"
76
74
  # Set default file paths if not provided
77
75
  if inp_file is None:
78
76
  inp_file = os.path.join(output_dir, f"{model_name}.inp")
77
+ # Check if directory exists, create it if not
78
+ if not os.path.exists(output_dir):
79
+ os.makedirs(output_dir)
80
+ # Export model to desired path
81
+ self.to_inp(inp_file)
79
82
  if rpt_file is None:
80
83
  rpt_file = os.path.join(output_dir, f"{model_name}.rpt")
84
+ # Check if directory exists, create it if not
85
+ if not os.path.exists(output_dir):
86
+ os.makedirs(output_dir)
81
87
  if out_file is None:
82
88
  out_file = os.path.join(output_dir, f"{model_name}.out")
83
-
84
- # Export model to desired path
85
- self.to_inp(inp_file)
89
+ # Check if directory exists, create it if not
90
+ if not os.path.exists(output_dir):
91
+ os.makedirs(output_dir)
86
92
 
87
93
  # Initialize swmm solver
88
94
  solver = SWMMSolverAPI()
@@ -142,14 +148,14 @@ class Model(UrbanDrainageModel):
142
148
  if progress_int > last_progress_int:
143
149
  # Calculate the number of characters to fill
144
150
  filled_length = int(bar_length * progress / 100)
145
- bar = '' * filled_length + '-' * (bar_length - filled_length)
151
+ bar = '=' * filled_length + '+' * (bar_length - filled_length)
146
152
 
147
153
  # Print the entire progress bar each time (overwriting previous one)
148
154
  print(f"\r[{bar}] {progress_int}%", end='', flush=True)
149
155
  last_progress_int = progress_int
150
156
 
151
157
  # Complete the progress bar when finished
152
- print(f"\r[{'' * bar_length}] 100%")
158
+ print(f"\r[{'=' * bar_length}] 100%")
153
159
 
154
160
  # End the simulation
155
161
  err = solver.end()
easysewer/Options.py CHANGED
@@ -42,7 +42,7 @@ class CalculationInformation:
42
42
  """
43
43
  def __init__(self):
44
44
  # general option
45
- self.flow_unit = 'CFS'
45
+ self.flow_unit = 'CMS'
46
46
  self.infiltration_method = 'HORTON'
47
47
  self.flow_routing_method = 'KINWAVE'
48
48
  self.link_offsets_type = 'DEPTH'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easysewer
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: An urban drainage modeling toolkit
5
5
  Author-email: Yiran Ji <yiranji@zju.edu.cn>
6
6
  License-Expression: AGPL-3.0-only
@@ -1,9 +1,9 @@
1
1
  easysewer/Area.py,sha256=Hw3xr-XiqAiTGVsG-fH71ovIBNnsRYBwmJrWG9l3YLA,32703
2
2
  easysewer/Curve.py,sha256=C5X_CJ9CtuYcUFqdClFkxWYZOYHhQFBxENYg9jC6Dqs,4241
3
3
  easysewer/Link.py,sha256=7hyQPme-ibnsgHO1VCjA0WgvPYflMgz3zCF8r5lhZ3g,23749
4
- easysewer/ModelAPI.py,sha256=qJe8YroVostJ_Xwnlu0P9EdBy8FEFJ6vjev_Jn9sECs,7557
4
+ easysewer/ModelAPI.py,sha256=QtLCQdBGCsyTcWo7yJGiMJFFzFBIFpme_8RKsdVwCIU,7869
5
5
  easysewer/Node.py,sha256=Cbexul4OdPWRhLW9h2fGjeMhLLwtDl0vGwmbACg_Hjs,45547
6
- easysewer/Options.py,sha256=zsmyDpiQO0Swsrqkzw_vow4lNKbiLsLX_0YQ6XWsSBI,18425
6
+ easysewer/Options.py,sha256=WN7opc5mbuBi2UReXL3fCteDdo3cl0dycuR5WsJOmDE,18425
7
7
  easysewer/OutputAPI.py,sha256=tD6-6VjBpG-DBlmvVhb9siZ_zgEe1lD1d0h2xPr72Qw,7519
8
8
  easysewer/Rain.py,sha256=Bb-SD-j7J0F6lWENsdU6Qc6Nr4ZcrCMOQcbJW3ZcbaQ,10865
9
9
  easysewer/SolverAPI.py,sha256=H1KZkS_03Mv2ruSNX6-Rg_fesTwL9O6R5TRCil2eC7o,5612
@@ -14,7 +14,7 @@ easysewer/libs/linux/libswmm5.so,sha256=UI5v1fCZ7LU9zkjLQMJqqJtzDefkFnL1iy3jmAlF
14
14
  easysewer/libs/linux/swmm-output.so,sha256=248JHb0PUGyeo3tLj9fL4L114ySTSLBrUUA_k3VHnCQ,30928
15
15
  easysewer/libs/win/swmm-output.dll,sha256=tN0K2ZRk7rlQZ-cLxlGLYZ6w269uvc5JuH1oVumADD0,71168
16
16
  easysewer/libs/win/swmm5.dll,sha256=7LjGQXUyj8bdVuFzzY8-pObQV0VcUDI5KsAz-hstWls,915968
17
- easysewer-0.0.3.dist-info/METADATA,sha256=G8-hiKnEacVIA20nHHrMwYbJvBI25EFoe70fpHg6kC4,586
18
- easysewer-0.0.3.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
19
- easysewer-0.0.3.dist-info/top_level.txt,sha256=YJi065ohgpDZhPb0XuXfE6ExHMhHPlwveH40BgZ7kt4,10
20
- easysewer-0.0.3.dist-info/RECORD,,
17
+ easysewer-0.0.4.dist-info/METADATA,sha256=muczJcFL5YrIAfpt-cWc9OPPQuFP3OmhYSoWFo19vLM,586
18
+ easysewer-0.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ easysewer-0.0.4.dist-info/top_level.txt,sha256=YJi065ohgpDZhPb0XuXfE6ExHMhHPlwveH40BgZ7kt4,10
20
+ easysewer-0.0.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5