ngiab-data-preprocess 4.6.7__py3-none-any.whl → 4.6.8__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.
map_app/__init__.py CHANGED
@@ -1,16 +1,19 @@
1
1
  from flask import Flask
2
2
  import logging
3
+ from pathlib import Path
3
4
  from map_app.views import main, intra_module_db
4
5
  from data_sources.source_validation import validate_all
5
6
 
6
- with open("app.log", "w") as f:
7
+ LOG_PATH = Path.home() / ".ngiab" / "app.log"
8
+
9
+ with open(LOG_PATH, "w") as f:
7
10
  f.write("")
8
11
  f.write("Starting Application!\n")
9
12
 
10
13
  logging.basicConfig(
11
14
  level=logging.INFO,
12
15
  format="%(name)-12s: %(levelname)s - %(message)s",
13
- filename="app.log",
16
+ filename=LOG_PATH,
14
17
  filemode="a",
15
18
  ) # Append mode
16
19
  # Example: Adding a console handler to root logger (optional)
map_app/__main__.py CHANGED
@@ -3,18 +3,20 @@
3
3
  import logging
4
4
  import webbrowser
5
5
  from threading import Timer
6
+ from pathlib import Path
6
7
 
7
8
  from data_processing.file_paths import FilePaths
8
9
  from data_processing.graph_utils import get_graph
9
10
 
10
11
  from map_app import app, console_handler
11
12
 
13
+ LOG_PATH = Path.home() / ".ngiab" / "app.log"
12
14
 
13
15
  def open_browser():
14
16
  # find the last line in the log file that contains the port number
15
17
  # * running on http://0.0.0.0:port_number
16
18
  port_number = None
17
- with open("app.log", "r") as f:
19
+ with open(LOG_PATH, 'r') as f:
18
20
  lines = f.readlines()
19
21
  for line in reversed(lines):
20
22
  if "Running on http" in line:
@@ -38,12 +40,12 @@ def main():
38
40
 
39
41
  if FilePaths.dev_file.is_file():
40
42
  Timer(2, set_logs_to_warning).start()
41
- with open("app.log", "a") as f:
43
+ with open(LOG_PATH, "a") as f:
42
44
  f.write("Running in debug mode\n")
43
45
  app.run(debug=True, host="0.0.0.0", port="8080") # type: ignore
44
46
  else:
45
47
  Timer(1, open_browser).start()
46
- with open("app.log", "a") as f:
48
+ with open(LOG_PATH, "a") as f:
47
49
  f.write("Running in production mode\n")
48
50
  app.run(host="0.0.0.0", port="0") # type: ignore
49
51
 
map_app/views.py CHANGED
@@ -136,7 +136,7 @@ def download_forcings(data_source, start_time, end_time, paths):
136
136
 
137
137
  def compute_forcings(cached_data, paths):
138
138
  create_forcings(cached_data, paths.output_dir.stem) # type: ignore
139
-
139
+
140
140
  @main.route("/forcings", methods=["POST"])
141
141
  def get_forcings():
142
142
  # body: JSON.stringify({'forcing_dir': forcing_dir, 'start_time': start_time, 'end_time': end_time}),
@@ -190,7 +190,7 @@ def get_catids_from_vpu():
190
190
 
191
191
  @main.route("/logs", methods=["GET"])
192
192
  def get_logs():
193
- log_file_path = "app.log"
193
+ log_file_path = Path.home() / ".ngiab" / "app.log"
194
194
  try:
195
195
  with open(log_file_path, "r") as file:
196
196
  lines = file.readlines()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ngiab_data_preprocess
3
- Version: 4.6.7
3
+ Version: 4.6.8
4
4
  Summary: Graphical Tools for creating Next Gen Water model input data.
5
5
  Author-email: Josh Cunningham <jcunningham8@ua.edu>
6
6
  Project-URL: Homepage, https://github.com/CIROH-UA/NGIAB_data_preprocess
@@ -13,6 +13,7 @@ Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: pyogrio>=0.7.2
15
15
  Requires-Dist: pyproj>=3.6.1
16
+ Requires-Dist: pandas<3.0.0
16
17
  Requires-Dist: Flask==3.0.2
17
18
  Requires-Dist: geopandas>=1.0.0
18
19
  Requires-Dist: requests==2.32.4
@@ -28,7 +29,7 @@ Requires-Dist: numpy>=1.26.4
28
29
  Requires-Dist: tqdm==4.66.4
29
30
  Requires-Dist: rich==13.7.1
30
31
  Requires-Dist: colorama==0.4.6
31
- Requires-Dist: bokeh==3.5.1
32
+ Requires-Dist: bokeh==3.8.2
32
33
  Requires-Dist: boto3
33
34
  Requires-Dist: numcodecs<0.16.0
34
35
  Requires-Dist: scipy>=1.15.3
@@ -19,9 +19,9 @@ data_sources/noah-owp-modular-init.namelist.input,sha256=Vb7mp40hFpJogruOrXrDHwV
19
19
  data_sources/source_validation.py,sha256=DMCTo-Tad9QSXFqSDB5guI8hMzY_kQE6aW78-5nqwlU,9457
20
20
  data_sources/template.sql,sha256=ZnFqAqleEq9wgmAhNO90Wue_L9k0JAn8KF99DYtcxgs,10457
21
21
  data_sources/triggers.sql,sha256=G0d_175eNsamKAFhsbphPATvzMPuPL_iCleIhlToduQ,14906
22
- map_app/__init__.py,sha256=OarJao9X98kcbLyiwewN4ObWNAYkKDichcxbuWywTsA,818
23
- map_app/__main__.py,sha256=5qJGypfesfdWDWRsbTQiMs3uL5zPZKRZQq31l7qXqCc,1649
24
- map_app/views.py,sha256=AxLsXL8ZSnRJzg5zVYDGfVFA_6amgae41AO_E1G7W58,7923
22
+ map_app/__init__.py,sha256=HvjuTiuf0vTvNLDsgmABqPPMQxOcTljX2nzgj6Pdp_g,888
23
+ map_app/__main__.py,sha256=9wnCunreKNtvI-NEFB-bTHoKXuI5PtPznj13ctrDAOc,1717
24
+ map_app/views.py,sha256=LRpHHw9FOzxEPY42LjJZ3XWFbKyZFKtPu9GZftdXrUY,7944
25
25
  map_app/static/css/console.css,sha256=xN6G2MMFyKc9YW9HEVpUUTUjx2o2nokBR4nCX5c18UM,803
26
26
  map_app/static/css/main.css,sha256=pYIIk-dXW6YMpliSJKATdvgPhFVY6K26NeUuHoYyJqg,8736
27
27
  map_app/static/css/toggle.css,sha256=aUIe9AL1-_mzKvWir3lJ9W8r2oXsOjkFbtvcrohnV10,4149
@@ -35,9 +35,9 @@ ngiab_data_cli/__main__.py,sha256=FmHxibQtFm15aEUG1BrIIqIWNU_BoXzWCTXoR9EA-YI,11
35
35
  ngiab_data_cli/arguments.py,sha256=Bi_Q6FRXvRxI50Pgk7goyASe-2lfUh-oDdnYkaY4KTc,5262
36
36
  ngiab_data_cli/custom_logging.py,sha256=iS2XozaxudcxQj17qAsrCgbVK9LJAYAPmarJuVWJo1k,1280
37
37
  ngiab_data_cli/forcing_cli.py,sha256=eIWRxRWUwPqR16fihFDEIV4VzGlNuvcD6lJW5VYjkPU,3635
38
- ngiab_data_preprocess-4.6.7.dist-info/licenses/LICENSE,sha256=6dMSprwwnsRzEm02mEDbKHD9dUbL8bPIt9Vhrhb0Ulk,1081
39
- ngiab_data_preprocess-4.6.7.dist-info/METADATA,sha256=3U2P21OHELN_hol-fu43soXXozFw3r6Y57rLwCK2GLc,14513
40
- ngiab_data_preprocess-4.6.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
- ngiab_data_preprocess-4.6.7.dist-info/entry_points.txt,sha256=spwlhKEJ3ZnNETQsJGeTjD7Vwy8O_zGHb9GdX8ACCtw,128
42
- ngiab_data_preprocess-4.6.7.dist-info/top_level.txt,sha256=CjhYAUZrdveR2fOK6rxffU09VIN2IuPD7hk4V3l3pV0,52
43
- ngiab_data_preprocess-4.6.7.dist-info/RECORD,,
38
+ ngiab_data_preprocess-4.6.8.dist-info/licenses/LICENSE,sha256=6dMSprwwnsRzEm02mEDbKHD9dUbL8bPIt9Vhrhb0Ulk,1081
39
+ ngiab_data_preprocess-4.6.8.dist-info/METADATA,sha256=SR4MIdIf-NJsmQIVblbUQkzQEorQymRjDhQRK4eJv8Y,14541
40
+ ngiab_data_preprocess-4.6.8.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
41
+ ngiab_data_preprocess-4.6.8.dist-info/entry_points.txt,sha256=spwlhKEJ3ZnNETQsJGeTjD7Vwy8O_zGHb9GdX8ACCtw,128
42
+ ngiab_data_preprocess-4.6.8.dist-info/top_level.txt,sha256=CjhYAUZrdveR2fOK6rxffU09VIN2IuPD7hk4V3l3pV0,52
43
+ ngiab_data_preprocess-4.6.8.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5