irie 0.0.38__py3-none-any.whl → 0.0.40__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.
Potentially problematic release.
This version of irie might be problematic. Click here for more details.
- irie/apps/templates/inventory/asset-profile.html +0 -6
- irie/apps/templates/inventory/asset-sensors.html +7 -3
- irie/init/calid.py +3 -0
- irie/init/getNBIData.py +41 -9
- irie/init/management/commands/init_assets.py +3 -6
- irie/init/management/commands/init_cesmd.py +1 -0
- {irie-0.0.38.dist-info → irie-0.0.40.dist-info}/METADATA +1 -1
- {irie-0.0.38.dist-info → irie-0.0.40.dist-info}/RECORD +11 -11
- {irie-0.0.38.dist-info → irie-0.0.40.dist-info}/WHEEL +0 -0
- {irie-0.0.38.dist-info → irie-0.0.40.dist-info}/entry_points.txt +0 -0
- {irie-0.0.38.dist-info → irie-0.0.40.dist-info}/top_level.txt +0 -0
|
@@ -130,17 +130,11 @@
|
|
|
130
130
|
<a role="button"
|
|
131
131
|
href="/inventory/{{ asset.calid }}/predictors/"
|
|
132
132
|
class="btn btn-sm btn-outline-primary d-inline-flex align-items-center mx-1">
|
|
133
|
-
<svg class="icon icon-xs me-2" fill="none"
|
|
134
|
-
stroke="currentColor" viewBox="0 0 24 24"
|
|
135
|
-
xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
|
136
133
|
Predictors
|
|
137
134
|
</a>
|
|
138
135
|
<a role="button"
|
|
139
136
|
href="{% url 'asset_sensors' calid=asset.calid %}"
|
|
140
137
|
class="btn btn-sm btn-outline-primary d-inline-flex align-items-center mx-1">
|
|
141
|
-
<svg class="icon icon-xs me-2" fill="none"
|
|
142
|
-
stroke="currentColor" viewBox="0 0 24 24"
|
|
143
|
-
xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
|
144
138
|
Sensors
|
|
145
139
|
</a>
|
|
146
140
|
</div>
|
|
@@ -16,10 +16,14 @@ Chrystal Chern, Spring 2025
|
|
|
16
16
|
{% block content %}
|
|
17
17
|
<h1><code>{{ asset.calid }}</code> Sensors</h1>
|
|
18
18
|
<div class="py-4 align-right">
|
|
19
|
-
<a role="button" class="button btn btn-outline-
|
|
19
|
+
<a role="button" class="button btn btn-outline-primary"
|
|
20
20
|
href="{% url 'asset_profile' calid=asset.calid %}" class="me-1">Back to Structure</a>
|
|
21
|
-
<a role="button" class="button btn btn-outline-
|
|
22
|
-
href="{% url 'sensor_upload' calid=asset.calid %}" class="me-1">
|
|
21
|
+
<a role="button" class="button btn btn-outline-primary"
|
|
22
|
+
href="{% url 'sensor_upload' calid=asset.calid %}" class="me-1">
|
|
23
|
+
<svg class="icon icon-xs me-2" fill="none"
|
|
24
|
+
stroke="currentColor" viewBox="0 0 24 24"
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>
|
|
26
|
+
Add SensorGroup</a>
|
|
23
27
|
</div>
|
|
24
28
|
|
|
25
29
|
<div class="col-lg-10">
|
irie/init/calid.py
CHANGED
|
@@ -27,7 +27,10 @@ CESMD = {
|
|
|
27
27
|
"04-0236": ("CE89324", None, "Rio Dell - Hwy 101/Painter St. Overpass"),
|
|
28
28
|
"54-0823G": ("CE23631", None, "San Bernardino - I10/215 Interchange Br"),
|
|
29
29
|
"33-0214L": ("CE58658", None, "Hayward - Hwy 580/238 Interchange Bridge"),
|
|
30
|
+
}
|
|
30
31
|
|
|
32
|
+
# TODO: Need to get NBI/CGS Data for these
|
|
33
|
+
{
|
|
31
34
|
#-------------------------------------
|
|
32
35
|
|
|
33
36
|
"34-0006": ("CE58600", None, "Oakland - SF Bay Bridge/East: SAS"),
|
irie/init/getNBIData.py
CHANGED
|
@@ -33,10 +33,13 @@ def getBridgeList(headers, start_page=1, totalpages=3, pagesize=10, totalbridges
|
|
|
33
33
|
url = 'https://infobridge.fhwa.dot.gov/Data/GetAllBridges'
|
|
34
34
|
|
|
35
35
|
payload = {
|
|
36
|
-
"isShowBridgesApplied":True,
|
|
36
|
+
"isShowBridgesApplied": True,
|
|
37
37
|
"gridParam": {
|
|
38
|
-
"isShowBridgesApplied":True,
|
|
39
|
-
"
|
|
38
|
+
"isShowBridgesApplied": True,
|
|
39
|
+
"IsFilterApplied": False,
|
|
40
|
+
"SelectedFilters": None,
|
|
41
|
+
"SortOrder": "asc",
|
|
42
|
+
"SortIndex": "STATE_CODE",
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
|
|
@@ -76,6 +79,7 @@ def getBridgeList(headers, start_page=1, totalpages=3, pagesize=10, totalbridges
|
|
|
76
79
|
|
|
77
80
|
|
|
78
81
|
def getNBIData(headers, bridgeTable, years,
|
|
82
|
+
structure=None,
|
|
79
83
|
keep_query=False):
|
|
80
84
|
|
|
81
85
|
url = 'https://infobridge.fhwa.dot.gov/Data/getBridgeInformation'
|
|
@@ -107,7 +111,7 @@ def getNBIData(headers, bridgeTable, years,
|
|
|
107
111
|
"IS_YEAR_SELECTED": False,
|
|
108
112
|
"Is_Overview_Bridge_Selected": False,
|
|
109
113
|
"NEW_BRIDGE_ID": 0,
|
|
110
|
-
"STRUCTURE_NUMBER":
|
|
114
|
+
"STRUCTURE_NUMBER": structure,
|
|
111
115
|
"STATE_NAME": None,
|
|
112
116
|
"STATE_CODE": 0,
|
|
113
117
|
"IS_EXPERIMENTAL": False,
|
|
@@ -141,13 +145,13 @@ def getNBIData(headers, bridgeTable, years,
|
|
|
141
145
|
if r.status_code == 200:
|
|
142
146
|
htmlcontent = r.content.decode('utf-8')
|
|
143
147
|
try:
|
|
144
|
-
data[STRUCTURE_NUMBER]
|
|
148
|
+
data[STRUCTURE_NUMBER].append({
|
|
145
149
|
k: (
|
|
146
150
|
v if k != "Results" else {
|
|
147
151
|
kk: vv for kk, vv in v.items() if (kk != "NBIDataQuery" or keep_query)
|
|
148
152
|
}
|
|
149
153
|
) for k, v in json.loads(htmlcontent).items()
|
|
150
|
-
}
|
|
154
|
+
})
|
|
151
155
|
except Exception as e:
|
|
152
156
|
print(f">> Error: {e}", file=sys.stderr)
|
|
153
157
|
continue
|
|
@@ -193,6 +197,20 @@ if __name__ == '__main__':
|
|
|
193
197
|
print(json.dumps(bridgeTable, indent=2))
|
|
194
198
|
sys.exit()
|
|
195
199
|
|
|
200
|
+
elif sys.argv[1] == "-S":
|
|
201
|
+
headers.update({
|
|
202
|
+
'datatype': 'json',
|
|
203
|
+
'content-type': 'application/json; charset=UTF-8',
|
|
204
|
+
'accept': 'application/json, text/plain, */*'
|
|
205
|
+
})
|
|
206
|
+
bridgeTable = json.load(open(sys.argv[1]))
|
|
207
|
+
|
|
208
|
+
# calids = list(map(str.strip, open("init/calid.txt").readlines()))
|
|
209
|
+
# bridgeTable = [i for i in bridgeTable if i["STRUCTURE_NUMBER"] in calids]
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
print(json.dumps(nbi_data, indent=2))
|
|
213
|
+
|
|
196
214
|
else:
|
|
197
215
|
headers.update({
|
|
198
216
|
'datatype': 'json',
|
|
@@ -200,6 +218,7 @@ if __name__ == '__main__':
|
|
|
200
218
|
'accept': 'application/json, text/plain, */*'
|
|
201
219
|
})
|
|
202
220
|
bridgeTable = json.load(open(sys.argv[1]))
|
|
221
|
+
|
|
203
222
|
bridgeTable = [
|
|
204
223
|
i for i in bridgeTable
|
|
205
224
|
if " " in i["STRUCTURE_NUMBER"] and len(i["STRUCTURE_NUMBER"]) in {7, 8}
|
|
@@ -207,7 +226,20 @@ if __name__ == '__main__':
|
|
|
207
226
|
|
|
208
227
|
# calids = list(map(str.strip, open("init/calid.txt").readlines()))
|
|
209
228
|
# bridgeTable = [i for i in bridgeTable if i["STRUCTURE_NUMBER"] in calids]
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
229
|
+
if len(sys.argv) > 3:
|
|
230
|
+
bridgeTable = [
|
|
231
|
+
i for i in bridgeTable
|
|
232
|
+
if i["STRUCTURE_NUMBER"] == sys.argv[3]
|
|
233
|
+
]
|
|
234
|
+
if len(bridgeTable) == 0:
|
|
235
|
+
print(f"Structure {sys.argv[3]} not found", file=sys.stderr)
|
|
236
|
+
sys.exit(1)
|
|
237
|
+
else:
|
|
238
|
+
bridgeTable = [
|
|
239
|
+
i for i in bridgeTable
|
|
240
|
+
if " " in i["STRUCTURE_NUMBER"] and len(i["STRUCTURE_NUMBER"]) in {7, 8}
|
|
241
|
+
]
|
|
242
|
+
|
|
243
|
+
nbi_data = getNBIData(headers, bridgeTable[:], years=(2024,)) #range(2020, 2024))
|
|
244
|
+
print(json.dumps(nbi_data, indent=2))
|
|
213
245
|
|
|
@@ -129,7 +129,7 @@ def load_assets(NBI_DATA):
|
|
|
129
129
|
|
|
130
130
|
try:
|
|
131
131
|
asset = Asset.objects.get(calid=calid)
|
|
132
|
-
if UPDATE_ASSETS:
|
|
132
|
+
if UPDATE_ASSETS and nbi:
|
|
133
133
|
asset.nbi_data = nbi
|
|
134
134
|
asset.save()
|
|
135
135
|
|
|
@@ -147,11 +147,8 @@ def load_assets(NBI_DATA):
|
|
|
147
147
|
|
|
148
148
|
count += 1
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
# asset.ground_sensors = json.dumps(config["accelerometers"]["ground_channels"])
|
|
153
|
-
|
|
154
|
-
asset.save()
|
|
150
|
+
if asset.nbi_data or asset.cgs_data:
|
|
151
|
+
asset.save()
|
|
155
152
|
|
|
156
153
|
continue
|
|
157
154
|
|
|
@@ -396,8 +396,8 @@ irie/apps/templates/includes/settings-box.html,sha256=_YubYOyAJ8IldTgVlXP2wLLXpK
|
|
|
396
396
|
irie/apps/templates/includes/sidebar.html,sha256=m2TahYwFnysqcLkK4ANYZhUf8xGVId_tiJFBKrQD4Cw,12386
|
|
397
397
|
irie/apps/templates/inventory/asset-evals.html,sha256=KzbdJJ7ildMpfO4IQDuXqGBcPzUTlYpJ_Y3Wg4payVc,2700
|
|
398
398
|
irie/apps/templates/inventory/asset-event-summary.html,sha256=5G7uZVf7kVL0wBaAfsEtTEEA5HRuBCzx8NrgDFheWI4,51357
|
|
399
|
-
irie/apps/templates/inventory/asset-profile.html,sha256=
|
|
400
|
-
irie/apps/templates/inventory/asset-sensors.html,sha256=
|
|
399
|
+
irie/apps/templates/inventory/asset-profile.html,sha256=rfj9tEXcUoTNHGAq_yVr2y1Io0f9qXZ6_EuWy9nWBJE,13585
|
|
400
|
+
irie/apps/templates/inventory/asset-sensors.html,sha256=qLnlhnmOeT5uL1xH67mFPOgufXV_PJ31KEx5Aqt0TTw,2406
|
|
401
401
|
irie/apps/templates/inventory/asset-table.html,sha256=Ak_N_QDUgWzyffBBidJ8H0wLR3zX3wNHQm6MnZYbruQ,12589
|
|
402
402
|
irie/apps/templates/inventory/bridge-dashboard.html,sha256=67zrDlih3LOi9xFVwPVZZkgRT3DO-lE_qRL7q8Uz9GY,45472
|
|
403
403
|
irie/apps/templates/inventory/bridge.html,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
@@ -451,10 +451,10 @@ irie/core/wsgi.py,sha256=8dxK789vOoRWm0IatEhNqMgZhov9TlspjM6hOUbjg24,395
|
|
|
451
451
|
irie/init/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
452
452
|
irie/init/__main__.py,sha256=9PhToipU4y-7H_ndU5aoCdaWayhR5ld669LPnKUDBu4,828
|
|
453
453
|
irie/init/bridges.py,sha256=OBBKnLx2lmMKDfeR0C8CBSbnpnzO0lfokBypD2nEFcM,74198
|
|
454
|
-
irie/init/calid.py,sha256=
|
|
454
|
+
irie/init/calid.py,sha256=1tj1Qu-aoxbbtmVHQ80EEg0tuD2zDRROPETG5_1WikQ,8315
|
|
455
455
|
irie/init/getCGSData.py,sha256=iZG3Ab1Y_rhiliKCPNy0MZrKBsfEe6ShgSFz2ttvTUU,2916
|
|
456
456
|
irie/init/getCGSevents.py,sha256=4dBkFFJQrUs6gfl1Nj-_R2UOZj0B_T017a6tC7fUHOw,421
|
|
457
|
-
irie/init/getNBIData.py,sha256=
|
|
457
|
+
irie/init/getNBIData.py,sha256=m_sBK9WoeqEGXpX1FfmywGvVzuiVWZghl0sfcFOcbYI,9402
|
|
458
458
|
irie/init/hayward.zip,sha256=WECOnYLP_3EeKHQzdxm17MHTncF2QdgXI28Vm6Iopt0,124675
|
|
459
459
|
irie/init/data/cgs-stations.json,sha256=h-KKF-u31j_OQnQZQlmFzDjqgi0AcsPNzohn7bCNq0Q,105563
|
|
460
460
|
irie/init/data/cgs_data.json,sha256=l2lADALMXVLKY6jn-rvEZjYWcZjGHLk22ZudocdR81Q,27752
|
|
@@ -463,14 +463,14 @@ irie/init/data/nbi_data-california.json,sha256=nyslZbMf30WrtdyqCpMvxd-NNxNzFHtZX
|
|
|
463
463
|
irie/init/data/nbi_definitions.json,sha256=NS3yNP1i1E_JXfGW_I_xOoNRsfeljDA5BZ_1h0Cu_1I,4301
|
|
464
464
|
irie/init/data/nbi/04.tar,sha256=ubRgxWBshe0cNKxftbEVyFeh1HcUmFarVL2BBHo9Tyk,1884160
|
|
465
465
|
irie/init/data/networks/soga_corridors.json,sha256=AQOUaKGNWkQxQKLfqphE9Qb_-NRmjN9IwK59SGjutxE,45496
|
|
466
|
-
irie/init/management/commands/init_assets.py,sha256=
|
|
467
|
-
irie/init/management/commands/init_cesmd.py,sha256=
|
|
466
|
+
irie/init/management/commands/init_assets.py,sha256=4EK194gtub1erZ1WoezF60sP5q94CkBjzBbhKh1OrDg,5743
|
|
467
|
+
irie/init/management/commands/init_cesmd.py,sha256=00aNGLN6M_oDhMyKySJuqaPW0IwJal3TxsxCKn1lCjs,1200
|
|
468
468
|
irie/init/management/commands/init_corridors.py,sha256=EzLk0HUiFxlco-2u0rypewOc9mAo_raqXC2_UCG8a_w,1241
|
|
469
469
|
irie/init/management/commands/init_predictors.py,sha256=jdD7rd8l2qxuUuR5GOYuHXp-ZQkAK477TefksBMdlOw,2362
|
|
470
470
|
irie/rest/__main__.py,sha256=6Nf_-Rr9zGmMyp_wqCFDO7ls9QPnPd9UyUgN17rIGYw,3680
|
|
471
471
|
irie/usgs/__main__.py,sha256=HiSvPn5IW5IqRiCk1qRRq5dCy3-7iISw7v1P_w2rLrk,5049
|
|
472
|
-
irie-0.0.
|
|
473
|
-
irie-0.0.
|
|
474
|
-
irie-0.0.
|
|
475
|
-
irie-0.0.
|
|
476
|
-
irie-0.0.
|
|
472
|
+
irie-0.0.40.dist-info/METADATA,sha256=nfZd_K6XcVG91zVzOXHlKlM06WHz5AmoJGmXphjHXWE,3207
|
|
473
|
+
irie-0.0.40.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
474
|
+
irie-0.0.40.dist-info/entry_points.txt,sha256=A_3h9wPBGfxGQ78_MGa-nO6Z0foxOYeAnIE47jxEztg,44
|
|
475
|
+
irie-0.0.40.dist-info/top_level.txt,sha256=zVCxi5E2nkISZPzKq8VEhWe_dGuPcefLYV1tYqQdwlY,5
|
|
476
|
+
irie-0.0.40.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|