igs-slm 0.1.5b1__py3-none-any.whl → 0.1.5b3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: igs-slm
3
- Version: 0.1.5b1
3
+ Version: 0.1.5b3
4
4
  Summary: IGS Site Log Manager
5
5
  Project-URL: Homepage, https://igs-slm.readthedocs.io
6
6
  Project-URL: Documentation, https://igs-slm.readthedocs.io
@@ -64,6 +64,10 @@ Requires-Dist: python-dateutil<3.0.0,>=2.8.2
64
64
  Requires-Dist: requests<3.0.0,>=2.32.4
65
65
  Requires-Dist: rich<14.0.0,>=13.7.1
66
66
  Requires-Dist: tqdm<5.0.0,>=4.64.1
67
+ Provides-Extra: debug
68
+ Requires-Dist: django-debug-toolbar<5.0.0,>=4.1.0; extra == 'debug'
69
+ Requires-Dist: django-extensions<4.0.0,>=3.1.5; extra == 'debug'
70
+ Requires-Dist: ipdb<1.0.0,>=0.13.13; extra == 'debug'
67
71
  Provides-Extra: gunicorn
68
72
  Requires-Dist: gunicorn>=22.0.0; extra == 'gunicorn'
69
73
  Description-Content-Type: text/markdown
@@ -6,7 +6,7 @@ igs_tools/defines/__init__.py,sha256=iQyg6SLcDT1KMtK6XToUdCUqmSZnPKY1ztjdOcaKEB0
6
6
  igs_tools/defines/constellation.py,sha256=Di0QX83YqACChVrxReKeQcjsQxY5G5bdp1e5iDeefNM,560
7
7
  igs_tools/defines/data_center.py,sha256=gLoUebE90C4OeyvEqCx-1RY2C0Nq9N9rchPc7V--lqk,2895
8
8
  igs_tools/defines/rinex.py,sha256=hHJzuqO5VZbroK6wznTxX0CEGB-WZea4S4F-lpJXKYc,1824
9
- slm/__init__.py,sha256=sIjjNQPVqNENTodNNqil0h4aBrU_6oCP6-iFnketW4g,995
9
+ slm/__init__.py,sha256=1OEgEnADtqOVb6ajbORJmrlo12i6V_Hwm7Fgk0nASBQ,995
10
10
  slm/admin.py,sha256=0sjfsluuf2dCAHodplLw9SlBHiVYEZFU64kBz1b8uM4,19537
11
11
  slm/apps.py,sha256=Tf3FBaYkjH57bqdh0r0KBFitsKl3aJe_uQE9iZNmOzc,11949
12
12
  slm/authentication.py,sha256=pdckO48ApGTwbaHLJsc2IswSs8qM9W3BLVU8XkSAa4E,7141
@@ -14,7 +14,7 @@ slm/context.py,sha256=qZ7a9AA3cissQg7nIAa6MbTyEgL0_NCS5_b8bLXe9rs,107
14
14
  slm/forms.py,sha256=I56ZNv4Cw-rvclYSjGCuZRqK2Jp1fWVPHRwCw0YshT4,37038
15
15
  slm/manage.py,sha256=ITSajblGje31dnhLlPTLHvTvyuBIu9EYFoa5lTg1dxc,678
16
16
  slm/middleware.py,sha256=fctCyOtky4m-1tYY7dTlCOh20tWkXnrFEU4lyR2vEOg,920
17
- slm/signals.py,sha256=ya7IeNFHYu3bdb4gIKODS6nG0qTfxbwn3YyRy24VYUk,8408
17
+ slm/signals.py,sha256=_ilOAsO9gIaZJWItgb3N6_Mw-34-jYjsnMbffKxZU0I,8439
18
18
  slm/singleton.py,sha256=FJTory_zsFWHnPFJs8vn5AFq8dE4R6jQmTkATZ56zM4,1172
19
19
  slm/urls.py,sha256=ebuDpFro064poFAfp-IMULgy3AlIo-_UIj76oCBkG1I,5462
20
20
  slm/utils.py,sha256=JkciytJYKJttYm07iwl947CB7Ru_8E88dA8cML8GH7Y,9042
@@ -259,11 +259,11 @@ slm/settings/emails.py,sha256=gSLlOEwOfYiDb_oTp7QiLYxiSQvWqTNhP_H1AtUSdPo,1447
259
259
  slm/settings/internationalization.py,sha256=OfySI8I21FUY29EfTNspwfZVQeYDtRzbo-RAK6Uipfw,549
260
260
  slm/settings/logging.py,sha256=hGe8K7gCUqxZFNuLnwUlNyfF0F3Sl3rFGg8DGlGp5-Y,4230
261
261
  slm/settings/rest.py,sha256=DFkT8d6yx7TfQteNnCjj7WrCD8XzVMNPm8nxj-Gb2Wo,787
262
- slm/settings/root.py,sha256=xFjQvGxIGvCP185GuL1sF-wlEZoWBcnhhc08wuy9J7o,6961
262
+ slm/settings/root.py,sha256=jx5S01BM3SGFzRuaV83nEBAY0zCjU2wp-SZCm7_DvZM,6973
263
263
  slm/settings/routines.py,sha256=5cNDxf_SGNb0h1MgiYRqdy6JbTUVyQMGdW6Mi4zR0FY,1670
264
264
  slm/settings/secrets.py,sha256=4X5RJyYD0iOuaZ_YMdSvWxwVSGgWoXpzX9lgHldPZ3M,830
265
265
  slm/settings/security.py,sha256=yO8pbNCAAvVdJfT4mbtdA8KVsmWG5FvP6REUhnSm2IE,249
266
- slm/settings/slm.py,sha256=s6dCctDwJ1litTDZZPnLhytYf9LexOGJDA1SJOzpH3Y,6693
266
+ slm/settings/slm.py,sha256=j4226EkPLpgRdRcgJW-eaPP5Cu6xhoixZyXAsLsW0pE,6891
267
267
  slm/settings/static_templates.py,sha256=99xqZqyGxXT04r_nSoL5eVvt14vIQ7wZQxJzjZsmaZk,1403
268
268
  slm/settings/templates.py,sha256=_uIXxD7Z7p7_n_wafz_rnDiKOcp1ybvkaifE4FsEd5Y,1132
269
269
  slm/settings/uploads.py,sha256=ly-GMoY5_m4Vz9mzvLnGzbwVfk0AaU9l8f6X6xMY6AE,1031
@@ -459,9 +459,9 @@ slm/templates/slm/widgets/log_scroll.html,sha256=4uiXXdppjugwpmpDEz3cXN7xceBAqE4
459
459
  slm/templates/slm/widgets/stationlist.html,sha256=MzbGy2po3TQ6Cx12OEagwaU5dZ5IKYYNDc0gs8eeifY,9171
460
460
  slm/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
461
461
  slm/templatetags/jinja2.py,sha256=ye8Q5EVv1ATBCwkVi3UPrgRWj5a4VAI2s72pJnAftx4,222
462
- slm/templatetags/slm.py,sha256=NN05wg1gyhMVuMucNF67O3M_178BKJzg-ax3Ub16Enk,14232
463
- igs_slm-0.1.5b1.dist-info/METADATA,sha256=Hpul6ndQlsIzfhIloNJq62ran23TESRMF8pUadRsYzA,7542
464
- igs_slm-0.1.5b1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
465
- igs_slm-0.1.5b1.dist-info/entry_points.txt,sha256=Oq_ZZdzACnQ8vhZJn8q6_8VuYJNLqkfCW5HvqMg6JTs,84
466
- igs_slm-0.1.5b1.dist-info/licenses/LICENSE,sha256=lrSWvh1Y0-xYCepGM5jimWArZ7iqaRvMV1UuPuq5mq8,1092
467
- igs_slm-0.1.5b1.dist-info/RECORD,,
462
+ slm/templatetags/slm.py,sha256=yZHFBwJ0m1OOsNjjbIXFrtQmn8eJ8aXAxziXPWCFzAs,14234
463
+ igs_slm-0.1.5b3.dist-info/METADATA,sha256=NrdWIB8k35xevvTW_KY5_x1V7xjv3TX5rCJdZwFaLG8,7751
464
+ igs_slm-0.1.5b3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
465
+ igs_slm-0.1.5b3.dist-info/entry_points.txt,sha256=Oq_ZZdzACnQ8vhZJn8q6_8VuYJNLqkfCW5HvqMg6JTs,84
466
+ igs_slm-0.1.5b3.dist-info/licenses/LICENSE,sha256=lrSWvh1Y0-xYCepGM5jimWArZ7iqaRvMV1UuPuq5mq8,1092
467
+ igs_slm-0.1.5b3.dist-info/RECORD,,
slm/__init__.py CHANGED
@@ -15,7 +15,7 @@ r"""
15
15
 
16
16
  """
17
17
 
18
- VERSION = (0, 1, "5b1")
18
+ VERSION = (0, 1, "5b3")
19
19
 
20
20
  __title__ = "IGS/Site Log Manager"
21
21
  __version__ = ".".join(str(i) for i in VERSION)
slm/settings/root.py CHANGED
@@ -242,5 +242,5 @@ set_default(
242
242
  )
243
243
 
244
244
  WSGI_APPLICATION = env(
245
- "WSGI_APPLICATION", default=get_setting("WSGI_APPLICATION", "slm.wsgi")
245
+ "WSGI_APPLICATION", default=get_setting("WSGI_APPLICATION", "slm.wsgi.application")
246
246
  )
slm/settings/slm.py CHANGED
@@ -186,15 +186,18 @@ set_default(
186
186
  # instance than the instance that generates serialized artifacts
187
187
  SLM_FILE_DOMAIN = None
188
188
 
189
-
190
- set_default("SLM_STATION_NAME_REGEX", None)
191
- set_default("SLM_STATION_NAME_HELP", _("The name of the station."))
192
-
193
- # IGS Settings:
194
- # SLM_STATION_NAME_REGEX = r"[\w]{4}[\d]{2}[\w]{3}"
195
- # SLM_STATION_NAME_HELP = _(
196
- # "This is the 9 Character station name (XXXXMRCCC) used in RINEX 3 "
197
- # "filenames Format: (XXXX - existing four character IGS station "
198
- # "name, M - Monument or marker number (0-9), R - Receiver number "
199
- # "(0-9), CCC - Three digit ISO 3166-1 country code)"
200
- # )
189
+ SLM_IGS_STATION_NAMING = env(
190
+ "SLM_IGS_STATION_NAMING", default=get_setting("SLM_IGS_STATION_NAMING", False)
191
+ )
192
+ if SLM_IGS_STATION_NAMING:
193
+ # Use IGS naming rules for station names:
194
+ SLM_STATION_NAME_REGEX = r"[\w]{4}[\d]{2}[\w]{3}"
195
+ SLM_STATION_NAME_HELP = _(
196
+ "This is the 9 Character station name (XXXXMRCCC) used in RINEX 3 "
197
+ "filenames Format: (XXXX - existing four character IGS station "
198
+ "name, M - Monument or marker number (0-9), R - Receiver number "
199
+ "(0-9), CCC - Three digit ISO 3166-1 country code)"
200
+ )
201
+ else:
202
+ set_default("SLM_STATION_NAME_REGEX", None)
203
+ set_default("SLM_STATION_NAME_HELP", _("The name of the station."))
slm/signals.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """
2
- All SLM specific signals sent by the system are defined here. These signals
3
- mostly include events relating to the site log edit/moderate/publish life cycle.
2
+ All SLM specific :doc:`django:topics/signals` sent by the system are defined here.
3
+ These signals mostly include events relating to the site log edit/moderate/publish life
4
+ cycle.
4
5
 
5
6
  All signals contain a request object that holds the request that initiated the
6
7
  event. This object is provided mostly for logging purposes and is not
@@ -12,6 +13,7 @@ import sys
12
13
  from django.dispatch import Signal
13
14
  from django.utils.module_loading import import_string
14
15
 
16
+ site_proposed = Signal()
15
17
  """
16
18
  Signal sent when a new site is proposed.
17
19
 
@@ -24,8 +26,9 @@ Signal sent when a new site is proposed.
24
26
  responsible agencies.
25
27
  :param kwargs: Misc other key word arguments
26
28
  """
27
- site_proposed = Signal()
28
29
 
30
+
31
+ site_published = Signal()
29
32
  """
30
33
  Sent when a site log is published, or when a section of a site log is
31
34
  published.
@@ -39,8 +42,9 @@ published.
39
42
  section was published this will be the Section object instance.
40
43
  :param kwargs: Misc other key word arguments
41
44
  """
42
- site_published = Signal()
43
45
 
46
+
47
+ site_status_changed = Signal()
44
48
  """
45
49
  Sent when a site log is published, or when a section of a site log is
46
50
  published. Its possible that both the previous and new status states are
@@ -54,8 +58,9 @@ The published timestamp will have increased.
54
58
  :param reverted: If true this status change was the result of a reversion
55
59
  :param kwargs: Misc other key word arguments
56
60
  """
57
- site_status_changed = Signal()
58
61
 
62
+
63
+ section_edited = Signal()
59
64
  """
60
65
  Sent when a site log section is edited.
61
66
 
@@ -68,8 +73,9 @@ Sent when a site log section is edited.
68
73
  :param fields: The list of edited fields
69
74
  :param kwargs: Misc other key word arguments
70
75
  """
71
- section_edited = Signal()
72
76
 
77
+
78
+ section_added = Signal()
73
79
  """
74
80
  Sent when a site log section is added.
75
81
 
@@ -81,8 +87,9 @@ Sent when a site log section is added.
81
87
  :param section: The section object that was added.
82
88
  :param kwargs: Misc other key word arguments
83
89
  """
84
- section_added = Signal()
85
90
 
91
+
92
+ section_deleted = Signal()
86
93
  """
87
94
  Sent when a site log section is deleted.
88
95
 
@@ -94,8 +101,9 @@ Sent when a site log section is deleted.
94
101
  :param section: The section object that was deleted.
95
102
  :param kwargs: Misc other key word arguments
96
103
  """
97
- section_deleted = Signal()
98
104
 
105
+
106
+ fields_flagged = Signal()
99
107
  """
100
108
  Sent when a site log section has fields flagged.
101
109
 
@@ -109,8 +117,9 @@ Sent when a site log section has fields flagged.
109
117
  :param fields: The list of fields that were flagged.
110
118
  :param kwargs: Misc other key word arguments
111
119
  """
112
- fields_flagged = Signal()
113
120
 
121
+
122
+ flags_cleared = Signal()
114
123
  """
115
124
  Sent when a site log section has fields flagged.
116
125
 
@@ -126,8 +135,9 @@ Sent when a site log section has fields flagged.
126
135
  :param clear: True if the section has no remaining flags - false otherwise.
127
136
  :param kwargs: Misc other key word arguments
128
137
  """
129
- flags_cleared = Signal()
130
138
 
139
+
140
+ site_file_uploaded = Signal()
131
141
  """
132
142
  Sent when a user uploads a site log.
133
143
 
@@ -139,8 +149,9 @@ Sent when a user uploads a site log.
139
149
  :param upload: The uploaded file (SiteFileUpload).
140
150
  :param kwargs: Misc other key word arguments
141
151
  """
142
- site_file_uploaded = Signal()
143
152
 
153
+
154
+ site_file_published = Signal()
144
155
  """
145
156
  Sent when a moderator publishes a site file upload - could be an attachment or
146
157
  an image.
@@ -153,9 +164,9 @@ an image.
153
164
  :param upload: The uploaded file (SiteFileUpload).
154
165
  :param kwargs: Misc other key word arguments
155
166
  """
156
- site_file_published = Signal()
157
167
 
158
168
 
169
+ site_file_unpublished = Signal()
159
170
  """
160
171
  Sent when a moderator retracts a site file upload - could be an attachment
161
172
  or an image.
@@ -168,9 +179,9 @@ or an image.
168
179
  :param upload: The uploaded file (SiteFileUpload).
169
180
  :param kwargs: Misc other key word arguments
170
181
  """
171
- site_file_unpublished = Signal()
172
182
 
173
183
 
184
+ site_file_deleted = Signal()
174
185
  """
175
186
  Sent when a user deletes a site file upload through the API. The file must be
176
187
  a type other than a site log - could be an attachment or an image.
@@ -183,9 +194,9 @@ a type other than a site log - could be an attachment or an image.
183
194
  :param upload: The uploaded file (SiteFileUpload).
184
195
  :param kwargs: Misc other key word arguments
185
196
  """
186
- site_file_deleted = Signal()
187
197
 
188
198
 
199
+ review_requested = Signal()
189
200
  """
190
201
  Sent when a user requests a site log be reviewed and published by moderators.
191
202
 
@@ -195,8 +206,8 @@ Sent when a user requests a site log be reviewed and published by moderators.
195
206
  :param request: The Django request object that contained the request.
196
207
  :param kwargs: Misc other key word arguments
197
208
  """
198
- review_requested = Signal()
199
209
 
210
+ updates_rejected = Signal()
200
211
  """
201
212
  Sent when a moderator rejects edits requested for publish in a review request.
202
213
 
@@ -206,8 +217,9 @@ Sent when a moderator rejects edits requested for publish in a review request.
206
217
  :param request: The Django request object that contained the rejection.
207
218
  :param kwargs: Misc other key word arguments
208
219
  """
209
- updates_rejected = Signal()
210
220
 
221
+
222
+ alert_issued = Signal()
211
223
  """
212
224
  Sent when an alert is issued.
213
225
 
@@ -215,8 +227,9 @@ Sent when an alert is issued.
215
227
  :param alert: The alert object that was issued.
216
228
  :param kwargs: Misc other key word arguments
217
229
  """
218
- alert_issued = Signal()
219
230
 
231
+
232
+ alert_cleared = Signal()
220
233
  """
221
234
  Sent when an alert is cleared.
222
235
 
@@ -224,8 +237,6 @@ Sent when an alert is cleared.
224
237
  :param alert: The alert object that was issued.
225
238
  :param kwargs: Misc other key word arguments
226
239
  """
227
- alert_cleared = Signal()
228
-
229
240
 
230
241
  _signal_names_ = {
231
242
  value: f"slm.signals.{key}"
slm/templatetags/slm.py CHANGED
@@ -254,11 +254,11 @@ def file_icon(file):
254
254
  @register.filter(name="file_lines")
255
255
  def file_lines(file):
256
256
  if isinstance(file, str):
257
- return file.split("\n")
257
+ return file.splitlines()
258
258
  if file and os.path.exists(file.file.path):
259
259
  content = file.file.open().read()
260
260
  try:
261
- return content.decode(detect(content).get("encoding", "utf-8")).split("\n")
261
+ return content.decode(detect(content).get("encoding", "utf-8")).splitlines()
262
262
  except (UnicodeDecodeError, LookupError, ValueError):
263
263
  return [
264
264
  _("** Unable to determine text encoding - please upload as UTF-8. **")