igs-slm 0.1.0b0__py3-none-any.whl → 0.1.1b0__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
  MIT License
2
2
 
3
- Copyright (c) 2022 NASA/Jet Propulsion Laboratory
3
+ Copyright (c) 2022-2024 NASA/Jet Propulsion Laboratory
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: igs-slm
3
- Version: 0.1.0b0
3
+ Version: 0.1.1b0
4
4
  Summary: IGS Site Log Manager
5
5
  Home-page: https://igs-slm.readthedocs.io
6
6
  License: MIT
@@ -41,7 +41,7 @@ Requires-Dist: django-enum (>=1.2.2,<2.0.0)
41
41
  Requires-Dist: django-filter (>=24.2,<25.0)
42
42
  Requires-Dist: django-ipware (>=7.0.1,<8.0.0)
43
43
  Requires-Dist: django-polymorphic (>=3.1.0,<4.0.0)
44
- Requires-Dist: django-render-static (>=3.1.0,<4.0.0)
44
+ Requires-Dist: django-render-static (>=3.1.1,<4.0.0)
45
45
  Requires-Dist: django-routines (>=1.1.3,<2.0.0)
46
46
  Requires-Dist: django-split-settings (>=1.2.0,<2.0.0)
47
47
  Requires-Dist: django-typer (>=2.1.2,<3.0.0)
@@ -55,7 +55,7 @@ Requires-Dist: lxml (>=5.2.1,<6.0.0)
55
55
  Requires-Dist: numpy (<=1.24) ; python_version <= "3.8"
56
56
  Requires-Dist: numpy (>=1.26) ; python_version > "3.8"
57
57
  Requires-Dist: polyline (>=2.0.0,<3.0.0)
58
- Requires-Dist: psycopg[binary] (>=3.1.12,<4.0.0)
58
+ Requires-Dist: psycopg[binary] (==3.1.18)
59
59
  Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
60
60
  Requires-Dist: requests (>=2.32.3,<3.0.0)
61
61
  Requires-Dist: rich (>=13.7.1,<14.0.0)
@@ -6,7 +6,7 @@ igs_tools/defines/data_center.py,sha256=gLoUebE90C4OeyvEqCx-1RY2C0Nq9N9rchPc7V--
6
6
  igs_tools/defines/rinex.py,sha256=hHJzuqO5VZbroK6wznTxX0CEGB-WZea4S4F-lpJXKYc,1824
7
7
  igs_tools/directory.py,sha256=rEnKArO__FEotwSuMWbCEqGzKl2DKsFntci-te87kJ0,7731
8
8
  igs_tools/utils.py,sha256=cXQYRFQkmhsUuqr06Kd87bfArGJmeeWRDvm-tmGt7C4,1665
9
- slm/__init__.py,sha256=lB0-nS5jIGechlvHtfSoSFmfuSdXCQyaHrgdx3CrF2o,931
9
+ slm/__init__.py,sha256=12vHPVCMpi9N49tv3UYLEDwjqrbo7FvfVs1WLBYwMnU,934
10
10
  slm/admin.py,sha256=h3gME2h0AViimLHORLHa2KElEiophmI1UM5D4IM-9F0,18699
11
11
  slm/api/edit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  slm/api/edit/serializers.py,sha256=epxqI-LUNokPwrakanqXpjN5cpRgdDV_hXJSFJ-7ikc,9467
@@ -23,7 +23,7 @@ slm/api/views.py,sha256=cxw1OdXPDkX9O6ZUs3ocmjTOXf5Y2bhX6ctp9QqyKtY,4709
23
23
  slm/apps.py,sha256=XOWT8LcEWFsgnhGZZ6prF35n5HpQMuT6DUsb6ycWeQ8,11344
24
24
  slm/authentication.py,sha256=88Ufg5gmV9vQd5pHv_Dns9I_iK3qaokzpaWvoQ25Jew,7083
25
25
  slm/bin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- slm/bin/startproject.py,sha256=5liVuja0LRtMzo_mGAT1UGQtThr1MdAU9Pvp8h4t4xc,7735
26
+ slm/bin/startproject.py,sha256=s7KzB8S6Dp1oq6ei6e3-0-tEoc5R-DW6XYoXkL_xr4Y,7772
27
27
  slm/bin/templates/{{ project_dir }}/pyproject.toml,sha256=BFnrdPxbRAdQ7kD2w-oWJ1t28SldAOpX4hrUAuJmTOI,695
28
28
  slm/bin/templates/{{ project_dir }}/sites/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  slm/bin/templates/{{ project_dir }}/sites/{{ site }}/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -97,12 +97,12 @@ slm/jinja2/slm/sitelog/xsd/geodesyml_0.4.xml,sha256=iZSLS7g4bZrQas8NqdxBojm_AJPQ
97
97
  slm/jinja2/slm/sitelog/xsd/geodesyml_0.5.xml,sha256=ATBT771QYP8F-lSk5aYypKZRu5z2yvoHRJkyeXGYUks,5872
98
98
  slm/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
99
99
  slm/management/commands/__init__.py,sha256=2rXtF09XsScbEG8zepmPga5B4XuytNKOTkNxIIdHRGI,1773
100
- slm/management/commands/build_index.py,sha256=qltzgLENoEco9kv8Djh3kjeDdG2jiQkIjxeIefln2x8,3361
101
- slm/management/commands/generate_sinex.py,sha256=EzjbR82fcCH5RjEcY_jF9kEP1zM2v94_5kBW0wEnALA,25283
102
- slm/management/commands/head_from_index.py,sha256=LhfdcLWJDwSOZ9dHdjn8-VGaiD6UPOYWt9Q8uJ1eFaE,20909
103
- slm/management/commands/import_archive.py,sha256=moa3BJW_rrBxDuh2XyfDnJ4U0UXOlJs8hlUMvv8t41A,34493
104
- slm/management/commands/import_equipment.py,sha256=Gh5k015Vt_GyeoI5SKT820CdRcjzNUI6z7SJ_Rck7-k,12729
105
- slm/management/commands/set_site.py,sha256=qrtacmVb45vmp57vhMHxbJgVr0807aW9diA9q15uMEk,1912
100
+ slm/management/commands/build_index.py,sha256=Ppl-DNDI8zqr0oiJXhSp8PFVE7_Aeoi5o4ZXAHkl6_0,3358
101
+ slm/management/commands/generate_sinex.py,sha256=PJBaQpLxd0LkWlVEMg4T8Yj7ksMDbIXWXFUAUoRIaGo,25282
102
+ slm/management/commands/head_from_index.py,sha256=kLgKwfCqL0a4C6oiF_NuAX65tmg6fuwK0205zKORBDE,20910
103
+ slm/management/commands/import_archive.py,sha256=wyiE7TdRVxWx6nd2rh6oLs-FTiChfFA8qaHhuJn25wQ,34448
104
+ slm/management/commands/import_equipment.py,sha256=DKEtYBm01P5bXYiNLy6YkRyw0o6cuxgrS5KBawYlYqE,12830
105
+ slm/management/commands/set_site.py,sha256=AfNmGgbuO5wszlYvoPFksje82qXL0sts89-j_epkkAs,1908
106
106
  slm/management/commands/sitelog.py,sha256=W5VLDURzKCK8Ii9H8A7GVjZkj_kwnmdlft6KMW4hX68,4814
107
107
  slm/management/commands/synchronize.py,sha256=2hViS6SnvAy9ZKlbm3X-XvkzFAGY7uPXckp1cpdc3_0,1914
108
108
  slm/management/commands/update_data_availability.py,sha256=odmnjOzXxnkHcDwJjuHuNohKyR66JbqyjV2Nli67HlM,5948
@@ -236,7 +236,7 @@ slm/settings/platform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
236
236
  slm/settings/platform/darwin.py,sha256=N2yIWPUAO-ThmCvqlob6jfO2KpRUPwZpq1Xeoi1WkpE,404
237
237
  slm/settings/rest.py,sha256=u_befPdSmx2XL2-GDpE0m_kPUfWrf5vEIcEyZQSohvs,668
238
238
  slm/settings/root.py,sha256=O2dCUf0CN1lJatqvWT0bEUmtMBYCBM4mMVdQdb-Ke_c,4336
239
- slm/settings/routines.py,sha256=XfD3geWO5JpFquZ4Eyc6h-y5dV7EqNpHncab3vCKFpU,1500
239
+ slm/settings/routines.py,sha256=7tkXHQ7vC7BkJh-H5yHrKDyEPwCXrU1Ui7YkmFnSWgU,1499
240
240
  slm/settings/secrets.py,sha256=21ZGH3SKfsnO4VrfP4f1MJ2ZHdqHzgi5Uwu0xcjLias,826
241
241
  slm/settings/security.py,sha256=Xf8oo-z19CjCWuzOHlHldpx_MbyR8_3Fd0-9jdRnCpU,141
242
242
  slm/settings/slm.py,sha256=WF0mA6WY8xrZ0YGehgbSl87RL1zgKA7dhKxqKBXvX5w,6452
@@ -440,8 +440,8 @@ slm/utils.py,sha256=_okGmjwfuLIkt2UoBLzUvbqaIw0QwhRhMU3Kd2t1X40,8755
440
440
  slm/validators.py,sha256=SI3nYXCcZNwm1dil86VHIjlSDIoNtWhNbwd5mqzdhNE,10081
441
441
  slm/views.py,sha256=qrflIax5nW9BZsmKCT0x536yiptbLxS4A8IofYr-qI8,24179
442
442
  slm/widgets.py,sha256=X8FA_SiORQlBH0-7ZhSDpNwmraD9baSqtY2mDq3TCms,4470
443
- igs_slm-0.1.0b0.dist-info/LICENSE,sha256=zgV9nV1KPjaxgK2h6-3n87og6mk0a4_xU1TtoCcLJYs,1087
444
- igs_slm-0.1.0b0.dist-info/METADATA,sha256=mCKxUITDcdLOlUPUkhcaputFefPf2D4B1a1vTPP109Q,9542
445
- igs_slm-0.1.0b0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
446
- igs_slm-0.1.0b0.dist-info/entry_points.txt,sha256=XlkUn_fGLyKyZlIHmVUzfsGeNmoV-k8w5YPk1sct9_Q,61
447
- igs_slm-0.1.0b0.dist-info/RECORD,,
443
+ igs_slm-0.1.1b0.dist-info/LICENSE,sha256=Ule7W0M1rD6VzE1jyyits_LrhKJowCQ0fsWFgdG2oQc,1092
444
+ igs_slm-0.1.1b0.dist-info/METADATA,sha256=B4vIoaV3Qxbg75JixePbEvsWkw3b5GR9_A6hOl-9ahQ,9535
445
+ igs_slm-0.1.1b0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
446
+ igs_slm-0.1.1b0.dist-info/entry_points.txt,sha256=XlkUn_fGLyKyZlIHmVUzfsGeNmoV-k8w5YPk1sct9_Q,61
447
+ igs_slm-0.1.1b0.dist-info/RECORD,,
slm/__init__.py CHANGED
@@ -12,7 +12,7 @@ r"""
12
12
  '----------------' '----------------' '----------------'
13
13
  """
14
14
 
15
- VERSION = (0, 3, 0)
15
+ VERSION = (0, 1, "1b")
16
16
 
17
17
  __title__ = "IGS/Site Log Manager"
18
18
  __version__ = ".".join(str(i) for i in VERSION)
slm/bin/startproject.py CHANGED
@@ -82,7 +82,7 @@ def main(
82
82
  str,
83
83
  Option(
84
84
  prompt="What is the name of your organization?",
85
- help="What is the name of your organization?"
85
+ help="What is the name of your organization?",
86
86
  ),
87
87
  ] = "",
88
88
  project_dir: Annotated[
@@ -135,7 +135,7 @@ def main(
135
135
  prompt="Use IGS sitelog validation defaults?",
136
136
  help="Use IGS sitelog validation defaults?",
137
137
  ),
138
- ] = False
138
+ ] = False,
139
139
  ):
140
140
  netloc = (urlparse(netloc).netloc or netloc).lower()
141
141
  parts = netloc.split(".")
@@ -146,7 +146,10 @@ def main(
146
146
  subdomain = parts[0]
147
147
  domain = parts[1]
148
148
  else:
149
- secho("Unable to interpret network location: {netloc}".format(netloc=netloc), fg="red")
149
+ secho(
150
+ "Unable to interpret network location: {netloc}".format(netloc=netloc),
151
+ fg="red",
152
+ )
150
153
  sys.exit(1)
151
154
 
152
155
  if extension_app == "slm":
@@ -12,15 +12,16 @@ log files of the specified formats.
12
12
  """
13
13
 
14
14
  import typing as t
15
+
15
16
  from django.db import transaction
16
17
  from django.utils.translation import gettext as _
17
- from django_typer.management import TyperCommand
18
18
  from django_typer.completers import these_strings
19
+ from django_typer.management import TyperCommand
19
20
  from tqdm import tqdm
20
21
  from typer import Option
21
22
  from typing_extensions import Annotated
22
23
 
23
- from slm.defines import SiteLogStatus, SiteLogFormat
24
+ from slm.defines import SiteLogFormat, SiteLogStatus
24
25
  from slm.models import ArchiveIndex, Site
25
26
 
26
27
 
@@ -36,7 +37,7 @@ class Command(TyperCommand):
36
37
  "pythonpath",
37
38
  "settings",
38
39
  }
39
-
40
+
40
41
  formats: t.List[t.Union[str, SiteLogFormat]] = list(
41
42
  set([fmt.ext for fmt in SiteLogFormat])
42
43
  )
@@ -1,5 +1,5 @@
1
1
  """
2
- Generates a SINEX_ file from the current published database state.
2
+ Generates a SINEX_ file from the current published database state.
3
3
 
4
4
  The default antex file used is https://files.igs.org/pub/station/general/igs20.atx.gz
5
5
  """
@@ -4,7 +4,7 @@ If your site log file index is more current than the database state
4
4
  from the most recent indexed files into the database.
5
5
 
6
6
  .. tip::
7
-
7
+
8
8
  By default, rich HTML logs of the import process will be written to:
9
9
 
10
10
  ``settings.LOG_DIR / head_from_index.TIMESTAMP``
@@ -23,8 +23,8 @@ from dataclasses import dataclass
23
23
  from datetime import datetime
24
24
  from pathlib import Path
25
25
 
26
- from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist
27
26
  from django.conf import settings
27
+ from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist
28
28
  from django.db import DatabaseError, models, transaction
29
29
  from django.template.loader import render_to_string
30
30
  from django.utils.translation import gettext as _
@@ -185,7 +185,7 @@ class Command(TyperCommand):
185
185
  self.logs = Path(
186
186
  str(logs).format(
187
187
  LOG_DIR=getattr(settings, "LOG_DIR", "./"),
188
- TIMESTAMP=datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
188
+ TIMESTAMP=datetime.now().strftime("%Y-%m-%d_%H-%M-%S"),
189
189
  )
190
190
  )
191
191
  self.verbosity = verbosity
@@ -239,8 +239,8 @@ class Command(TyperCommand):
239
239
  defaults={
240
240
  "level": AlertLevel.ERROR,
241
241
  "header": _("Import from index failed."),
242
- "detail": record.failed
243
- }
242
+ "detail": record.failed,
243
+ },
244
244
  )
245
245
  except Exception as err:
246
246
  if self.traceback:
@@ -256,8 +256,8 @@ class Command(TyperCommand):
256
256
  defaults={
257
257
  "level": AlertLevel.ERROR,
258
258
  "header": _("Import from index failed."),
259
- "detail": record.failed
260
- }
259
+ "detail": record.failed,
260
+ },
261
261
  )
262
262
  p_bar.update(n=1)
263
263
 
@@ -10,7 +10,7 @@ This command will perform #1 and optionally call :ref:`command_head_from_index`
10
10
  imported stations to also perform #2.
11
11
 
12
12
  .. tip::
13
-
13
+
14
14
  Rich HTML logs of the import process will be written to:
15
15
 
16
16
  ``settings.LOG_DIR / import_archive.TIMESTAMP``
@@ -19,7 +19,7 @@ Logs will be parsed and errors reported, but parsing errors will not prevent log
19
19
  being indexed.
20
20
 
21
21
  .. warning::
22
-
22
+
23
23
  If timestamps cannot be determined for files they will not be indexed
24
24
  because each entry in the file index requires a begin and end time.
25
25
  """
@@ -35,9 +35,9 @@ from pathlib import Path
35
35
 
36
36
  from dateutil.parser import ParserError
37
37
  from dateutil.parser import parse as parse_datetime
38
+ from django.conf import settings
38
39
  from django.core.files.base import ContentFile
39
40
  from django.core.management import CommandError
40
- from django.conf import settings
41
41
  from django.db import transaction
42
42
  from django.template.loader import render_to_string
43
43
  from django.utils.timezone import is_naive, make_aware
@@ -353,9 +353,7 @@ class Command(TyperCommand):
353
353
  logs: Annotated[
354
354
  Path,
355
355
  Option(
356
- help=_(
357
- "Write parser logs to this directory."
358
- ),
356
+ help=_("Write parser logs to this directory."),
359
357
  shell_complete=complete_directory,
360
358
  ),
361
359
  ] = logs,
@@ -397,7 +395,7 @@ class Command(TyperCommand):
397
395
  self.logs = Path(
398
396
  str(logs).format(
399
397
  LOG_DIR=getattr(settings, "LOG_DIR", "./"),
400
- TIMESTAMP=datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
398
+ TIMESTAMP=datetime.now().strftime("%Y-%m-%d_%H-%M-%S"),
401
399
  )
402
400
  )
403
401
  self.formats = [SiteLogFormat(fmt) for fmt in formats]
@@ -42,12 +42,12 @@ class Command(TyperCommand, rich_markup_mode="markdown", chain=True):
42
42
  "equipment encodings used by IGS, see: "
43
43
  "https://files.igs.org/pub/station/general/rcvr_ant.tab"
44
44
  )
45
-
45
+
46
46
  suppressed_base_arguments = {
47
47
  *TyperCommand.suppressed_base_arguments,
48
48
  "version",
49
49
  "pythonpath",
50
- "settings"
50
+ "settings",
51
51
  }
52
52
 
53
53
  remove: bool = False
@@ -169,12 +169,13 @@ class Command(TyperCommand, rich_markup_mode="markdown", chain=True):
169
169
  if created:
170
170
  self.manufacturers_added.add(manufacturer)
171
171
 
172
- self.secho(_(
173
- "Added {added} manufacturers from {sources}."
174
- ).format(
175
- added=len(self.manufacturers_added),
176
- sources=sources[0] if len(sources) == 1 else sources
177
- ), fg="green")
172
+ self.secho(
173
+ _("Added {added} manufacturers from {sources}.").format(
174
+ added=len(self.manufacturers_added),
175
+ sources=sources[0] if len(sources) == 1 else sources,
176
+ ),
177
+ fg="green",
178
+ )
178
179
 
179
180
  if self.remove:
180
181
  to_delete = Manufacturer.objects.filter(
@@ -221,12 +222,13 @@ class Command(TyperCommand, rich_markup_mode="markdown", chain=True):
221
222
  if created:
222
223
  self.antennas_added.add(antenna)
223
224
 
224
- self.secho(_(
225
- "Added {added} antennas from {sources}."
226
- ).format(
227
- added=len(self.antennas_added),
228
- sources=sources[0] if len(sources) == 1 else sources
229
- ), fg="green")
225
+ self.secho(
226
+ _("Added {added} antennas from {sources}.").format(
227
+ added=len(self.antennas_added),
228
+ sources=sources[0] if len(sources) == 1 else sources,
229
+ ),
230
+ fg="green",
231
+ )
230
232
 
231
233
  for ant, replaced in replacements.items():
232
234
  ant.replaced.set(Antenna.objects.filter(model__in=replaced))
@@ -276,12 +278,13 @@ class Command(TyperCommand, rich_markup_mode="markdown", chain=True):
276
278
  if created:
277
279
  self.receivers_added.add(receiver)
278
280
 
279
- self.secho(_(
280
- "Added {added} receivers from {sources}."
281
- ).format(
282
- added=len(self.receivers_added),
283
- sources=sources[0] if len(sources) == 1 else sources
284
- ), fg="green")
281
+ self.secho(
282
+ _("Added {added} receivers from {sources}.").format(
283
+ added=len(self.receivers_added),
284
+ sources=sources[0] if len(sources) == 1 else sources,
285
+ ),
286
+ fg="green",
287
+ )
285
288
 
286
289
  for ant, replaced in replacements.items():
287
290
  ant.replaced.set(Receiver.objects.filter(model__in=replaced))
@@ -331,12 +334,13 @@ class Command(TyperCommand, rich_markup_mode="markdown", chain=True):
331
334
  if created:
332
335
  self.radomes_added.add(radome)
333
336
 
334
- self.secho(_(
335
- "Added {added} radomes from {sources}."
336
- ).format(
337
- added=len(self.radomes_added),
338
- sources=sources[0] if len(sources) == 1 else sources
339
- ), fg="green")
337
+ self.secho(
338
+ _("Added {added} radomes from {sources}.").format(
339
+ added=len(self.radomes_added),
340
+ sources=sources[0] if len(sources) == 1 else sources,
341
+ ),
342
+ fg="green",
343
+ )
340
344
 
341
345
  for ant, replaced in replacements.items():
342
346
  ant.replaced.set(Radome.objects.filter(model__in=replaced))
@@ -8,7 +8,7 @@ from SLM specific settings:
8
8
  * SLM_ORG_NAME
9
9
 
10
10
  .. note::
11
-
11
+
12
12
  The sites framework is typically used to support serving multiple domains off the same
13
13
  software stack. In our experience it is usually preferable to serve separate domains
14
14
  off customized software stacks because their requirements may differ substantially.
slm/settings/routines.py CHANGED
@@ -1,7 +1,6 @@
1
1
  from django.utils.translation import gettext_lazy as _
2
2
  from django_routines import command, routine
3
3
 
4
-
5
4
  routine(
6
5
  "deploy",
7
6
  _(