igs-slm 0.1.2b0__py3-none-any.whl → 0.1.5b0__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.
- igs_slm-0.1.5b0.dist-info/METADATA +115 -0
- {igs_slm-0.1.2b0.dist-info → igs_slm-0.1.5b0.dist-info}/RECORD +192 -172
- {igs_slm-0.1.2b0.dist-info → igs_slm-0.1.5b0.dist-info}/WHEEL +1 -1
- igs_slm-0.1.5b0.dist-info/entry_points.txt +3 -0
- {igs_slm-0.1.2b0.dist-info → igs_slm-0.1.5b0.dist-info/licenses}/LICENSE +1 -1
- slm/__init__.py +17 -14
- slm/admin.py +32 -5
- slm/api/edit/views.py +22 -9
- slm/api/public/views.py +10 -8
- slm/api/views.py +45 -6
- slm/apps.py +28 -6
- slm/authentication.py +3 -2
- slm/bin/startproject.py +102 -31
- slm/bin/templates/{{ project_dir }}/pyproject.toml +30 -21
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/base.py +12 -1
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/__init__.py +5 -27
- slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/__init__.py +6 -27
- slm/bin/templates/{{ project_dir }}/src/sites/{{ site }}/validation.py +29 -0
- slm/context.py +5 -0
- slm/defines/AlertLevel.py +10 -2
- slm/defines/AntennaCalibration.py +6 -4
- slm/defines/AntennaFeatures.py +12 -9
- slm/defines/AntennaReferencePoint.py +12 -10
- slm/defines/Aspiration.py +4 -2
- slm/defines/CardinalDirection.py +6 -4
- slm/defines/CollocationStatus.py +3 -1
- slm/defines/EquipmentState.py +6 -12
- slm/defines/FlagSeverity.py +4 -2
- slm/defines/FractureSpacing.py +7 -5
- slm/defines/FrequencyStandardType.py +6 -4
- slm/defines/GeodesyMLVersion.py +2 -0
- slm/defines/Instrumentation.py +9 -7
- slm/defines/LogEntryType.py +17 -15
- slm/defines/SLMFileType.py +4 -2
- slm/defines/SiteFileUploadStatus.py +7 -24
- slm/defines/SiteLogFormat.py +8 -32
- slm/defines/SiteLogStatus.py +9 -28
- slm/defines/TectonicPlates.py +18 -16
- slm/manage.py +24 -0
- slm/management/commands/check_upgrade.py +142 -0
- slm/management/commands/generate_sinex.py +110 -92
- slm/management/commands/head_from_index.py +11 -8
- slm/management/commands/import_archive.py +27 -18
- slm/management/commands/import_equipment.py +1 -1
- slm/management/commands/sitelog.py +1 -3
- slm/management/commands/synchronize.py +1 -1
- slm/management/commands/validate_db.py +6 -4
- slm/map/defines.py +18 -14
- slm/map/templates/slm/map.html +4 -6
- slm/migrations/0001_remove_archiveindex_no_overlapping_ranges_per_site_and_more.py +26 -0
- slm/migrations/0002_alter_archivedsitelog_file_and_more.py +44 -0
- slm/migrations/0003_alter_archivedsitelog_name_and_more.py +35 -0
- slm/migrations/0004_alter_site_name.py +24 -0
- slm/migrations/0005_slmversion.py +30 -0
- slm/migrations/0017_alter_logentry_unique_together_and_more.py +3 -1
- slm/migrations/0018_afix_deleted.py +3 -1
- slm/migrations/0018_alter_siteantenna_options_and_more.py +87 -56
- slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +1 -1
- slm/migrations/0023_archivedsitelog_gml_version_and_more.py +1 -1
- slm/migrations/0031_alter_antenna_features.py +44 -0
- slm/migrations/0032_archiveindex_valid_range_and_more.py +84 -0
- slm/migrations/add_index_order_index.py +54 -0
- slm/migrations/normalize_index.py +147 -0
- slm/migrations/simplify_index.py +48 -0
- slm/migrations/verify_index.py +67 -0
- slm/models/__init__.py +2 -0
- slm/models/alerts.py +7 -10
- slm/models/data.py +1 -2
- slm/models/equipment.py +1 -1
- slm/models/fields.py +41 -0
- slm/models/index.py +183 -53
- slm/models/sitelog.py +35 -38
- slm/models/system.py +72 -31
- slm/models/user.py +1 -1
- slm/parsing/__init__.py +34 -17
- slm/parsing/legacy/binding.py +65 -34
- slm/parsing/legacy/parser.py +2 -2
- slm/parsing/xsd/binding.py +1 -1
- slm/parsing/xsd/parser.py +1 -2
- slm/receivers/__init__.py +2 -2
- slm/receivers/index.py +2 -1
- slm/receivers/migration.py +21 -0
- slm/settings/__init__.py +192 -4
- slm/settings/assets.py +26 -0
- slm/settings/auth.py +18 -14
- slm/settings/ckeditor.py +12 -6
- slm/settings/debug.py +2 -2
- slm/settings/emails.py +50 -0
- slm/settings/internationalization.py +8 -6
- slm/settings/logging.py +100 -88
- slm/settings/platform/darwin.py +16 -6
- slm/settings/rest.py +20 -15
- slm/settings/root.py +192 -98
- slm/settings/routines.py +5 -1
- slm/settings/secrets.py +20 -31
- slm/settings/security.py +7 -5
- slm/settings/slm.py +35 -16
- slm/settings/static_templates.py +12 -9
- slm/settings/templates.py +31 -25
- slm/settings/uploads.py +33 -5
- slm/settings/urls.py +1 -1
- slm/settings/validation.py +165 -165
- slm/signals.py +3 -2
- slm/static/slm/css/style.css +37 -36
- slm/static/slm/js/autocomplete.js +6 -4
- slm/static/slm/js/file_modal.js +62 -0
- slm/static/slm/js/form.js +3 -3
- slm/static/slm/js/formWidget.js +3 -3
- slm/static/slm/js/persistable.js +5 -1
- slm/templates/admin/base.html +1 -0
- slm/templates/rest_framework/base.html +23 -11
- slm/templates/slm/base.html +27 -22
- slm/templates/slm/forms/widgets/auto_complete.html +12 -11
- slm/templates/slm/forms/widgets/auto_complete_multiple.html +8 -7
- slm/templates/slm/station/download.html +6 -6
- slm/templates/slm/station/edit.html +9 -17
- slm/templates/slm/station/review.html +5 -3
- slm/templates/slm/station/upload.html +4 -1
- slm/templates/slm/station/uploads/legacy.html +1 -1
- slm/templates/slm/widgets/alert_scroll.html +4 -8
- slm/templates/slm/widgets/filelist.html +0 -5
- slm/templates/slm/widgets/log_scroll.html +2 -13
- slm/templates/slm/widgets/stationlist.html +2 -8
- slm/templatetags/slm.py +70 -9
- slm/utils.py +13 -4
- slm/validators.py +14 -14
- slm/views.py +6 -6
- slm/wsgi.py +16 -0
- igs_slm-0.1.2b0.dist-info/METADATA +0 -151
- igs_slm-0.1.2b0.dist-info/entry_points.txt +0 -3
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +0 -11
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/local.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/develop/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/manage.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/production/wsgi.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{sites → src/sites}/{{ site }}/urls.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/admin.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/apps.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/management/commands/import_archive.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/migrations/__init__.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/models.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/templates/slm/base.html +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/urls.py +0 -0
- /slm/bin/templates/{{ project_dir }}/{{{ extension_app }} → src/{{ extension_app }}}/views.py +0 -0
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
[
|
|
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
|
-
|
|
8
|
-
{ include = "{{ extension_app }}" },
|
|
9
|
-
{ include = "sites" },
|
|
7
|
+
dependencies = [
|
|
8
|
+
"igs-slm>={{ slm_version }},<{{ slm_version_next_major }}",
|
|
10
9
|
]
|
|
11
10
|
|
|
12
|
-
|
|
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
|
-
[
|
|
20
|
+
[project.scripts]
|
|
15
21
|
{{ site }} = "sites.{{ site }}.manage:main"
|
|
16
22
|
|
|
17
|
-
[tool.
|
|
18
|
-
|
|
23
|
+
[tool.hatch.build.targets.wheel]
|
|
24
|
+
packages = [
|
|
25
|
+
"src/sites",
|
|
26
|
+
"src/{{ extension_app }}"
|
|
27
|
+
]
|
|
19
28
|
{% if local_slm %}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{% else %}
|
|
23
|
-
igs-slm = "^{{ slm_version }}"
|
|
29
|
+
[tool.hatch.metadata]
|
|
30
|
+
allow-direct-references = true
|
|
24
31
|
{% endif %}
|
|
25
32
|
|
|
26
|
-
[
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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 = ["
|
|
35
|
-
build-backend = "
|
|
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
|
-
|
|
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
|
-
|
|
16
|
+
SLM_DEBUG_TOOLBAR = True
|
|
20
17
|
|
|
21
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,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
|
slm/context.py
ADDED
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
|
-
|
|
9
|
+
# fmt: off
|
|
10
|
+
NOTICE = 1, _("NOTICE")
|
|
10
11
|
WARNING = 2, _("WARNING")
|
|
11
|
-
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
|
|
10
|
-
FIELD
|
|
11
|
-
CHAMBER
|
|
12
|
-
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',
|
slm/defines/AntennaFeatures.py
CHANGED
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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,
|
|
11
|
-
BCR = 2,
|
|
12
|
-
BDG = 3,
|
|
13
|
-
BGP = 4,
|
|
14
|
-
BPA = 5,
|
|
15
|
-
TCR = 6,
|
|
16
|
-
TDG = 7,
|
|
17
|
-
TGP = 8,
|
|
18
|
-
TOP = 9,
|
|
19
|
-
TPA = 10, _("TPA (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
|
|
10
|
-
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)
|
slm/defines/CardinalDirection.py
CHANGED
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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)
|
slm/defines/CollocationStatus.py
CHANGED
|
@@ -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
|
|
10
|
+
HOURLY = "M", "MOBILE"
|
|
11
|
+
# fmt: on
|
|
10
12
|
|
|
11
13
|
def __str__(self):
|
|
12
14
|
return str(self.label)
|
slm/defines/EquipmentState.py
CHANGED
|
@@ -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)
|
|
7
|
+
_symmetric_builtins_ = [s("name", case_fold=True)]
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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)
|
slm/defines/FlagSeverity.py
CHANGED
|
@@ -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
|
-
|
|
9
|
+
# fmt: off
|
|
10
|
+
BLOCK_SAVE = 1, _("Block Save")
|
|
10
11
|
BLOCK_PUBLISH = 2, _("Block Publish")
|
|
11
|
-
NOTIFY
|
|
12
|
+
NOTIFY = 3, _("Notify")
|
|
13
|
+
# fmt: on
|
|
12
14
|
|
|
13
15
|
def __str__(self):
|
|
14
16
|
return str(self.label)
|
slm/defines/FractureSpacing.py
CHANGED
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
13
|
+
EXTERNAL_QUARTZ = "Q", "EXTERNAL QUARTZ", "QUARTZ"
|
|
14
|
+
# fmt: on
|
|
13
15
|
|
|
14
16
|
def __str__(self):
|
|
15
17
|
return str(self.label)
|
slm/defines/GeodesyMLVersion.py
CHANGED
|
@@ -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
|
slm/defines/Instrumentation.py
CHANGED
|
@@ -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
|
-
|
|
9
|
+
# fmt: off
|
|
10
|
+
GPS = 1, _("GPS")
|
|
10
11
|
GLONASS = 2, _("GLONASS")
|
|
11
|
-
DORIS
|
|
12
|
-
PRARE
|
|
13
|
-
SLR
|
|
14
|
-
VLBI
|
|
15
|
-
TIME
|
|
16
|
-
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)
|
slm/defines/LogEntryType.py
CHANGED
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
22
|
-
ATTACHMENT_DELETE
|
|
23
|
-
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-
|
|
29
|
+
return f"slm-log-{self.label.lower().replace('_', '-').replace(' ', '-')}"
|
|
28
30
|
|
|
29
31
|
def __str__(self):
|
|
30
32
|
return str(self.label)
|
slm/defines/SLMFileType.py
CHANGED
|
@@ -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
|
-
|
|
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
|
|
17
|
+
return f"bi bi-filetype-{mimetype.split('/')[-1]}"
|
|
16
18
|
|
|
17
19
|
def __str__(self):
|
|
18
20
|
return str(self.label)
|
|
@@ -13,30 +13,13 @@ class SiteFileUploadStatus(IntegerChoices, p("help")):
|
|
|
13
13
|
|
|
14
14
|
_symmetric_builtins_ = [s("name", case_fold=True)]
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
2,
|
|
24
|
-
_("Published File"),
|
|
25
|
-
_(
|
|
26
|
-
"The file is published and is publicly available as an attachment "
|
|
27
|
-
"to the site."
|
|
28
|
-
),
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
INVALID = (3, _("Invalid Site Log"), _("The file did not pass validation."))
|
|
32
|
-
|
|
33
|
-
WARNINGS = (
|
|
34
|
-
4,
|
|
35
|
-
_("Warnings Site Log"),
|
|
36
|
-
_("The file is valid but has some warnings."),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
VALID = (5, _("Valid Site Log"), _("The file is valid."))
|
|
16
|
+
# fmt: off
|
|
17
|
+
UNPUBLISHED = 1, _("Unpublished File"), _("The file is pending moderation before it will be made public.")
|
|
18
|
+
PUBLISHED = 2, _("Published File"), _("The file is published and is publicly available as an attachment to the site.")
|
|
19
|
+
INVALID = 3, _("Invalid Site Log"), _("The file did not pass validation.")
|
|
20
|
+
WARNINGS = 4, _("Warnings Site Log"), _("The file is valid but has some warnings.")
|
|
21
|
+
VALID = 5, _("Valid Site Log"), _("The file is valid.")
|
|
22
|
+
# fmt: on
|
|
40
23
|
|
|
41
24
|
@classmethod
|
|
42
25
|
def status_by_filetype(cls, filetype):
|