irie 0.0.0__tar.gz → 0.0.1__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.

Potentially problematic release.


This version of irie might be problematic. Click here for more details.

Files changed (161) hide show
  1. {irie-0.0.0 → irie-0.0.1}/PKG-INFO +24 -5
  2. {irie-0.0.0 → irie-0.0.1}/README.md +3 -3
  3. {irie-0.0.0 → irie-0.0.1}/pyproject.toml +22 -3
  4. {irie-0.0.0 → irie-0.0.1}/src/irie/__main__.py +1 -1
  5. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/config.py +2 -2
  6. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/documents/apps.py +1 -1
  7. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/documents/urls.py +1 -1
  8. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/evaluation/apps.py +2 -2
  9. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/evaluation/daemon.py +2 -2
  10. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/evaluation/identification.py +3 -3
  11. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/evaluation/models.py +2 -2
  12. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/evaluation/views.py +3 -3
  13. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/apps.py +2 -2
  14. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/models.py +1 -1
  15. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/views.py +2 -2
  16. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/views_events.py +3 -3
  17. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/apps.py +1 -1
  18. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/forms.py +1 -1
  19. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/models.py +2 -2
  20. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/urls.py +1 -1
  21. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/views.py +11 -11
  22. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/networks/apps.py +1 -1
  23. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/networks/networks.py +1 -1
  24. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/networks/urls.py +3 -3
  25. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/apps.py +1 -1
  26. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/forms.py +1 -1
  27. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/models.py +1 -1
  28. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/views.py +4 -4
  29. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/views_api.py +3 -3
  30. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/config.py +2 -2
  31. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/urls.py +1 -1
  32. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/view_sdof.py +1 -1
  33. {irie-0.0.0 → irie-0.0.1}/src/irie/core/settings.py +9 -9
  34. {irie-0.0.0 → irie-0.0.1}/src/irie/core/urls.py +8 -8
  35. irie-0.0.1/src/irie/init/__main__.py +27 -0
  36. irie-0.0.1/src/irie/init/bridges.py +1098 -0
  37. irie-0.0.1/src/irie/init/calid.py +34 -0
  38. irie-0.0.1/src/irie/init/getCGSData.py +104 -0
  39. irie-0.0.1/src/irie/init/getCGSevents.py +16 -0
  40. irie-0.0.1/src/irie/init/getNBIData.py +201 -0
  41. irie-0.0.1/src/irie/init/init_assets.py +172 -0
  42. irie-0.0.1/src/irie/init/init_corridors.py +39 -0
  43. irie-0.0.1/src/irie/init/init_predictors.py +46 -0
  44. irie-0.0.1/src/irie/mgmt.py +24 -0
  45. {irie-0.0.0 → irie-0.0.1}/src/irie.egg-info/PKG-INFO +24 -5
  46. {irie-0.0.0 → irie-0.0.1}/src/irie.egg-info/SOURCES.txt +12 -48
  47. irie-0.0.1/src/irie.egg-info/requires.txt +23 -0
  48. irie-0.0.0/src/irie/apps/authentication/migrations/__init__.py +0 -1
  49. irie-0.0.0/src/irie/apps/evaluation/migrations/0001_initial.py +0 -25
  50. irie-0.0.0/src/irie/apps/evaluation/migrations/0002_remove_evaluation_cesmd.py +0 -17
  51. irie-0.0.0/src/irie/apps/evaluation/migrations/0003_evaluation_asset.py +0 -20
  52. irie-0.0.0/src/irie/apps/events/migrations/0001_initial.py +0 -27
  53. irie-0.0.0/src/irie/apps/events/migrations/0002_alter_event_id.py +0 -18
  54. irie-0.0.0/src/irie/apps/events/migrations/0003_event_cesmd.py +0 -19
  55. irie-0.0.0/src/irie/apps/events/migrations/0004_event_record_identifier.py +0 -19
  56. irie-0.0.0/src/irie/apps/events/migrations/0005_event_asset.py +0 -21
  57. irie-0.0.0/src/irie/apps/events/migrations/0006_alter_event_event_file.py +0 -18
  58. irie-0.0.0/src/irie/apps/inventory/migrations/0001_initial.py +0 -31
  59. irie-0.0.0/src/irie/apps/inventory/migrations/0002_assetevaluationmodel_cesmd.py +0 -19
  60. irie-0.0.0/src/irie/apps/inventory/migrations/0003_auto_20230520_2030.py +0 -23
  61. irie-0.0.0/src/irie/apps/inventory/migrations/0004_asset.py +0 -27
  62. irie-0.0.0/src/irie/apps/inventory/migrations/0005_auto_20230731_1802.py +0 -23
  63. irie-0.0.0/src/irie/apps/inventory/migrations/0006_auto_20230731_1816.py +0 -28
  64. irie-0.0.0/src/irie/apps/inventory/migrations/0007_auto_20230731_1827.py +0 -24
  65. irie-0.0.0/src/irie/apps/inventory/migrations/0008_asset_is_complete.py +0 -19
  66. irie-0.0.0/src/irie/apps/inventory/migrations/0009_auto_20230731_1842.py +0 -29
  67. irie-0.0.0/src/irie/apps/inventory/migrations/0010_auto_20230801_0025.py +0 -23
  68. irie-0.0.0/src/irie/apps/inventory/migrations/0011_alter_asset_cgs_data.py +0 -18
  69. irie-0.0.0/src/irie/apps/inventory/migrations/0012_corridor.py +0 -22
  70. irie-0.0.0/src/irie/apps/inventory/migrations/0013_alter_asset_cesmd.py +0 -18
  71. irie-0.0.0/src/irie/apps/inventory/migrations/0014_alter_asset_cesmd.py +0 -18
  72. irie-0.0.0/src/irie/apps/networks/migrations/0001_initial.py +0 -26
  73. irie-0.0.0/src/irie/apps/prediction/migrations/0001_initial.py +0 -32
  74. irie-0.0.0/src/irie/apps/prediction/migrations/0002_auto_20230731_1801.py +0 -27
  75. irie-0.0.0/src/irie/apps/prediction/migrations/0003_rename_assetevaluationmodel_evaluation.py +0 -18
  76. irie-0.0.0/src/irie/apps/prediction/migrations/0004_delete_evaluation.py +0 -16
  77. irie-0.0.0/src/irie/apps/prediction/migrations/0005_predictormodel_protocol.py +0 -18
  78. irie-0.0.0/src/irie/apps/prediction/migrations/0006_alter_predictormodel_protocol.py +0 -18
  79. irie-0.0.0/src/irie/apps/prediction/migrations/0007_predictormodel_active.py +0 -19
  80. irie-0.0.0/src/irie/apps/prediction/migrations/0008_predictormodel_description.py +0 -18
  81. irie-0.0.0/src/irie/apps/prediction/migrations/0009_predictormodel_entry_point.py +0 -19
  82. irie-0.0.0/src/irie/apps/prediction/migrations/0010_alter_predictormodel_entry_point.py +0 -18
  83. irie-0.0.0/src/irie/apps/prediction/migrations/0011_remove_predictormodel_entry_point.py +0 -17
  84. irie-0.0.0/src/irie/apps/prediction/migrations/0012_predictormodel_entry_point.py +0 -18
  85. irie-0.0.0/src/irie/apps/prediction/migrations/0013_predictormodel_metrics.py +0 -18
  86. irie-0.0.0/src/irie/apps/prediction/migrations/0014_auto_20240930_0004.py +0 -28
  87. irie-0.0.0/src/irie/apps/prediction/migrations/0015_alter_predictormodel_render_file.py +0 -18
  88. irie-0.0.0/src/irie/apps/prediction/migrations/__init__.py +0 -0
  89. irie-0.0.0/src/irie/apps/prediction/runners/opensees/__init__.py +0 -0
  90. irie-0.0.0/src/irie/apps/prediction/templatetags/__init__.py +0 -0
  91. irie-0.0.0/src/irie/apps/site/__init__.py +0 -0
  92. irie-0.0.0/src/irie/apps/site/migrations/__init__.py +0 -1
  93. irie-0.0.0/src/irie/apps/site/templatetags/__init__.py +0 -0
  94. irie-0.0.0/src/irie.egg-info/requires.txt +0 -4
  95. {irie-0.0.0 → irie-0.0.1}/setup.cfg +0 -0
  96. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/__init__.py +0 -0
  97. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/__init__.py +0 -0
  98. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/admin.py +0 -0
  99. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/config.py +0 -0
  100. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/forms.py +0 -0
  101. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/models.py +0 -0
  102. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/tests.py +0 -0
  103. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/urls.py +0 -0
  104. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/authentication/views.py +0 -0
  105. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/context_processors.py +0 -0
  106. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/documents/__init__.py +0 -0
  107. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/documents/documents.py +0 -0
  108. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/documents/tests.py +0 -0
  109. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/documents/views.py +0 -0
  110. {irie-0.0.0/src/irie/apps/documents/migrations → irie-0.0.1/src/irie/apps/evaluation}/__init__.py +0 -0
  111. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/evaluation/admin.py +0 -0
  112. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/evaluation/urls.py +0 -0
  113. {irie-0.0.0/src/irie/apps/evaluation → irie-0.0.1/src/irie/apps/events}/__init__.py +0 -0
  114. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/admin.py +0 -0
  115. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/tests.py +0 -0
  116. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/tests_events.py +0 -0
  117. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/events/urls.py +0 -0
  118. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/CESMD.py +0 -0
  119. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/__init__.py +0 -0
  120. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/admin.py +0 -0
  121. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/archive/arcGIS.py +0 -0
  122. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/calid.py +0 -0
  123. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/fields.py +0 -0
  124. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/tables.py +0 -0
  125. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/inventory/traffic.py +0 -0
  126. {irie-0.0.0/src/irie/apps/evaluation/migrations → irie-0.0.1/src/irie/apps/management}/__init__.py +0 -0
  127. {irie-0.0.0/src/irie/apps/events → irie-0.0.1/src/irie/apps/management/commands}/__init__.py +0 -0
  128. {irie-0.0.0/src/irie/apps/events/migrations → irie-0.0.1/src/irie/apps/networks}/__init__.py +0 -0
  129. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/networks/forms.py +0 -0
  130. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/networks/models.py +0 -0
  131. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/networks/tests.py +0 -0
  132. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/networks/views.py +0 -0
  133. {irie-0.0.0/src/irie/apps/inventory/migrations → irie-0.0.1/src/irie/apps/prediction}/__init__.py +0 -0
  134. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/admin.py +0 -0
  135. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/metrics.py +0 -0
  136. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/predictor.py +0 -0
  137. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/runners/__init__.py +0 -0
  138. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/runners/metrics.py +0 -0
  139. {irie-0.0.0/src/irie/apps/management → irie-0.0.1/src/irie/apps/prediction/runners/opensees}/__init__.py +0 -0
  140. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/runners/opensees/schemas/__init__.py +0 -0
  141. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/runners/utilities.py +0 -0
  142. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/runners/xmlutils.py +0 -0
  143. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/runners/zipped.py +0 -0
  144. {irie-0.0.0/src/irie/apps/management/commands → irie-0.0.1/src/irie/apps/prediction/templatetags}/__init__.py +0 -0
  145. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/templatetags/predictor.py +0 -0
  146. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/prediction/urls.py +0 -0
  147. {irie-0.0.0/src/irie/apps/networks → irie-0.0.1/src/irie/apps/site}/__init__.py +0 -0
  148. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/admin.py +0 -0
  149. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/models.py +0 -0
  150. {irie-0.0.0/src/irie/apps/networks/migrations → irie-0.0.1/src/irie/apps/site/templatetags}/__init__.py +0 -0
  151. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/templatetags/indexing.py +0 -0
  152. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/tests.py +0 -0
  153. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/view_utils.py +0 -0
  154. {irie-0.0.0 → irie-0.0.1}/src/irie/apps/site/views.py +0 -0
  155. {irie-0.0.0 → irie-0.0.1}/src/irie/core/__init__.py +0 -0
  156. {irie-0.0.0 → irie-0.0.1}/src/irie/core/asgi.py +0 -0
  157. {irie-0.0.0 → irie-0.0.1}/src/irie/core/wsgi.py +0 -0
  158. {irie-0.0.0/src/irie/apps/prediction → irie-0.0.1/src/irie/init}/__init__.py +0 -0
  159. {irie-0.0.0 → irie-0.0.1}/src/irie.egg-info/dependency_links.txt +0 -0
  160. {irie-0.0.0 → irie-0.0.1}/src/irie.egg-info/entry_points.txt +0 -0
  161. {irie-0.0.0 → irie-0.0.1}/src/irie.egg-info/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: irie
3
- Version: 0.0.0
4
- Summary: Finite element visualization with GPU support
3
+ Version: 0.0.1
4
+ Summary: Infrastructure Resilience Engine
5
5
  Author-email: wd <5018-006+wd@users.noreply.github.com>, ab <52-93467+ab@users.noreply.github.com>
6
6
  Project-URL: Repository, https://github.com/STAIRLab/irie
7
7
  Project-URL: Documentation, https://structures.live
@@ -31,11 +31,30 @@ Requires-Dist: opensees
31
31
  Requires-Dist: quakeio
32
32
  Requires-Dist: bottle
33
33
  Requires-Dist: openbim
34
+ Requires-Dist: Django==5.1.2
35
+ Requires-Dist: asgiref==3.8.1
36
+ Requires-Dist: autopep8
37
+ Requires-Dist: gunicorn==23.0.0
38
+ Requires-Dist: pytz==2021.3
39
+ Requires-Dist: sqlparse==0.5.1
40
+ Requires-Dist: toml>=0.10.2
41
+ Requires-Dist: whitenoise==5.3.0
42
+ Requires-Dist: crispy-bootstrap5
43
+ Requires-Dist: django-crispy-forms
44
+ Requires-Dist: django-environ==0.11.2
45
+ Requires-Dist: djangorestframework==3.15.2
46
+ Requires-Dist: djangorestframework-simplejwt==5.3.1
47
+ Requires-Dist: folium
48
+ Requires-Dist: pandas
49
+ Requires-Dist: numpy
50
+ Requires-Dist: orjson
51
+ Requires-Dist: jsonschema
52
+ Requires-Dist: dj-database-url==2.1.0
34
53
 
35
54
  <div align="center">
36
- <h2>BRACE2</h2>
37
- <h1>Health Monitoring Platform</h1>
38
- <h4>Mk III</h4>
55
+ <h2>irie</h2>
56
+ <font size="28"><i><b>i</b>nfrastructure <b>r</b>el<b>i</b>ability <b>e</b>ngine</i></font>
57
+ <h4>PEER</h4>
39
58
  </div>
40
59
 
41
60
  ### External Dependencies
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
- <h2>BRACE2</h2>
3
- <h1>Health Monitoring Platform</h1>
4
- <h4>Mk III</h4>
2
+ <h2>irie</h2>
3
+ <font size="28"><i><b>i</b>nfrastructure <b>r</b>el<b>i</b>ability <b>e</b>ngine</i></font>
4
+ <h4>PEER</h4>
5
5
  </div>
6
6
 
7
7
  ### External Dependencies
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "irie"
3
- version = "0.0.0"
3
+ version = "0.0.1"
4
4
  authors = [
5
5
  {name="wd", email="5018-006+wd@users.noreply.github.com"},
6
6
  {name="ab", email="52-93467+ab@users.noreply.github.com"}
7
7
  ]
8
- description="Finite element visualization with GPU support"
8
+ description="Infrastructure Resilience Engine"
9
9
 
10
10
  license = {file = ".github/LICENSE.txt"}
11
11
  readme = "README.md"
@@ -24,7 +24,26 @@ dependencies = [
24
24
  "opensees",
25
25
  "quakeio",
26
26
  "bottle",
27
- "openbim"
27
+ "openbim",
28
+ "Django==5.1.2",
29
+ "asgiref==3.8.1",
30
+ "autopep8",
31
+ "gunicorn==23.0.0",
32
+ "pytz==2021.3",
33
+ "sqlparse==0.5.1",
34
+ "toml>=0.10.2",
35
+ "whitenoise==5.3.0",
36
+ "crispy-bootstrap5 ",
37
+ "django-crispy-forms",
38
+ "django-environ==0.11.2",
39
+ "djangorestframework==3.15.2",
40
+ "djangorestframework-simplejwt==5.3.1",
41
+ "folium",
42
+ "pandas",
43
+ "numpy",
44
+ "orjson",
45
+ "jsonschema",
46
+ "dj-database-url==2.1.0"
28
47
  ]
29
48
 
30
49
  classifiers = [
@@ -9,7 +9,7 @@ import os
9
9
  import sys
10
10
 
11
11
  def main():
12
- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
12
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'irie.core.settings')
13
13
  try:
14
14
  from django.core.management import execute_from_command_line
15
15
  except ImportError as exc:
@@ -3,6 +3,6 @@ from django.apps import AppConfig
3
3
 
4
4
  class AppsConfig(AppConfig):
5
5
  default_auto_field = "django.db.models.BigAutoField"
6
- name = "apps"
7
- label = "apps"
6
+ name = "irie.apps"
7
+ label = "irie_apps"
8
8
 
@@ -3,5 +3,5 @@ from django.apps import AppConfig
3
3
 
4
4
  class DocumentsConfig(AppConfig):
5
5
  default_auto_field = "django.db.models.BigAutoField"
6
- name = 'apps.documents'
6
+ name = 'irie.apps.documents'
7
7
  label = 'documents'
@@ -1,6 +1,6 @@
1
1
  from django.urls import path
2
2
  from django.conf.urls.static import static
3
- from core import settings
3
+ from irie.core import settings
4
4
  from django.contrib.staticfiles.urls import staticfiles_urlpatterns
5
5
 
6
6
  from . import views
@@ -13,6 +13,6 @@ from django.apps import AppConfig
13
13
 
14
14
  class PredictionConfig(AppConfig):
15
15
  default_auto_field = 'django.db.models.BigAutoField'
16
- name = 'apps.evaluation'
17
- label = 'apps_evaluation'
16
+ name = "irie.apps.evaluation"
17
+ label = "irie_apps_evaluation"
18
18
 
@@ -13,8 +13,8 @@ import multiprocessing.dummy
13
13
  from collections import defaultdict
14
14
  from typing import List, Iterator, Tuple, Dict, Collection
15
15
 
16
- from apps.prediction.predictor import RunID
17
- from apps.prediction.metrics import HealthMetric, METRIC_CLASSES
16
+ from irie.apps.prediction.predictor import RunID
17
+ from irie.apps.prediction.metrics import HealthMetric, METRIC_CLASSES
18
18
 
19
19
  class LiveEvaluation:
20
20
  # TODO: Merge into models.Evaluation?
@@ -26,9 +26,9 @@ import json
26
26
  from collections import defaultdict
27
27
 
28
28
  import numpy as np
29
- from apps.events.models import Event
30
- from apps.site.view_utils import raise404
31
- from apps.inventory.models import Asset
29
+ from irie.apps.events.models import Event
30
+ from irie.apps.site.view_utils import raise404
31
+ from irie.apps.inventory.models import Asset
32
32
 
33
33
  def mkdd(asset, pid, key):
34
34
  evaluations = list(reversed(sorted(Evaluation.objects.filter(asset=asset),
@@ -14,8 +14,8 @@ import logging
14
14
  from threading import Thread
15
15
  from django.db import models
16
16
 
17
- from apps.events.models import Event
18
- from apps.inventory.models import Asset
17
+ from irie.apps.events.models import Event
18
+ from irie.apps.inventory.models import Asset
19
19
  from .daemon import LiveEvaluation
20
20
 
21
21
  class Evaluation(models.Model):
@@ -20,9 +20,9 @@ from rest_framework.decorators import api_view, permission_classes
20
20
  from rest_framework.permissions import IsAuthenticated
21
21
 
22
22
  from .models import Evaluation
23
- from apps.events.models import Event
24
- from apps.inventory import views as inventory
25
- from apps.inventory.models import Asset
23
+ from irie.apps.events.models import Event
24
+ from irie.apps.inventory import views as inventory
25
+ from irie.apps.inventory.models import Asset
26
26
 
27
27
  def _evals_and_events(asset):
28
28
  evals = Evaluation.objects.filter(asset_id=asset.id)
@@ -7,6 +7,6 @@ from django.apps import AppConfig
7
7
 
8
8
 
9
9
  class AppConfig(AppConfig):
10
- name = "apps.events"
11
- label= "apps_events"
10
+ name = "irie.apps.events"
11
+ label= "irie_apps_events"
12
12
 
@@ -15,7 +15,7 @@ from django.db.models.signals import post_delete, pre_save
15
15
  from django.dispatch import receiver
16
16
  from django.core.mail import send_mail
17
17
 
18
- from apps.inventory.models import Asset
18
+ from irie.apps.inventory.models import Asset
19
19
 
20
20
 
21
21
  class Event(models.Model):
@@ -5,8 +5,8 @@ from django.core.paginator import Paginator
5
5
  from django.http import HttpResponse
6
6
  from django.contrib.auth.decorators import login_required
7
7
 
8
- from apps.events.models import Event
9
- from apps.site.view_utils import raise404
8
+ from irie.apps.events.models import Event
9
+ from irie.apps.site.view_utils import raise404
10
10
 
11
11
 
12
12
  @login_required(login_url="/login/")
@@ -17,10 +17,10 @@ from rest_framework import status
17
17
  from rest_framework.permissions import IsAuthenticated
18
18
 
19
19
  from .models import Event
20
- from apps.inventory.models import Asset
21
- # from apps.evaluation.evaluation import (run_evaluation,
20
+ from irie.apps.inventory.models import Asset
21
+ # from irie.apps.evaluation.evaluation import (run_evaluation,
22
22
  # add_evaluation)
23
- from apps.evaluation.models import Evaluation
23
+ from irie.apps.evaluation.models import Evaluation
24
24
  import quakeio
25
25
 
26
26
 
@@ -8,5 +8,5 @@ from django.apps import AppConfig
8
8
 
9
9
  class InventoryConfig(AppConfig):
10
10
  default_auto_field = 'django.db.models.BigAutoField'
11
- name = 'apps.inventory'
11
+ name = "irie.apps.inventory"
12
12
  label = 'apps_inventory'
@@ -4,7 +4,7 @@
4
4
  #
5
5
  #===----------------------------------------------------------------------===#
6
6
  from django import forms
7
- from apps.inventory.models import Asset
7
+ from irie.apps.inventory.models import Asset
8
8
 
9
9
  class AssetForm(forms.ModelForm):
10
10
  class Meta:
@@ -44,8 +44,8 @@ class Asset(models.Model):
44
44
 
45
45
  @property
46
46
  def predictors(self): # ->Dict[str, Predictor]:
47
- from apps.prediction.predictor import PREDICTOR_TYPES
48
- from apps.prediction.models import PredictorModel
47
+ from irie.apps.prediction.predictor import PREDICTOR_TYPES
48
+ from irie.apps.prediction.models import PredictorModel
49
49
  return {
50
50
  p.name: PREDICTOR_TYPES[p.protocol](p)
51
51
  for p in PredictorModel.objects.filter(asset=self)
@@ -9,7 +9,7 @@
9
9
  #
10
10
  #----------------------------------------------------------------------------#
11
11
  from django.urls import path, re_path
12
- from apps.inventory import views
12
+ from irie.apps.inventory import views
13
13
 
14
14
  urlpatterns = [
15
15
  path("dashboard/", views.dashboard, name="dashboard"),
@@ -16,10 +16,10 @@ from django.http import HttpResponse
16
16
  from django.contrib.auth.decorators import login_required
17
17
  from django.core.exceptions import ObjectDoesNotExist
18
18
 
19
- from apps.events.models import Event
20
- from apps.site.view_utils import raise404
21
- from apps.inventory.models import Asset
22
- from apps.inventory.forms import AssetForm
19
+ from irie.apps.events.models import Event
20
+ from irie.apps.site.view_utils import raise404
21
+ from irie.apps.inventory.models import Asset
22
+ from irie.apps.inventory.forms import AssetForm
23
23
 
24
24
 
25
25
  @login_required(login_url="/login/")
@@ -32,7 +32,7 @@ def fetch_rendering(request):
32
32
  return HttpResponse(template.render({}, request))
33
33
 
34
34
 
35
- from apps.prediction.models import PredictorModel
35
+ from irie.apps.prediction.models import PredictorModel
36
36
  for p in PredictorModel.objects.filter(asset=asset):
37
37
  if p.protocol == "BRACE2_CLI_PREDICTOR_T4":
38
38
  return HttpResponse("html")
@@ -67,7 +67,7 @@ def _make_freq_plot(evaluation):
67
67
 
68
68
  @login_required(login_url="/login/")
69
69
  def asset_event_summary(request, cesmd, event):
70
- from apps.evaluation.models import Evaluation
70
+ from irie.apps.evaluation.models import Evaluation
71
71
 
72
72
  context = {}
73
73
  context["segment"] = "events"
@@ -122,8 +122,8 @@ def asset_event_summary(request, cesmd, event):
122
122
 
123
123
  @login_required(login_url="/login/")
124
124
  def dashboard(request):
125
- from apps.inventory.models import Asset
126
- from apps.evaluation.models import Evaluation
125
+ from irie.apps.inventory.models import Asset
126
+ from irie.apps.evaluation.models import Evaluation
127
127
 
128
128
  context = {}
129
129
  context["segment"] = "dashboard"
@@ -230,7 +230,7 @@ def _find_ssid(event_id=None, evaluation=None):
230
230
  system ID run. This generally looks like a list of dicts,
231
231
  each with fields "frequency", "damping", etc.
232
232
  """
233
- from apps.evaluation.models import Evaluation
233
+ from irie.apps.evaluation.models import Evaluation
234
234
 
235
235
  if evaluation is None:
236
236
  evaluation = Evaluation.objects.filter(event_id=int(event_id))
@@ -491,8 +491,8 @@ class AssetMap:
491
491
 
492
492
 
493
493
  def add_traffic(self):
494
- # from apps.inventory.traffic import TRAFFIC_LOW, TRAFFIC_MID, TRAFFIC_HIGH, TRAFFIC_ALL
495
- from apps.inventory.traffic import TRAFFIC_ALL
494
+ # from irie.apps.inventory.traffic import TRAFFIC_LOW, TRAFFIC_MID, TRAFFIC_HIGH, TRAFFIC_ALL
495
+ from irie.apps.inventory.traffic import TRAFFIC_ALL
496
496
  traffic = folium.FeatureGroup(name="Traffic")
497
497
  traffic.add_to(self._map)
498
498
 
@@ -2,4 +2,4 @@ from django.apps import AppConfig
2
2
 
3
3
  class NetworksConfig(AppConfig):
4
4
  default_auto_field = "django.db.models.BigAutoField"
5
- name = "apps.networks"
5
+ name = "irie.apps.networks"
@@ -13,7 +13,7 @@ from shapely.geometry import Point
13
13
  import folium
14
14
  from folium.plugins import TagFilterButton, Search
15
15
 
16
- from apps.inventory.models import Asset
16
+ from irie.apps.inventory.models import Asset
17
17
 
18
18
  cwd = Path(__file__).parent
19
19
 
@@ -10,9 +10,9 @@
10
10
  #
11
11
  #----------------------------------------------------------------------------#
12
12
  from django.urls import path
13
- from apps.networks import views
13
+ from irie.apps.networks import views
14
14
 
15
15
  urlpatterns = [
16
- path("networks/", views.network_maps, name="networks"),
17
- path("api/networks/", views.load_network_map, name='load_network_map'),
16
+ path("recovery/", views.network_maps, name="recovery"),
17
+ path("api/recovery/", views.load_network_map, name='load_recovery_map'),
18
18
  ]
@@ -7,6 +7,6 @@ from django.apps import AppConfig
7
7
 
8
8
  class PredictionConfig(AppConfig):
9
9
  default_auto_field = 'django.db.models.BigAutoField'
10
- name = 'apps.prediction'
10
+ name = 'irie.apps.prediction'
11
11
  label = 'apps_prediction'
12
12
 
@@ -4,7 +4,7 @@
4
4
  #
5
5
  #===----------------------------------------------------------------------===#
6
6
  from django import forms
7
- from apps.prediction.models import PredictorModel
7
+ from irie.apps.prediction.models import PredictorModel
8
8
 
9
9
 
10
10
  # class CsiForm(forms.Form):
@@ -5,7 +5,7 @@
5
5
  #===----------------------------------------------------------------------===#
6
6
  from django.db import models
7
7
 
8
- from apps.inventory.models import Asset
8
+ from irie.apps.inventory.models import Asset
9
9
 
10
10
  class PredictorModel(models.Model):
11
11
  # https://docs.djangoproject.com/en/4.2/ref/models/fields/
@@ -22,10 +22,10 @@ from django.shortcuts import render
22
22
  from rest_framework.decorators import api_view, permission_classes
23
23
  from rest_framework.permissions import IsAuthenticated
24
24
 
25
- from apps.site.view_utils import raise404
26
- from apps.inventory.models import Asset
27
- from apps.prediction.predictor import PREDICTOR_TYPES, OpenSeesRunner
28
- from apps.prediction.models import PredictorModel
25
+ from irie.apps.site.view_utils import raise404
26
+ from irie.apps.inventory.models import Asset
27
+ from irie.apps.prediction.predictor import PREDICTOR_TYPES, OpenSeesRunner
28
+ from irie.apps.prediction.models import PredictorModel
29
29
  from .forms import PredictorForm
30
30
 
31
31
  @login_required(login_url="/login/")
@@ -24,10 +24,10 @@ from rest_framework import status
24
24
  from rest_framework.permissions import IsAuthenticated
25
25
 
26
26
  from .models import Event
27
- from apps.inventory.models import Asset
28
- # from apps.evaluation.evaluation import (run_evaluation,
27
+ from irie.apps.inventory.models import Asset
28
+ # from irie.apps.evaluation.evaluation import (run_evaluation,
29
29
  # add_evaluation)
30
- from apps.evaluation.models import Evaluation
30
+ from irie.apps.evaluation.models import Evaluation
31
31
  import quakeio
32
32
 
33
33
 
@@ -2,5 +2,5 @@ from django.apps import AppConfig
2
2
 
3
3
 
4
4
  class MyConfig(AppConfig):
5
- name = "apps.site"
6
- label = "apps_site"
5
+ name = "irie.apps.site"
6
+ label = "irie_site"
@@ -1,5 +1,5 @@
1
1
  from django.urls import path, re_path
2
- from apps.site import views, view_sdof
2
+ from irie.apps.site import views, view_sdof
3
3
 
4
4
  urlpatterns = [
5
5
  path("", views.index, name="home"),
@@ -9,7 +9,7 @@ from django.urls import reverse
9
9
 
10
10
  import quakeio
11
11
 
12
- from apps.events.models import Event
12
+ from irie.apps.events.models import Event
13
13
 
14
14
 
15
15
  @login_required(login_url="/login/")
@@ -54,13 +54,13 @@ INSTALLED_APPS = [
54
54
  "django.contrib.messages",
55
55
  "django.contrib.staticfiles",
56
56
  "rest_framework",
57
- "apps.site",
58
- "apps.events",
59
- "apps.inventory",
60
- "apps.prediction",
61
- "apps.evaluation",
62
- "apps.networks",
63
- "apps.documents", # TODO
57
+ "irie.apps.site",
58
+ "irie.apps.events",
59
+ "irie.apps.inventory",
60
+ "irie.apps.prediction",
61
+ "irie.apps.evaluation",
62
+ # "irie.apps.networks",
63
+ "irie.apps.documents", # TODO
64
64
  "crispy_forms",
65
65
  "crispy_bootstrap5",
66
66
 
@@ -81,7 +81,7 @@ MIDDLEWARE = [
81
81
  "django.middleware.clickjacking.XFrameOptionsMiddleware",
82
82
  ]
83
83
 
84
- ROOT_URLCONF = "core.urls"
84
+ ROOT_URLCONF = "irie.core.urls"
85
85
  LOGIN_REDIRECT_URL = "home" # Route defined in site/urls.py
86
86
  LOGOUT_REDIRECT_URL = "home" # Route defined in site/urls.py
87
87
  TEMPLATE_DIR = os.path.join(CORE_DIR, "apps/templates") # ROOT dir for templates
@@ -103,7 +103,7 @@ TEMPLATES = [
103
103
  },
104
104
  ]
105
105
 
106
- WSGI_APPLICATION = "core.wsgi.application"
106
+ WSGI_APPLICATION = "irie.core.wsgi.application"
107
107
 
108
108
  # Database
109
109
  # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
@@ -19,21 +19,21 @@ urlpatterns = [
19
19
  path('admin/', admin.site.urls),
20
20
 
21
21
  # Authentication routes
22
- path("", include("apps.authentication.urls")),
22
+ path("", include("irie.apps.authentication.urls")),
23
23
 
24
24
  # Application routes
25
- path("", include("apps.events.urls")),
25
+ path("", include("irie.apps.events.urls")),
26
26
 
27
- path("", include("apps.evaluation.urls")),
27
+ path("", include("irie.apps.evaluation.urls")),
28
28
 
29
- path("", include("apps.prediction.urls")),
29
+ path("", include("irie.apps.prediction.urls")),
30
30
 
31
- path("", include("apps.inventory.urls")),
31
+ path("", include("irie.apps.inventory.urls")),
32
32
 
33
- path("", include("apps.networks.urls")),
33
+ # path("", include("irie.apps.recovery.urls")),
34
34
 
35
- path("", include("apps.documents.urls")),
35
+ path("", include("irie.apps.documents.urls")),
36
36
 
37
37
  # Leave `site.urls` as last the last line
38
- path("", include("apps.site.urls"))
38
+ path("", include("irie.apps.site.urls"))
39
39
  ]
@@ -0,0 +1,27 @@
1
+ import os
2
+ import sys
3
+ import pathlib
4
+ import subprocess
5
+
6
+ from django.core.management import execute_from_command_line
7
+
8
+ cd = pathlib.Path(__file__).parents[0]
9
+
10
+ def init(settings):
11
+
12
+ print("MIGRATING")
13
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings)
14
+ execute_from_command_line([
15
+ "__irie__",
16
+ "migrate"
17
+ ])
18
+
19
+
20
+ with open(cd/"init_assets.py", "r") as f:
21
+ result = subprocess.run([
22
+ sys.executable, "-mirie.mgmt", "shell"
23
+ ], stdin=f, capture_output=True, text=True)
24
+
25
+ if __name__ == "__main__":
26
+ init(sys.argv[1])
27
+