pipeline-eds 0.2.23__tar.gz → 0.2.24__tar.gz

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.
Files changed (63) hide show
  1. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/PKG-INFO +2 -2
  2. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/pyproject.toml +2 -2
  3. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/cli.py +2 -2
  4. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/helpers.py +16 -1
  5. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/workspace_manager.py +17 -2
  6. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/LICENSE +0 -0
  7. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/README.md +0 -0
  8. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/__init__.py +0 -0
  9. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/__main__.py +0 -0
  10. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/api/__init__.py +0 -0
  11. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/api/eds.py +0 -0
  12. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/api/rjn.py +0 -0
  13. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/api/status_api.py +0 -0
  14. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/calls.py +0 -0
  15. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/configrationmanager.py +0 -0
  16. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/decorators.py +0 -0
  17. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/env.py +0 -0
  18. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/environment.py +0 -0
  19. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/gui_fastapi_plotly_live.py +0 -0
  20. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/gui_mpl_live.py +0 -0
  21. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/gui_plotly_static.py +0 -0
  22. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/install_appdata.py +0 -0
  23. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/logging_setup.py +0 -0
  24. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/pastehelpers.py +0 -0
  25. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/philosophy.py +0 -0
  26. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/plotbuffer.py +0 -0
  27. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/points_loader.py +0 -0
  28. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/queriesmanager.py +0 -0
  29. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/src/pipeline/time_manager.py +0 -0
  30. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/default-workspace.toml +0 -0
  31. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/__init__.py +0 -0
  32. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/code/__init__.py +0 -0
  33. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/code/aggregator.py +0 -0
  34. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/code/collector.py +0 -0
  35. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/code/sanitizer.py +0 -0
  36. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/code/storage.py +0 -0
  37. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/configurations/config_time.toml +0 -0
  38. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/configurations/configuration.toml +0 -0
  39. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/README.md +0 -0
  40. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/aggregate/README.md +0 -0
  41. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/aggregate/live_data - Copy.csv +0 -0
  42. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/aggregate/live_data_EFF.csv +0 -0
  43. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/aggregate/live_data_INF.csv +0 -0
  44. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/export_eds_points_neo.txt +0 -0
  45. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/manual_data_load_to_postman_wetwell.csv +0 -0
  46. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/manual_data_load_to_postman_wetwell.xlsx +0 -0
  47. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/manual_effluent.csv +0 -0
  48. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/manual_influent.csv +0 -0
  49. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/exports/manual_wetwell.csv +0 -0
  50. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/history/time_sample.txt +0 -0
  51. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/imports/zdMaxson_idcsD321E_sid11003.toml +0 -0
  52. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/imports/zdMaxson_idcsFI8001_sid8528.toml +0 -0
  53. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/imports/zdMaxson_idcsM100FI_sid2308.toml +0 -0
  54. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/imports/zdMaxson_idcsM310LI_sid2382.toml +0 -0
  55. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/queries/default-queries.toml +0 -0
  56. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/queries/points-maxson.csv +0 -0
  57. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/queries/points-stiles.csv +0 -0
  58. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/queries/timestamps_success.json +0 -0
  59. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/scripts/__init__.py +0 -0
  60. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/scripts/daemon_runner.py +0 -0
  61. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/secrets/README.md +0 -0
  62. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_rjn/secrets/secrets-example.yaml +0 -0
  63. {pipeline_eds-0.2.23 → pipeline_eds-0.2.24}/workspaces/eds_to_termux/..txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pipeline-eds
3
- Version: 0.2.23
3
+ Version: 0.2.24
4
4
  Summary: The official API pipeline library for mulch-based projects. Key target: Emerson Ovation EDS REST API.
5
5
  License: BSD-3
6
6
  Author: George Clayton Bennett
@@ -15,7 +15,7 @@ Provides-Extra: windb
15
15
  Requires-Dist: certifi (>=2025.1.31,<2026.0.0)
16
16
  Requires-Dist: fastapi (>=0.116.1,<0.117.0)
17
17
  Requires-Dist: matplotlib (>=3.10.6,<4.0.0)
18
- Requires-Dist: mulch (==0.2.59)
18
+ Requires-Dist: mulch (>=0.2.62,<0.3.0)
19
19
  Requires-Dist: mysql-connector-python (>=9.3.0,<10.0.0)
20
20
  Requires-Dist: pendulum (>=3.1.0,<4.0.0)
21
21
  Requires-Dist: plotly (>=6.2.0,<7.0.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pipeline-eds"
3
- version = "0.2.23"
3
+ version = "0.2.24"
4
4
  description = "The official API pipeline library for mulch-based projects. Key target: Emerson Ovation EDS REST API."
5
5
  authors = ["George Clayton Bennett <george.bennett@memphistn.gov>"]
6
6
  license = "BSD-3"
@@ -48,7 +48,7 @@ tzdata = "^2025.2"
48
48
  pendulum = "^3.1.0"
49
49
  fastapi = "^0.116.1"
50
50
  matplotlib = "^3.10.6"
51
- mulch = "0.2.59"
51
+ mulch = "^0.2.62"
52
52
 
53
53
  [tool.poetry.extras]
54
54
  windb = ["pyodbc"]
@@ -154,11 +154,11 @@ def trend(
154
154
  queries_manager = QueriesManager(wm)
155
155
  dt_start = queries_manager.get_most_recent_successful_timestamp(api_id=zd)
156
156
  else:
157
- dt_start = pendulum.parse(starttime, strict=False)
157
+ dt_start = pendulum.parse(helpers.sanitize_date_input(starttime), strict=False)
158
158
  if endtime is None:
159
159
  dt_finish = helpers.get_now_time_rounded(wm)
160
160
  else:
161
- dt_finish = pendulum.parse(endtime, strict=False)
161
+ dt_finish = pendulum.parse(helpers.sanitize_date_input(endtime), strict=False)
162
162
 
163
163
  # Should automatically choose time step granularity based on time length; map
164
164
  if step_seconds is None:
@@ -6,6 +6,7 @@ import types
6
6
  import os
7
7
  import logging
8
8
  import socket
9
+ import re
9
10
 
10
11
  from pipeline.time_manager import TimeManager
11
12
 
@@ -120,6 +121,20 @@ def nice_step(delta_sec: int) -> int:
120
121
  if n >= target_step:
121
122
  return n
122
123
  return nice_numbers[-1]
124
+
125
+
126
+
127
+ def sanitize_date_input(date_str: str) -> str:
128
+ '''Sanitize date input strings by adding spaces where needed, to overcome error in fuzzy date parsing by the pendulum library.'''
129
+ # 1. Add space between letters and numbers
130
+ date_str = re.sub(r'([A-Za-z])(\d)', r'\1 \2', date_str)
131
+ # 2. Ensure a space after commas
132
+ date_str = re.sub(r',\s*', ', ', date_str)
133
+ # 3. Normalize multiple spaces
134
+ date_str = re.sub(r'\s+', ' ', date_str).strip()
135
+ return date_str
123
136
 
124
137
  if __name__ == "__main__":
125
- function_view()
138
+ function_view()
139
+ # Example
140
+ sanitize_date_input("December12,2024") # -> "December 12,2024"
@@ -3,7 +3,22 @@ import toml
3
3
  import logging
4
4
  from pathlib import Path
5
5
  import sys
6
- import mulch
6
+ #import mulch
7
+ import importlib.util
8
+ import sys
9
+ from pathlib import Path
10
+
11
+ # current_dir = this pipeline repo
12
+ repo_root = Path(__file__).resolve().parents[3] # adjust if needed
13
+ mulch_path = repo_root / "mulch" / "src" / "mulch" / "__init__.py"
14
+
15
+ if not mulch_path.exists():
16
+ raise FileNotFoundError(f"Expected mulch at {mulch_path}")
17
+
18
+ spec = importlib.util.spec_from_file_location("mulch", str(mulch_path))
19
+ mulch = importlib.util.module_from_spec(spec)
20
+ sys.modules["mulch"] = mulch
21
+ spec.loader.exec_module(mulch)
7
22
 
8
23
  '''
9
24
  Goal:
@@ -313,7 +328,7 @@ class WorkspaceManager:
313
328
  pass
314
329
  #default_file.write_text("# Default workspace config\n")
315
330
  mulch_scaffold = []
316
- mulch.seed(target_dir = workspaces_dir,scaffold_dict = mulch_scaffold)
331
+ mulch.seed(target_dir = workspaces_dir,scaffold_dict = mulch_scaffold, skip_if_exists=True)
317
332
  workspace_path = workspaces_dir / "eds"
318
333
  mulch.workspace(base_path = workspaces_dir.parent, scaffold_filepath = workspaces_dir / '.mulch' / 'mulch.toml', workspace_path = workspace_path) # allow date based default if no workspace_name is provided
319
334
  return workspaces_dir
File without changes
File without changes