igs-slm 0.1.4b0__py3-none-any.whl → 0.1.5b1__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.
Files changed (151) hide show
  1. igs_slm-0.1.5b1.dist-info/METADATA +115 -0
  2. {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info}/RECORD +193 -173
  3. {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info}/WHEEL +1 -1
  4. igs_slm-0.1.5b1.dist-info/entry_points.txt +3 -0
  5. {igs_slm-0.1.4b0.dist-info → igs_slm-0.1.5b1.dist-info/licenses}/LICENSE +1 -1
  6. slm/__init__.py +17 -14
  7. slm/admin.py +32 -5
  8. slm/api/edit/views.py +22 -9
  9. slm/api/public/views.py +9 -7
  10. slm/api/views.py +45 -6
  11. slm/apps.py +28 -6
  12. slm/authentication.py +3 -2
  13. slm/bin/startproject.py +102 -31
  14. slm/bin/templates/{{ project_dir }}/pyproject.toml +30 -21
  15. slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/base.py +12 -1
  16. slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/__init__.py +5 -27
  17. slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/__init__.py +6 -27
  18. slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/urls.py +15 -0
  19. slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/validation.py +29 -0
  20. slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/urls.py +1 -0
  21. slm/context.py +5 -0
  22. slm/defines/AlertLevel.py +10 -2
  23. slm/defines/AntennaCalibration.py +6 -4
  24. slm/defines/AntennaFeatures.py +12 -9
  25. slm/defines/AntennaReferencePoint.py +12 -10
  26. slm/defines/Aspiration.py +4 -2
  27. slm/defines/CardinalDirection.py +6 -4
  28. slm/defines/CollocationStatus.py +3 -1
  29. slm/defines/EquipmentState.py +6 -12
  30. slm/defines/FlagSeverity.py +4 -2
  31. slm/defines/FractureSpacing.py +7 -5
  32. slm/defines/FrequencyStandardType.py +6 -4
  33. slm/defines/GeodesyMLVersion.py +2 -0
  34. slm/defines/Instrumentation.py +9 -7
  35. slm/defines/LogEntryType.py +17 -15
  36. slm/defines/SLMFileType.py +4 -2
  37. slm/defines/SiteFileUploadStatus.py +7 -24
  38. slm/defines/SiteLogFormat.py +8 -32
  39. slm/defines/SiteLogStatus.py +9 -28
  40. slm/defines/TectonicPlates.py +18 -16
  41. slm/manage.py +24 -0
  42. slm/management/commands/check_upgrade.py +142 -0
  43. slm/management/commands/generate_sinex.py +110 -92
  44. slm/management/commands/head_from_index.py +11 -8
  45. slm/management/commands/import_archive.py +27 -18
  46. slm/management/commands/import_equipment.py +1 -1
  47. slm/management/commands/sitelog.py +1 -3
  48. slm/management/commands/synchronize.py +1 -1
  49. slm/management/commands/validate_db.py +6 -4
  50. slm/map/defines.py +18 -14
  51. slm/map/templates/slm/map.html +5 -7
  52. slm/migrations/0001_remove_archiveindex_no_overlapping_ranges_per_site_and_more.py +26 -0
  53. slm/migrations/0002_alter_archivedsitelog_file_and_more.py +44 -0
  54. slm/migrations/0003_alter_archivedsitelog_name_and_more.py +35 -0
  55. slm/migrations/0004_alter_site_name.py +24 -0
  56. slm/migrations/0005_slmversion.py +30 -0
  57. slm/migrations/0017_alter_logentry_unique_together_and_more.py +3 -1
  58. slm/migrations/0018_afix_deleted.py +3 -1
  59. slm/migrations/0018_alter_siteantenna_options_and_more.py +87 -56
  60. slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +1 -1
  61. slm/migrations/0023_archivedsitelog_gml_version_and_more.py +1 -1
  62. slm/migrations/0031_alter_antenna_features.py +44 -0
  63. slm/migrations/0032_archiveindex_valid_range_and_more.py +84 -0
  64. slm/migrations/add_index_order_index.py +54 -0
  65. slm/migrations/normalize_index.py +147 -0
  66. slm/migrations/simplify_index.py +48 -0
  67. slm/migrations/verify_index.py +67 -0
  68. slm/models/__init__.py +2 -0
  69. slm/models/alerts.py +7 -10
  70. slm/models/data.py +1 -2
  71. slm/models/equipment.py +1 -1
  72. slm/models/fields.py +41 -0
  73. slm/models/index.py +183 -53
  74. slm/models/sitelog.py +35 -38
  75. slm/models/system.py +72 -31
  76. slm/models/user.py +1 -1
  77. slm/parsing/__init__.py +33 -16
  78. slm/parsing/legacy/binding.py +65 -34
  79. slm/parsing/legacy/parser.py +2 -2
  80. slm/parsing/xsd/binding.py +1 -1
  81. slm/parsing/xsd/parser.py +1 -2
  82. slm/receivers/__init__.py +2 -2
  83. slm/receivers/index.py +2 -1
  84. slm/receivers/migration.py +21 -0
  85. slm/settings/__init__.py +192 -4
  86. slm/settings/assets.py +26 -0
  87. slm/settings/auth.py +18 -14
  88. slm/settings/ckeditor.py +12 -6
  89. slm/settings/debug.py +2 -2
  90. slm/settings/emails.py +50 -0
  91. slm/settings/internationalization.py +8 -6
  92. slm/settings/logging.py +100 -88
  93. slm/settings/platform/darwin.py +16 -6
  94. slm/settings/rest.py +20 -15
  95. slm/settings/root.py +192 -98
  96. slm/settings/routines.py +5 -1
  97. slm/settings/secrets.py +20 -31
  98. slm/settings/security.py +7 -5
  99. slm/settings/slm.py +35 -23
  100. slm/settings/static_templates.py +12 -9
  101. slm/settings/templates.py +31 -25
  102. slm/settings/uploads.py +33 -5
  103. slm/settings/urls.py +7 -12
  104. slm/settings/validation.py +165 -165
  105. slm/signals.py +3 -2
  106. slm/static/slm/css/style.css +37 -36
  107. slm/static/slm/js/autocomplete.js +6 -4
  108. slm/static/slm/js/enums.js +6 -5
  109. slm/static/slm/js/file_modal.js +62 -0
  110. slm/static/slm/js/form.js +3 -3
  111. slm/static/slm/js/formWidget.js +3 -3
  112. slm/static/slm/js/persistable.js +5 -1
  113. slm/templates/admin/base.html +1 -0
  114. slm/templates/rest_framework/base.html +23 -11
  115. slm/templates/slm/base.html +27 -22
  116. slm/templates/slm/forms/widgets/auto_complete.html +12 -11
  117. slm/templates/slm/forms/widgets/auto_complete_multiple.html +8 -7
  118. slm/templates/slm/station/download.html +6 -6
  119. slm/templates/slm/station/edit.html +9 -17
  120. slm/templates/slm/station/review.html +5 -3
  121. slm/templates/slm/station/upload.html +4 -1
  122. slm/templates/slm/station/uploads/legacy.html +1 -1
  123. slm/templates/slm/widgets/alert_scroll.html +4 -8
  124. slm/templates/slm/widgets/filelist.html +0 -5
  125. slm/templates/slm/widgets/log_scroll.html +2 -13
  126. slm/templates/slm/widgets/stationlist.html +2 -8
  127. slm/templatetags/slm.py +70 -9
  128. slm/utils.py +13 -4
  129. slm/validators.py +14 -14
  130. slm/views.py +6 -6
  131. slm/wsgi.py +16 -0
  132. igs_slm-0.1.4b0.dist-info/METADATA +0 -154
  133. igs_slm-0.1.4b0.dist-info/entry_points.txt +0 -3
  134. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/urls.py +0 -7
  135. slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +0 -11
  136. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/__init__.py +0 -0
  137. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/__init__.py +0 -0
  138. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/local.py +0 -0
  139. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/wsgi.py +0 -0
  140. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/manage.py +0 -0
  141. /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/wsgi.py +0 -0
  142. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/__init__.py +0 -0
  143. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/admin.py +0 -0
  144. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/apps.py +0 -0
  145. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/__init__.py +0 -0
  146. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/__init__.py +0 -0
  147. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/import_archive.py +0 -0
  148. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/migrations/__init__.py +0 -0
  149. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/models.py +0 -0
  150. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/templates/slm/base.html +0 -0
  151. /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/views.py +0 -0
@@ -1,35 +1,44 @@
1
- [tool.poetry]
1
+ [project]
2
2
  name = "{{ package_name }}"
3
3
  version = "0.1.0"
4
4
  description = ""
5
+ requires-python = ">=3.8,<4.0"
5
6
  authors = []
6
-
7
- packages = [
8
- { include = "{{ extension_app }}" },
9
- { include = "sites" },
7
+ dependencies = [
8
+ "igs-slm>={{ slm_version }},<{{ slm_version_next_major }}",
10
9
  ]
11
10
 
12
- exclude = ["**/test"]
11
+ [tool.uv]
12
+ package = true
13
+
14
+ {% if local_slm %}
15
+ [tool.uv.sources]
16
+ igs-slm = { path = "{{ local_slm }}", editable = true }
17
+ {% endif %}
18
+
13
19
 
14
- [tool.poetry.scripts]
20
+ [project.scripts]
15
21
  {{ site }} = "sites.{{ site }}.manage:main"
16
22
 
17
- [tool.poetry.dependencies]
18
- python = "^3.8"
23
+ [tool.hatch.build.targets.wheel]
24
+ packages = [
25
+ "src/sites",
26
+ "src/{{ extension_app }}"
27
+ ]
19
28
  {% if local_slm %}
20
- igs-slm = { path = "{{ local_slm }}", develop = true }
21
- #igs-slm = "^{{ slm_version }}"
22
- {% else %}
23
- igs-slm = "^{{ slm_version }}"
29
+ [tool.hatch.metadata]
30
+ allow-direct-references = true
24
31
  {% endif %}
25
32
 
26
- [tool.poetry.group.dev.dependencies]
27
- django-extensions = "^3.1.5"
28
- ipython = "^8.12.2"
29
- ipdb = "^0.12"
30
- django-debug-toolbar = "^4.0.0"
31
-
33
+ [dependency-groups]
34
+ dev = [
35
+ "django-extensions>=3.0,<5.0",
36
+ "django-debug-toolbar>=4.4.6",
37
+ "ipython==8.12.3",
38
+ "ipdb>=0.13.13,<1.0.0",
39
+ ]
32
40
 
33
41
  [build-system]
34
- requires = ["poetry-core>=1.0.0"]
35
- build-backend = "poetry.core.masonry.api"
42
+ requires = ["hatchling"]
43
+ build-backend = "hatchling.build"
44
+
@@ -2,12 +2,23 @@ from split_settings.tools import include, optional
2
2
  from slm.settings import resource, set_default, get_setting
3
3
 
4
4
  set_default("SLM_ORG_NAME", "{{ organization }}")
5
+
6
+ SLM_DATABASE = "{{ database }}"
7
+
8
+ {% if not include_map %}
9
+ SLM_ADMIN_MAP = False
10
+ {% endif %}
11
+
12
+ {% if not use_igs_validation %}
13
+ SLM_IGS_VALIDATION = False
14
+ {% endif %}
15
+
5
16
  include(resource("slm.settings", "root.py"))
6
17
  include(optional('./validation.py'))
7
18
 
19
+
8
20
  INSTALLED_APPS = [
9
21
  "{{ extension_app }}",
10
- {% if not include_map %}# {% endif %}"slm.map",
11
22
  *get_setting("INSTALLED_APPS", [])
12
23
  ]
13
24
 
@@ -10,15 +10,12 @@ from split_settings.tools import (
10
10
  from slm.settings import set_default
11
11
  from pathlib import Path
12
12
 
13
- SITE_DIR = Path(__file__).resolve().parent
14
- BASE_DIR = SITE_DIR
15
-
16
- ALLOWED_HOSTS = ['localhost', '127.0.0.1']
13
+ BASE_DIR = Path(__file__).resolve().parent
17
14
 
18
15
  DEBUG = True
19
- DJANGO_DEBUG_TOOLBAR = True
16
+ SLM_DEBUG_TOOLBAR = True
20
17
 
21
- include('../base.py')
18
+ WSGI_APPLICATION = "sites.{{ site }}.develop.wsgi.application"
22
19
 
23
20
  set_default("SILENCED_SYSTEM_CHECKS", []).extend([
24
21
  "security.W004",
@@ -26,31 +23,12 @@ set_default("SILENCED_SYSTEM_CHECKS", []).extend([
26
23
  "security.W018"
27
24
  ])
28
25
 
26
+ include('../base.py')
27
+
29
28
  # Special configuration parameters for your local development instance should be
30
29
  # placed here:
31
30
  include(optional('local.py'))
32
31
 
33
- set_default(
34
- 'DATABASES',
35
- {
36
- 'default': {
37
- 'ENGINE': 'django.contrib.gis.db.backends.postgis',
38
- 'NAME': '{{ site }}',
39
- 'USER': 'postgres',
40
- 'PASSWORD': '',
41
- 'ATOMIC_REQUESTS': True,
42
- }
43
- }
44
- )
45
-
46
- WSGI_APPLICATION = "sites.{{ site }}.develop.wsgi.application"
47
-
48
- CACHES = {
49
- 'default': {
50
- 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'
51
- }
52
- }
53
-
54
32
  INSTALLED_APPS.insert(1, 'django_extensions')
55
33
 
56
34
  SECURE_SSL_REDIRECT = False
@@ -1,12 +1,10 @@
1
1
  from split_settings.tools import include
2
2
  from pathlib import Path
3
- import getpass
4
3
 
5
4
  WSGI_APPLICATION = "sites.{{ site }}.production.wsgi.application"
6
5
 
7
6
  DEBUG = False
8
- SITE_DIR = Path("{{ production_dir }}")
9
- BASE_DIR = SITE_DIR
7
+ BASE_DIR = Path("{{ production_dir }}")
10
8
 
11
9
  ALLOWED_HOSTS = [
12
10
  '{{ netloc }}',
@@ -15,27 +13,6 @@ ALLOWED_HOSTS = [
15
13
  ]
16
14
  SLM_SITE_NAME = '{{ netloc }}'
17
15
 
18
-
19
- MEDIA_ROOT = SITE_DIR / 'media'
20
- STATIC_ROOT = SITE_DIR / 'static'
21
-
22
-
23
- # This section deals with database connection. Alterations may need to be made for
24
- # deployment. We recommend running a database locally and using postgres user
25
- # authentication and disallowing any non-local connections. This means your database
26
- # is as secure as the system user running your SLM deployment.
27
- #
28
- # You may of course, use any number of database settings or have multiple databases:
29
- # https://docs.djangoproject.com/en/stable/ref/databases/
30
- DATABASES = {
31
- 'default': {
32
- 'ENGINE': 'django.contrib.gis.db.backends.postgis',
33
- 'NAME': '{{ site }}',
34
- 'USER': getpass.getuser(), # if postgres is configured for user authentication
35
- 'ATOMIC_REQUESTS': True
36
- },
37
- }
38
-
39
16
  # The SLM uses geodjango. Unless gdal and geos are in standard locations on your production
40
17
  # server you will have to set their paths explicitly here:
41
18
  # https://docs.djangoproject.com/en/stable/ref/contrib/gis/install/geolibs/
@@ -44,9 +21,7 @@ DATABASES = {
44
21
  # GEOS_LIBRARY_PATH = '/path/to/libgeos_c.so.1'
45
22
 
46
23
  # Make sure debug toolbar is not run in production - it can expose secrets!
47
- DJANGO_DEBUG_TOOLBAR = False
48
-
49
- include('../base.py')
24
+ SLM_DEBUG_TOOLBAR = False
50
25
 
51
26
  # ADMINS will receive email notifications when exceptions are encountered or 500 errors
52
27
  # returned to user requests
@@ -59,3 +34,7 @@ ADMINS = [
59
34
  # For example, IGS's SLM is running on https://slm.igs.org but our public facing downloads
60
35
  # are from https://network.igs.org
61
36
  # SLM_FILE_DOMAIN = 'https://{{ netloc }}'
37
+
38
+ include('../base.py')
39
+
40
+
@@ -0,0 +1,15 @@
1
+ """
2
+ You can make direct modifications to the URLs built by the slm here if needed.
3
+
4
+ Your extension app will already be included at the root path because it sets:
5
+
6
+ SLM_INCLUDE = True.
7
+ """
8
+
9
+ from slm.settings.urls import urlpatterns
10
+ from django.urls import path, include
11
+
12
+
13
+ urlpatterns.extend([
14
+ # add other app URLs here
15
+ ])
@@ -0,0 +1,29 @@
1
+ from slm.settings import get_setting
2
+ {% if use_igs_validation %}
3
+
4
+ SLM_DATA_VALIDATORS = get_setting("SLM_DATA_VALIDATORS")
5
+
6
+ # You have elected to use the IGS site log validators, you may make modifications
7
+ # to the configured validators by making changes to SLM_DATA_VALIDATORS above.
8
+
9
+ {% else %}
10
+ # You selected to not use the IGS sitelog field validators by default, you may
11
+ # define your own validation configuration here. See slm.settings.validation
12
+ # module (https://github.com/International-GNSS-Service/SLM/blob/master/slm/settings/validation.py)
13
+ # for what the default settings are and documentation here (TODO) for the SLM's pluggable
14
+ # validation system.
15
+ SLM_DATA_VALIDATORS = get_setting("SLM_DATA_VALIDATORS", {})
16
+
17
+ SLM_REQUIRED_SECTIONS_TO_PUBLISH = [
18
+ "siteform",
19
+ "siteidentification",
20
+ "sitelocation",
21
+ "sitereceiver",
22
+ "siteantenna",
23
+ "siteoperationalcontact"
24
+ ]
25
+
26
+ SLM_VALIDATION_BYPASS_BLOCK = False
27
+ {% endif %}
28
+
29
+ # You may delete this file if you do not need to make any modifications
@@ -6,5 +6,6 @@ from django.urls import path
6
6
 
7
7
  app_name = "{{ extension_app }}"
8
8
 
9
+ SLM_INCLUDE = True
9
10
 
10
11
  urlpatterns = []
slm/context.py ADDED
@@ -0,0 +1,5 @@
1
+ from slm import __version__ as slm_version
2
+
3
+
4
+ def globals(request):
5
+ return {"slm_version": slm_version}
slm/defines/AlertLevel.py CHANGED
@@ -6,19 +6,27 @@ from enum_properties import s
6
6
  class AlertLevel(IntegerChoices):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- NOTICE = 1, _("NOTICE")
9
+ # fmt: off
10
+ NOTICE = 1, _("NOTICE")
10
11
  WARNING = 2, _("WARNING")
11
- ERROR = 3, _("ERROR")
12
+ ERROR = 3, _("ERROR")
13
+ # fmt: on
12
14
 
13
15
  def __str__(self):
14
16
  return str(self.label)
15
17
 
16
18
  @property
17
19
  def css(self):
20
+ """
21
+ The clss class to use for this level.
22
+ """
18
23
  return f"slm-alert-{self.name.lower()}"
19
24
 
20
25
  @property
21
26
  def color(self):
27
+ """
28
+ The hex code of the color to use for this level.
29
+ """
22
30
  from django.conf import settings
23
31
 
24
32
  return getattr(settings, "SLM_ALERT_COLORS", {}).get(self, None)
@@ -5,11 +5,13 @@ from enum_properties import s
5
5
  class AntennaCalibrationMethod(IntegerChoices):
6
6
  _symmetric_builtins_ = [s("name", case_fold=True)]
7
7
 
8
+ # fmt: off
8
9
  CONVERTED = 0, "CONVERTED"
9
- ROBOT = 1, "ROBOT"
10
- FIELD = 2, "FIELD"
11
- CHAMBER = 3, "CHAMBER"
12
- COPIED = 4, "COPIED"
10
+ ROBOT = 1, "ROBOT"
11
+ FIELD = 2, "FIELD"
12
+ CHAMBER = 3, "CHAMBER"
13
+ COPIED = 4, "COPIED"
14
+ # fmt: on
13
15
 
14
16
  # todo real?
15
17
  # ONE = 1, 'ONE',
@@ -6,15 +6,16 @@ from enum_properties import s
6
6
  class AntennaFeatures(IntegerChoices):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- MMI = 1, _("(MMI) Man-Machine Interface")
10
- NOM = 2, _("(NOM) North Orientation Mark")
11
- RXC = 3, _("(RXC) Receiver Connector")
12
- BAT = 4, _("(BAT) Battery Compartment Door Release")
13
- BTD = 5, _("(BTD) Bottom of Tear Drop Shape")
14
- CMP = 6, _("(CMP) Mounted Compass")
15
- DIS = 7, _("(DIS) Display/Digital Readout")
16
- DRY = 8, _("(DRY) Cap or Cover for Drying Agent")
17
- PCS = 9, _("(PCS) PC Card Slot")
9
+ # fmt: off
10
+ MMI = 1, _("(MMI) Man-Machine Interface")
11
+ NOM = 2, _("(NOM) North Orientation Mark")
12
+ RXC = 3, _("(RXC) Receiver Connector")
13
+ BAT = 4, _("(BAT) Battery Compartment Door Release")
14
+ BTD = 5, _("(BTD) Bottom of Tear Drop Shape")
15
+ CMP = 6, _("(CMP) Mounted Compass")
16
+ DIS = 7, _("(DIS) Display/Digital Readout")
17
+ DRY = 8, _("(DRY) Cap or Cover for Drying Agent")
18
+ PCS = 9, _("(PCS) PC Card Slot")
18
19
  TMT = 10, _("(TMT) Tape Measure Tab or Notch for Slant Height Pole")
19
20
  CAC = 11, _("(CAC) Nonspecific Cable Connector")
20
21
  CTC = 12, _("(CTC) External Controller Connector")
@@ -22,6 +23,8 @@ class AntennaFeatures(IntegerChoices):
22
23
  PWC = 14, _("(PWC) Power Port")
23
24
  RTC = 15, _("(RTC) RTK Connector")
24
25
  UNK = 16, _("(UNK) Unknown")
26
+ OMM = 17, _("(OMM) Opposite of Man-Machine Interface")
27
+ # fmt: on
25
28
 
26
29
  def __str__(self):
27
30
  return self.name
@@ -6,17 +6,19 @@ from enum_properties import p, s
6
6
  class AntennaReferencePoint(IntegerChoices, p("title")):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
+ # fmt: off
9
10
  # value label title
10
- BAM = 1, _("BAM (Bottom of Antenna Mount)"), _("Bottom of Antenna Mount")
11
- BCR = 2, _("BCR (Bottom of Chokering)"), _("Bottom of Chokering")
12
- BDG = 3, _("BDG (Bottom of Dome Ground Plane)"), _("Bottom of Dome Ground Plane")
13
- BGP = 4, _("BGP (Bottom of Ground Plane)"), _("Bottom of Ground Plane")
14
- BPA = 5, _("BPA (Bottom of Preamplifier)"), _("Bottom of Preamplifier")
15
- TCR = 6, _("TCR (Top of Chokering)"), _("Top of Chokering")
16
- TDG = 7, _("TDG (Top of Dome Ground Plane)"), _("Top of Dome Ground Plane")
17
- TGP = 8, _("TGP (Top of Ground Plane)"), _("Top of Ground Plane")
18
- TOP = 9, _("TOP (Top of Pole)"), _("Top of Pole")
19
- TPA = 10, _("TPA (Top of Preamplifier)"), _("Top of Preamplifier")
11
+ BAM = 1, _("BAM (Bottom of Antenna Mount)"), _("Bottom of Antenna Mount")
12
+ BCR = 2, _("BCR (Bottom of Chokering)"), _("Bottom of Chokering")
13
+ BDG = 3, _("BDG (Bottom of Dome Ground Plane)"), _("Bottom of Dome Ground Plane")
14
+ BGP = 4, _("BGP (Bottom of Ground Plane)"), _("Bottom of Ground Plane")
15
+ BPA = 5, _("BPA (Bottom of Preamplifier)"), _("Bottom of Preamplifier")
16
+ TCR = 6, _("TCR (Top of Chokering)"), _("Top of Chokering")
17
+ TDG = 7, _("TDG (Top of Dome Ground Plane)"), _("Top of Dome Ground Plane")
18
+ TGP = 8, _("TGP (Top of Ground Plane)"), _("Top of Ground Plane")
19
+ TOP = 9, _("TOP (Top of Pole)"), _("Top of Pole")
20
+ TPA = 10, _("TPA (Top of Preamplifier)"), _("Top of Preamplifier")
21
+ # fmt: on
20
22
 
21
23
  def __str__(self):
22
24
  return self.name
slm/defines/Aspiration.py CHANGED
@@ -5,9 +5,11 @@ from enum_properties import s
5
5
  class Aspiration(TextChoices):
6
6
  _symmetric_builtins_ = [s("name", case_fold=True), s("label", case_fold=True)]
7
7
 
8
+ # fmt: off
8
9
  UNASPIRATED = "U", "UNASPIRATED"
9
- NATURAL = "N", "NATURAL"
10
- FAN = "F", "FAN"
10
+ NATURAL = "N", "NATURAL"
11
+ FAN = "F", "FAN"
12
+ # fmt: on
11
13
 
12
14
  def __str__(self):
13
15
  return str(self.label)
@@ -6,14 +6,16 @@ from enum_properties import s
6
6
  class CardinalDirection(TextChoices):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- NORTH = "N", _("North")
10
- SOUTH = "S", _("South")
11
- EAST = "E", _("East")
12
- WEST = "W", _("West")
9
+ # fmt: off
10
+ NORTH = "N", _("North")
11
+ SOUTH = "S", _("South")
12
+ EAST = "E", _("East")
13
+ WEST = "W", _("West")
13
14
  NORTH_WEST = "NW", _("North West")
14
15
  NORTH_EAST = "NE", _("North East")
15
16
  SOUTH_WEST = "SW", _("South West")
16
17
  SOUTH_EAST = "SE", _("South East")
18
+ # fmt: on
17
19
 
18
20
  def __str__(self):
19
21
  return str(self.label)
@@ -5,8 +5,10 @@ from enum_properties import s
5
5
  class CollocationStatus(TextChoices):
6
6
  _symmetric_builtins_ = [s("name", case_fold=True), s("label", case_fold=True)]
7
7
 
8
+ # fmt: off
8
9
  PERMANENT = "P", "PERMANENT"
9
- HOURLY = "M", "MOBILE"
10
+ HOURLY = "M", "MOBILE"
11
+ # fmt: on
10
12
 
11
13
  def __str__(self):
12
14
  return str(self.label)
@@ -4,19 +4,13 @@ from enum_properties import p, s
4
4
 
5
5
 
6
6
  class EquipmentState(IntegerChoices, p("help_text")):
7
- _symmetric_builtins_ = [s("name", case_fold=True), s("label", case_fold=True)]
7
+ _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- ACTIVE = 100, _("In Use"), _("This coding is in active use.")
10
- LEGACY = (
11
- 101,
12
- _("Retired"),
13
- _("This equipment coding has changed."),
14
- )
15
- UNVERIFIED = (
16
- 102,
17
- _("Unverified"),
18
- _("This equipment coding has not been verified."),
19
- )
9
+ # fmt: off
10
+ ACTIVE = 100, _("In Use"), _("This coding is in active use.")
11
+ LEGACY = 101, _("Retired"), _("This equipment coding has changed.")
12
+ UNVERIFIED = 102, _("Unverified"), _("This equipment coding has not been verified.")
13
+ # fmt: on
20
14
 
21
15
  def __str__(self):
22
16
  return str(self.label)
@@ -6,9 +6,11 @@ from enum_properties import s
6
6
  class FlagSeverity(IntegerChoices):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- BLOCK_SAVE = 1, _("Block Save")
9
+ # fmt: off
10
+ BLOCK_SAVE = 1, _("Block Save")
10
11
  BLOCK_PUBLISH = 2, _("Block Publish")
11
- NOTIFY = 3, _("Notify")
12
+ NOTIFY = 3, _("Notify")
13
+ # fmt: on
12
14
 
13
15
  def __str__(self):
14
16
  return str(self.label)
@@ -5,11 +5,13 @@ from enum_properties import s
5
5
  class FractureSpacing(TextChoices):
6
6
  _symmetric_builtins_ = [s("name", case_fold=True), s("label", case_fold=True)]
7
7
 
8
- ZERO = "0", "0 cm"
9
- LESS_THAN_10_CM = "1", "1-10 cm"
10
- MORE_THAN_11_LESS_THAN_50_CM = "11", "11-50 cm"
11
- MORE_THAN_51_LESS_THAN_200_CM = "51", "51-200 cm"
12
- OVER_200_CM = "200", "over 200 cm"
8
+ # fmt: off
9
+ ZERO = "0", "0 cm"
10
+ LESS_THAN_10_CM = "1", "1-10 cm"
11
+ MORE_THAN_11_LESS_THAN_50_CM = "11", "11-50 cm"
12
+ MORE_THAN_51_LESS_THAN_200_CM = "51", "51-200 cm"
13
+ OVER_200_CM = "200", "over 200 cm"
14
+ # fmt: on
13
15
 
14
16
  def __str__(self):
15
17
  return str(self.label)
@@ -5,11 +5,13 @@ from enum_properties import s
5
5
  class FrequencyStandardType(TextChoices, s("geodesy_ml", case_fold=True)):
6
6
  _symmetric_builtins_ = [s("name", case_fold=True), s("label", case_fold=True)]
7
7
 
8
- INTERNAL = "I", "INTERNAL", "INTERNAL"
9
- EXTERNAL_H_MASER = "H", "EXTERNAL H-MASER", "H-MASER"
10
- EXTERNAL_CESIUM = "C", "EXTERNAL CESIUM", "CESIUM"
8
+ # fmt: off
9
+ INTERNAL = "I", "INTERNAL", "INTERNAL"
10
+ EXTERNAL_H_MASER = "H", "EXTERNAL H-MASER", "H-MASER"
11
+ EXTERNAL_CESIUM = "C", "EXTERNAL CESIUM", "CESIUM"
11
12
  EXTERNAL_RUBIDIUM = "R", "EXTERNAL RUBIDIUM", "RUBIDIUM"
12
- EXTERNAL_QUARTZ = "Q", "EXTERNAL QUARTZ", "QUARTZ"
13
+ EXTERNAL_QUARTZ = "Q", "EXTERNAL QUARTZ", "QUARTZ"
14
+ # fmt: on
13
15
 
14
16
  def __str__(self):
15
17
  return str(self.label)
@@ -8,9 +8,11 @@ from enum_properties import s
8
8
  class GeodesyMLVersion(IntegerChoices, s("version"), s("xmlns", case_fold=True)):
9
9
  _symmetric_builtins_ = [s("name", case_fold=True), s("label", case_fold=True)]
10
10
 
11
+ # fmt: off
11
12
  # name value label version xmlns
12
13
  v0_4 = 1, "GeodesyML/0.4", 0.4, "urn:xml-gov-au:icsm:egeodesy:0.4"
13
14
  v0_5 = 2, "GeodesyML/0.5", 0.5, "urn:xml-gov-au:icsm:egeodesy:0.5"
15
+ # fmt: on
14
16
 
15
17
  def __str__(self):
16
18
  return self.label
@@ -6,14 +6,16 @@ from enum_properties import s
6
6
  class Instrumentation(IntegerChoices):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- GPS = 1, _("GPS")
9
+ # fmt: off
10
+ GPS = 1, _("GPS")
10
11
  GLONASS = 2, _("GLONASS")
11
- DORIS = 3, _("DORIS")
12
- PRARE = 4, _("PRARE")
13
- SLR = 5, _("SLR")
14
- VLBI = 6, _("VLBI")
15
- TIME = 7, _("TIME")
16
- ETC = 8, _("etc")
12
+ DORIS = 3, _("DORIS")
13
+ PRARE = 4, _("PRARE")
14
+ SLR = 5, _("SLR")
15
+ VLBI = 6, _("VLBI")
16
+ TIME = 7, _("TIME")
17
+ ETC = 8, _("etc")
18
+ # fmt: on
17
19
 
18
20
  def __str__(self):
19
21
  return str(self.label)
@@ -6,25 +6,27 @@ from enum_properties import s
6
6
  class LogEntryType(IntegerChoices):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- SITE_PROPOSED = 1, _("Site Proposed")
10
- ADD = 2, _("Add")
11
- UPDATE = 3, _("Update")
12
- DELETE = 4, _("Delete")
13
- PUBLISH = 5, _("Publish")
14
- LOG_UPLOAD = 6, _("Log Upload")
15
- IMAGE_UPLOAD = 7, _("Image Upload")
16
- ATTACHMENT_UPLOAD = 8, _("Attachment Upload")
17
- IMAGE_PUBLISH = 9, _("Image Published")
18
- ATTACHMENT_PUBLISH = 10, _("Attachment Published")
19
- IMAGE_UNPUBLISH = 11, _("Image Unpublished")
9
+ # fmt: off
10
+ SITE_PROPOSED = 1, _("Site Proposed")
11
+ ADD = 2, _("Add")
12
+ UPDATE = 3, _("Update")
13
+ DELETE = 4, _("Delete")
14
+ PUBLISH = 5, _("Publish")
15
+ LOG_UPLOAD = 6, _("Log Upload")
16
+ IMAGE_UPLOAD = 7, _("Image Upload")
17
+ ATTACHMENT_UPLOAD = 8, _("Attachment Upload")
18
+ IMAGE_PUBLISH = 9, _("Image Published")
19
+ ATTACHMENT_PUBLISH = 10, _("Attachment Published")
20
+ IMAGE_UNPUBLISH = 11, _("Image Unpublished")
20
21
  ATTACHMENT_UNPUBLISH = 12, _("Attachment Unpublished")
21
- IMAGE_DELETE = 13, _("Image Deleted")
22
- ATTACHMENT_DELETE = 14, _("Attachment Deleted")
23
- REVERT = 15, _("Revert")
22
+ IMAGE_DELETE = 13, _("Image Deleted")
23
+ ATTACHMENT_DELETE = 14, _("Attachment Deleted")
24
+ REVERT = 15, _("Revert")
25
+ # fmt: on
24
26
 
25
27
  @property
26
28
  def css(self):
27
- return f"slm-log-" f'{self.label.lower().replace("_", "-").replace(" ", "-")}'
29
+ return f"slm-log-{self.label.lower().replace('_', '-').replace(' ', '-')}"
28
30
 
29
31
  def __str__(self):
30
32
  return str(self.label)
@@ -6,13 +6,15 @@ from enum_properties import s
6
6
  class SLMFileType(IntegerChoices, s("type")):
7
7
  _symmetric_builtins_ = [s("name", case_fold=True)]
8
8
 
9
- SITE_LOG = 1, _("Site Log"), "log"
9
+ # fmt: off
10
+ SITE_LOG = 1, _("Site Log"), "log"
10
11
  SITE_IMAGE = 2, _("Site Image"), "image"
11
12
  ATTACHMENT = 3, _("Attachment"), "attachment"
13
+ # fmt: on
12
14
 
13
15
  @staticmethod
14
16
  def icon(mimetype):
15
- return f'bi bi-filetype-{mimetype.split("/")[-1]}'
17
+ return f"bi bi-filetype-{mimetype.split('/')[-1]}"
16
18
 
17
19
  def __str__(self):
18
20
  return str(self.label)