igs-slm 0.1.0b0__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.0b0.dist-info/LICENSE +21 -0
- igs_slm-0.1.0b0.dist-info/METADATA +151 -0
- igs_slm-0.1.0b0.dist-info/RECORD +447 -0
- igs_slm-0.1.0b0.dist-info/WHEEL +4 -0
- igs_slm-0.1.0b0.dist-info/entry_points.txt +3 -0
- igs_tools/__init__.py +0 -0
- igs_tools/connection.py +88 -0
- igs_tools/defines/__init__.py +8 -0
- igs_tools/defines/constellation.py +21 -0
- igs_tools/defines/data_center.py +75 -0
- igs_tools/defines/rinex.py +49 -0
- igs_tools/directory.py +247 -0
- igs_tools/utils.py +66 -0
- slm/__init__.py +21 -0
- slm/admin.py +674 -0
- slm/api/edit/__init__.py +0 -0
- slm/api/edit/serializers.py +316 -0
- slm/api/edit/views.py +1632 -0
- slm/api/fields.py +89 -0
- slm/api/filter.py +504 -0
- slm/api/pagination.py +55 -0
- slm/api/permissions.py +65 -0
- slm/api/public/__init__.py +0 -0
- slm/api/public/serializers.py +249 -0
- slm/api/public/views.py +606 -0
- slm/api/serializers.py +132 -0
- slm/api/views.py +148 -0
- slm/apps.py +323 -0
- slm/authentication.py +198 -0
- slm/bin/__init__.py +0 -0
- slm/bin/startproject.py +262 -0
- slm/bin/templates/{{ project_dir }}/pyproject.toml +35 -0
- slm/bin/templates/{{ project_dir }}/sites/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/base.py +15 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/__init__.py +56 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/local.py +4 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/develop/wsgi.py +16 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/manage.py +34 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/production/__init__.py +61 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/production/wsgi.py +16 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/urls.py +7 -0
- slm/bin/templates/{{ project_dir }}/sites/{{ site }}/validation.py +11 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/admin.py +5 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/apps.py +14 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/commands/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/management/commands/import_archive.py +64 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/migrations/__init__.py +0 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/models.py +6 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/templates/slm/base.html +8 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/urls.py +10 -0
- slm/bin/templates/{{ project_dir }}/{{ extension_app }}/views.py +5 -0
- slm/defines/AlertLevel.py +24 -0
- slm/defines/AntennaCalibration.py +25 -0
- slm/defines/AntennaFeatures.py +27 -0
- slm/defines/AntennaReferencePoint.py +22 -0
- slm/defines/Aspiration.py +13 -0
- slm/defines/CardinalDirection.py +19 -0
- slm/defines/CollocationStatus.py +12 -0
- slm/defines/EquipmentState.py +22 -0
- slm/defines/FlagSeverity.py +14 -0
- slm/defines/FractureSpacing.py +15 -0
- slm/defines/FrequencyStandardType.py +15 -0
- slm/defines/GeodesyMLVersion.py +48 -0
- slm/defines/ISOCountry.py +1194 -0
- slm/defines/Instrumentation.py +19 -0
- slm/defines/LogEntryType.py +30 -0
- slm/defines/SLMFileType.py +18 -0
- slm/defines/SiteFileUploadStatus.py +61 -0
- slm/defines/SiteLogFormat.py +49 -0
- slm/defines/SiteLogStatus.py +78 -0
- slm/defines/TectonicPlates.py +28 -0
- slm/defines/__init__.py +46 -0
- slm/forms.py +1126 -0
- slm/jinja2/slm/sitelog/ascii_9char.log +346 -0
- slm/jinja2/slm/sitelog/legacy.log +346 -0
- slm/jinja2/slm/sitelog/xsd/0.4/collocationInformation.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/condition.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/contact.xml +52 -0
- slm/jinja2/slm/sitelog/xsd/0.4/formInformation.xml +5 -0
- slm/jinja2/slm/sitelog/xsd/0.4/frequencyStandard.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/gnssAntenna.xml +16 -0
- slm/jinja2/slm/sitelog/xsd/0.4/gnssReceiver.xml +11 -0
- slm/jinja2/slm/sitelog/xsd/0.4/humiditySensor.xml +13 -0
- slm/jinja2/slm/sitelog/xsd/0.4/localEpisodicEffect.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/0.4/moreInformation.xml +22 -0
- slm/jinja2/slm/sitelog/xsd/0.4/multipathSource.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/0.4/otherInstrumentation.xml +5 -0
- slm/jinja2/slm/sitelog/xsd/0.4/pressureSensor.xml +12 -0
- slm/jinja2/slm/sitelog/xsd/0.4/radioInterference.xml +11 -0
- slm/jinja2/slm/sitelog/xsd/0.4/sensor.xml +16 -0
- slm/jinja2/slm/sitelog/xsd/0.4/signalObstruction.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/0.4/siteIdentification.xml +22 -0
- slm/jinja2/slm/sitelog/xsd/0.4/siteLocation.xml +21 -0
- slm/jinja2/slm/sitelog/xsd/0.4/surveyedLocalTie.xml +20 -0
- slm/jinja2/slm/sitelog/xsd/0.4/temperatureSensor.xml +13 -0
- slm/jinja2/slm/sitelog/xsd/0.4/waterVaporSensor.xml +11 -0
- slm/jinja2/slm/sitelog/xsd/0.5/document.xml +10 -0
- slm/jinja2/slm/sitelog/xsd/geodesyml_0.4.xml +99 -0
- slm/jinja2/slm/sitelog/xsd/geodesyml_0.5.xml +112 -0
- slm/management/__init__.py +0 -0
- slm/management/commands/__init__.py +53 -0
- slm/management/commands/build_index.py +96 -0
- slm/management/commands/generate_sinex.py +675 -0
- slm/management/commands/head_from_index.py +541 -0
- slm/management/commands/import_archive.py +908 -0
- slm/management/commands/import_equipment.py +351 -0
- slm/management/commands/set_site.py +56 -0
- slm/management/commands/sitelog.py +144 -0
- slm/management/commands/synchronize.py +60 -0
- slm/management/commands/update_data_availability.py +167 -0
- slm/management/commands/validate_db.py +186 -0
- slm/management/commands/validate_gml.py +73 -0
- slm/map/__init__.py +1 -0
- slm/map/admin.py +5 -0
- slm/map/api/__init__.py +0 -0
- slm/map/api/edit/__init__.py +0 -0
- slm/map/api/edit/serializers.py +28 -0
- slm/map/api/edit/views.py +46 -0
- slm/map/api/public/__init__.py +0 -0
- slm/map/api/public/serializers.py +29 -0
- slm/map/api/public/views.py +64 -0
- slm/map/apps.py +7 -0
- slm/map/defines.py +53 -0
- slm/map/migrations/0001_initial.py +115 -0
- slm/map/migrations/__init__.py +0 -0
- slm/map/models.py +63 -0
- slm/map/static/slm/css/map.css +86 -0
- slm/map/static/slm/js/map.js +159 -0
- slm/map/templates/slm/map.html +374 -0
- slm/map/templates/slm/station/base.html +11 -0
- slm/map/templates/slm/station/edit.html +10 -0
- slm/map/templates/slm/top_nav.html +17 -0
- slm/map/templatetags/__init__.py +0 -0
- slm/map/templatetags/slm_map.py +18 -0
- slm/map/urls.py +25 -0
- slm/map/views.py +36 -0
- slm/middleware.py +29 -0
- slm/migrations/0001_alter_siteantenna_marker_enu_alter_sitelocation_llh_and_more.py +47 -0
- slm/migrations/0001_initial.py +4826 -0
- slm/migrations/0002_alter_dataavailability_site.py +22 -0
- slm/migrations/0003_remove_logentry_slm_logentr_site_lo_7a2af7_idx_and_more.py +80 -0
- slm/migrations/0004_alter_logentry_timestamp_and_more.py +25 -0
- slm/migrations/0005_alter_logentry_options_alter_logentry_section_and_more.py +46 -0
- slm/migrations/0006_alter_logentry_options_alter_logentry_index_together.py +24 -0
- slm/migrations/0007_alter_dataavailability_rate.py +23 -0
- slm/migrations/0008_alter_archiveindex_options_and_more.py +64 -0
- slm/migrations/0009_alter_archiveindex_end.py +21 -0
- slm/migrations/0010_alter_dataavailability_rinex_version_and_more.py +844 -0
- slm/migrations/0011_alter_siteidentification_fracture_spacing.py +33 -0
- slm/migrations/0012_alter_logentry_type.py +36 -0
- slm/migrations/0013_unpublishedfilesalert.py +48 -0
- slm/migrations/0014_sitelogpublished.py +48 -0
- slm/migrations/0015_alter_siteantenna_options_and_more.py +181 -0
- slm/migrations/0016_alter_antenna_description_alter_radome_description_and_more.py +42 -0
- slm/migrations/0017_alter_logentry_unique_together_and_more.py +54 -0
- slm/migrations/0018_afix_deleted.py +34 -0
- slm/migrations/0018_alter_siteantenna_options_and_more.py +244 -0
- slm/migrations/0019_remove_siteantenna_marker_enu_siteantenna_marker_une_and_more.py +101 -0
- slm/migrations/0020_alter_manufacturer_options.py +16 -0
- slm/migrations/0021_alter_siteform_report_type.py +23 -0
- slm/migrations/0022_rename_antcal_antenna_radome_slm_antcal_antenna_20827a_idx_and_more.py +297 -0
- slm/migrations/0023_archivedsitelog_gml_version_and_more.py +55 -0
- slm/migrations/0024_alter_agency_name_alter_agency_shortname.py +24 -0
- slm/migrations/0025_alter_archivedsitelog_log_format_and_more.py +61 -0
- slm/migrations/0026_alter_archivedsitelog_log_format_and_more.py +61 -0
- slm/migrations/0027_importalert_file_contents_importalert_findings_and_more.py +41 -0
- slm/migrations/0028_antenna_replaced_manufacturer_url_radome_replaced_and_more.py +46 -0
- slm/migrations/0029_manufacturer_full_name.py +17 -0
- slm/migrations/0030_alter_antenna_state_alter_radome_state_and_more.py +43 -0
- slm/migrations/__init__.py +0 -0
- slm/migrations/load_satellitesystems.py +27 -0
- slm/models/__init__.py +118 -0
- slm/models/about.py +14 -0
- slm/models/alerts.py +1204 -0
- slm/models/data.py +58 -0
- slm/models/equipment.py +229 -0
- slm/models/help.py +14 -0
- slm/models/index.py +428 -0
- slm/models/sitelog.py +4279 -0
- slm/models/system.py +723 -0
- slm/models/user.py +304 -0
- slm/parsing/__init__.py +786 -0
- slm/parsing/legacy/__init__.py +4 -0
- slm/parsing/legacy/binding.py +817 -0
- slm/parsing/legacy/parser.py +377 -0
- slm/parsing/xsd/__init__.py +34 -0
- slm/parsing/xsd/binding.py +86 -0
- slm/parsing/xsd/geodesyml/0.4/commonTypes.xsd +133 -0
- slm/parsing/xsd/geodesyml/0.4/contact.xsd +29 -0
- slm/parsing/xsd/geodesyml/0.4/dataStreams.xsd +129 -0
- slm/parsing/xsd/geodesyml/0.4/document.xsd +64 -0
- slm/parsing/xsd/geodesyml/0.4/equipment.xsd +427 -0
- slm/parsing/xsd/geodesyml/0.4/fieldMeasurement.xsd +170 -0
- slm/parsing/xsd/geodesyml/0.4/geodesyML.xsd +71 -0
- slm/parsing/xsd/geodesyml/0.4/geodeticEquipment.xsd +343 -0
- slm/parsing/xsd/geodesyml/0.4/geodeticMonument.xsd +147 -0
- slm/parsing/xsd/geodesyml/0.4/lineage.xsd +614 -0
- slm/parsing/xsd/geodesyml/0.4/localInterferences.xsd +131 -0
- slm/parsing/xsd/geodesyml/0.4/measurement.xsd +473 -0
- slm/parsing/xsd/geodesyml/0.4/monumentInfo.xsd +251 -0
- slm/parsing/xsd/geodesyml/0.4/observationSystem.xsd +429 -0
- slm/parsing/xsd/geodesyml/0.4/project.xsd +38 -0
- slm/parsing/xsd/geodesyml/0.4/quality.xsd +176 -0
- slm/parsing/xsd/geodesyml/0.4/referenceFrame.xsd +194 -0
- slm/parsing/xsd/geodesyml/0.4/siteLog.xsd +71 -0
- slm/parsing/xsd/geodesyml/0.5/commonTypes.xsd +133 -0
- slm/parsing/xsd/geodesyml/0.5/contact.xsd +29 -0
- slm/parsing/xsd/geodesyml/0.5/dataStreams.xsd +129 -0
- slm/parsing/xsd/geodesyml/0.5/document.xsd +64 -0
- slm/parsing/xsd/geodesyml/0.5/equipment.xsd +427 -0
- slm/parsing/xsd/geodesyml/0.5/fieldMeasurement.xsd +170 -0
- slm/parsing/xsd/geodesyml/0.5/geodesyML.xsd +71 -0
- slm/parsing/xsd/geodesyml/0.5/geodeticEquipment.xsd +343 -0
- slm/parsing/xsd/geodesyml/0.5/geodeticMonument.xsd +147 -0
- slm/parsing/xsd/geodesyml/0.5/lineage.xsd +614 -0
- slm/parsing/xsd/geodesyml/0.5/localInterferences.xsd +131 -0
- slm/parsing/xsd/geodesyml/0.5/measurement.xsd +473 -0
- slm/parsing/xsd/geodesyml/0.5/monumentInfo.xsd +306 -0
- slm/parsing/xsd/geodesyml/0.5/observationSystem.xsd +429 -0
- slm/parsing/xsd/geodesyml/0.5/project.xsd +38 -0
- slm/parsing/xsd/geodesyml/0.5/quality.xsd +176 -0
- slm/parsing/xsd/geodesyml/0.5/referenceFrame.xsd +194 -0
- slm/parsing/xsd/geodesyml/0.5/siteLog.xsd +73 -0
- slm/parsing/xsd/parser.py +116 -0
- slm/parsing/xsd/resolver.py +28 -0
- slm/receivers/__init__.py +11 -0
- slm/receivers/alerts.py +87 -0
- slm/receivers/cleanup.py +41 -0
- slm/receivers/event_loggers.py +175 -0
- slm/receivers/index.py +67 -0
- slm/settings/__init__.py +55 -0
- slm/settings/auth.py +15 -0
- slm/settings/ckeditor.py +14 -0
- slm/settings/debug.py +47 -0
- slm/settings/internationalization.py +12 -0
- slm/settings/logging.py +113 -0
- slm/settings/platform/__init__.py +0 -0
- slm/settings/platform/darwin.py +10 -0
- slm/settings/rest.py +21 -0
- slm/settings/root.py +152 -0
- slm/settings/routines.py +43 -0
- slm/settings/secrets.py +37 -0
- slm/settings/security.py +5 -0
- slm/settings/slm.py +188 -0
- slm/settings/static_templates.py +53 -0
- slm/settings/templates.py +29 -0
- slm/settings/uploads.py +8 -0
- slm/settings/urls.py +126 -0
- slm/settings/validation.py +196 -0
- slm/signals.py +250 -0
- slm/singleton.py +49 -0
- slm/static/rest_framework/css/bootstrap-tweaks.css +204 -0
- slm/static/rest_framework/css/bootstrap.min.css +7 -0
- slm/static/rest_framework/css/bootstrap.min.css.map +1 -0
- slm/static/rest_framework/css/default.css +82 -0
- slm/static/rest_framework/css/prettify.css +30 -0
- slm/static/rest_framework/docs/css/base.css +344 -0
- slm/static/rest_framework/docs/css/highlight.css +125 -0
- slm/static/rest_framework/docs/css/jquery.json-view.min.css +11 -0
- slm/static/rest_framework/docs/img/favicon.ico +0 -0
- slm/static/rest_framework/docs/img/grid.png +0 -0
- slm/static/rest_framework/docs/js/api.js +321 -0
- slm/static/rest_framework/docs/js/highlight.pack.js +2 -0
- slm/static/rest_framework/docs/js/jquery.json-view.min.js +7 -0
- slm/static/rest_framework/img/grid.png +0 -0
- slm/static/rest_framework/js/ajax-form.js +127 -0
- slm/static/rest_framework/js/bootstrap.bundle.min.js +7 -0
- slm/static/rest_framework/js/bootstrap.bundle.min.js.map +1 -0
- slm/static/rest_framework/js/bootstrap.min.js.map +1 -0
- slm/static/rest_framework/js/coreapi-0.1.1.js +2043 -0
- slm/static/rest_framework/js/csrf.js +52 -0
- slm/static/rest_framework/js/default.js +47 -0
- slm/static/rest_framework/js/jquery-3.5.1.min.js +2 -0
- slm/static/rest_framework/js/prettify-min.js +28 -0
- slm/static/slm/css/admin.css +3 -0
- slm/static/slm/css/defines.css +82 -0
- slm/static/slm/css/forms.css +1 -0
- slm/static/slm/css/style.css +1004 -0
- slm/static/slm/img/email-branding.png +0 -0
- slm/static/slm/img/favicon.ico +0 -0
- slm/static/slm/img/login-bg.jpg +0 -0
- slm/static/slm/img/slm-logo.svg +4 -0
- slm/static/slm/js/autocomplete.js +341 -0
- slm/static/slm/js/enums.js +322 -0
- slm/static/slm/js/fileIcons.js +30 -0
- slm/static/slm/js/form.js +404 -0
- slm/static/slm/js/formWidget.js +23 -0
- slm/static/slm/js/persistable.js +33 -0
- slm/static/slm/js/slm.js +1028 -0
- slm/static/slm/js/time24.js +212 -0
- slm/static_templates/slm/css/defines.css +26 -0
- slm/static_templates/slm/js/enums.js +28 -0
- slm/static_templates/slm/js/fileIcons.js +16 -0
- slm/static_templates/slm/js/urls.js +5 -0
- slm/templates/account/base.html +20 -0
- slm/templates/account/email/base.html +43 -0
- slm/templates/account/email/base_message.txt +7 -0
- slm/templates/account/email/email_confirmation_message.html +16 -0
- slm/templates/account/email/email_confirmation_message.txt +7 -0
- slm/templates/account/email/email_confirmation_signup_message.html +1 -0
- slm/templates/account/email/email_confirmation_signup_message.txt +1 -0
- slm/templates/account/email/email_confirmation_signup_subject.txt +1 -0
- slm/templates/account/email/email_confirmation_subject.txt +4 -0
- slm/templates/account/email/password_reset_key_message.html +28 -0
- slm/templates/account/email/password_reset_key_message.txt +9 -0
- slm/templates/account/email/password_reset_key_subject.txt +4 -0
- slm/templates/account/email/unknown_account_message.html +25 -0
- slm/templates/account/email/unknown_account_message.txt +12 -0
- slm/templates/account/email/unknown_account_subject.txt +4 -0
- slm/templates/account/login.html +67 -0
- slm/templates/account/logout.html +38 -0
- slm/templates/account/password_change.html +48 -0
- slm/templates/account/password_reset.html +51 -0
- slm/templates/account/password_reset_done.html +20 -0
- slm/templates/account/password_reset_from_key.html +52 -0
- slm/templates/account/password_reset_from_key_done.html +17 -0
- slm/templates/admin/base.html +7 -0
- slm/templates/messages.html +8 -0
- slm/templates/rest_framework/README +16 -0
- slm/templates/rest_framework/admin/detail.html +10 -0
- slm/templates/rest_framework/admin/dict_value.html +11 -0
- slm/templates/rest_framework/admin/list.html +32 -0
- slm/templates/rest_framework/admin/list_value.html +11 -0
- slm/templates/rest_framework/admin/simple_list_value.html +2 -0
- slm/templates/rest_framework/admin.html +282 -0
- slm/templates/rest_framework/api.html +3 -0
- slm/templates/rest_framework/base.html +334 -0
- slm/templates/rest_framework/docs/auth/basic.html +42 -0
- slm/templates/rest_framework/docs/auth/session.html +40 -0
- slm/templates/rest_framework/docs/auth/token.html +41 -0
- slm/templates/rest_framework/docs/document.html +37 -0
- slm/templates/rest_framework/docs/error.html +71 -0
- slm/templates/rest_framework/docs/index.html +55 -0
- slm/templates/rest_framework/docs/interact.html +57 -0
- slm/templates/rest_framework/docs/langs/javascript-intro.html +5 -0
- slm/templates/rest_framework/docs/langs/javascript.html +15 -0
- slm/templates/rest_framework/docs/langs/python-intro.html +3 -0
- slm/templates/rest_framework/docs/langs/python.html +13 -0
- slm/templates/rest_framework/docs/langs/shell-intro.html +3 -0
- slm/templates/rest_framework/docs/langs/shell.html +6 -0
- slm/templates/rest_framework/docs/link.html +113 -0
- slm/templates/rest_framework/docs/sidebar.html +78 -0
- slm/templates/rest_framework/filters/base.html +16 -0
- slm/templates/rest_framework/filters/ordering.html +17 -0
- slm/templates/rest_framework/filters/search.html +13 -0
- slm/templates/rest_framework/horizontal/checkbox.html +23 -0
- slm/templates/rest_framework/horizontal/checkbox_multiple.html +32 -0
- slm/templates/rest_framework/horizontal/dict_field.html +11 -0
- slm/templates/rest_framework/horizontal/fieldset.html +16 -0
- slm/templates/rest_framework/horizontal/form.html +6 -0
- slm/templates/rest_framework/horizontal/input.html +21 -0
- slm/templates/rest_framework/horizontal/list_field.html +11 -0
- slm/templates/rest_framework/horizontal/list_fieldset.html +13 -0
- slm/templates/rest_framework/horizontal/radio.html +42 -0
- slm/templates/rest_framework/horizontal/select.html +36 -0
- slm/templates/rest_framework/horizontal/select_multiple.html +38 -0
- slm/templates/rest_framework/horizontal/textarea.html +21 -0
- slm/templates/rest_framework/inline/checkbox.html +8 -0
- slm/templates/rest_framework/inline/checkbox_multiple.html +14 -0
- slm/templates/rest_framework/inline/dict_field.html +9 -0
- slm/templates/rest_framework/inline/fieldset.html +6 -0
- slm/templates/rest_framework/inline/form.html +8 -0
- slm/templates/rest_framework/inline/input.html +9 -0
- slm/templates/rest_framework/inline/list_field.html +9 -0
- slm/templates/rest_framework/inline/list_fieldset.html +3 -0
- slm/templates/rest_framework/inline/radio.html +25 -0
- slm/templates/rest_framework/inline/select.html +24 -0
- slm/templates/rest_framework/inline/select_multiple.html +25 -0
- slm/templates/rest_framework/inline/textarea.html +9 -0
- slm/templates/rest_framework/login.html +3 -0
- slm/templates/rest_framework/login_base.html +65 -0
- slm/templates/rest_framework/pagination/numbers.html +47 -0
- slm/templates/rest_framework/pagination/previous_and_next.html +21 -0
- slm/templates/rest_framework/raw_data_form.html +11 -0
- slm/templates/rest_framework/schema.js +3 -0
- slm/templates/rest_framework/vertical/checkbox.html +16 -0
- slm/templates/rest_framework/vertical/checkbox_multiple.html +30 -0
- slm/templates/rest_framework/vertical/dict_field.html +7 -0
- slm/templates/rest_framework/vertical/fieldset.html +13 -0
- slm/templates/rest_framework/vertical/form.html +6 -0
- slm/templates/rest_framework/vertical/input.html +17 -0
- slm/templates/rest_framework/vertical/list_field.html +7 -0
- slm/templates/rest_framework/vertical/list_fieldset.html +7 -0
- slm/templates/rest_framework/vertical/radio.html +40 -0
- slm/templates/rest_framework/vertical/select.html +34 -0
- slm/templates/rest_framework/vertical/select_multiple.html +31 -0
- slm/templates/rest_framework/vertical/textarea.html +17 -0
- slm/templates/slm/about.html +21 -0
- slm/templates/slm/alerts/alert.html +15 -0
- slm/templates/slm/alerts/geodesymlinvalid.html +8 -0
- slm/templates/slm/alerts/importalert.html +10 -0
- slm/templates/slm/alerts.html +18 -0
- slm/templates/slm/auth_menu.html +41 -0
- slm/templates/slm/base.html +195 -0
- slm/templates/slm/emails/alert_issued.html +31 -0
- slm/templates/slm/emails/alert_issued.txt +9 -0
- slm/templates/slm/emails/base.html +6 -0
- slm/templates/slm/emails/changes_rejected.txt +7 -0
- slm/templates/slm/emails/review_requested.txt +7 -0
- slm/templates/slm/forms/widgets/auto_complete.html +21 -0
- slm/templates/slm/forms/widgets/auto_complete_multiple.html +18 -0
- slm/templates/slm/forms/widgets/checkbox_multiple.html +6 -0
- slm/templates/slm/forms/widgets/inline_multi.html +1 -0
- slm/templates/slm/forms/widgets/splitdatetime.html +14 -0
- slm/templates/slm/forms/widgets/time24.html +37 -0
- slm/templates/slm/help.html +54 -0
- slm/templates/slm/messages.html +13 -0
- slm/templates/slm/new_site.html +88 -0
- slm/templates/slm/profile.html +57 -0
- slm/templates/slm/register.html +40 -0
- slm/templates/slm/reports/file_log.html +43 -0
- slm/templates/slm/reports/head_log.html +23 -0
- slm/templates/slm/reports/head_report.html +55 -0
- slm/templates/slm/reports/index_log.html +23 -0
- slm/templates/slm/reports/index_report.html +71 -0
- slm/templates/slm/station/alert.html +8 -0
- slm/templates/slm/station/alerts.html +19 -0
- slm/templates/slm/station/base.html +104 -0
- slm/templates/slm/station/download.html +87 -0
- slm/templates/slm/station/edit.html +283 -0
- slm/templates/slm/station/form.html +110 -0
- slm/templates/slm/station/log.html +18 -0
- slm/templates/slm/station/review.html +461 -0
- slm/templates/slm/station/upload.html +295 -0
- slm/templates/slm/station/uploads/attachment.html +20 -0
- slm/templates/slm/station/uploads/geodesyml.html +1 -0
- slm/templates/slm/station/uploads/image.html +27 -0
- slm/templates/slm/station/uploads/json.html +0 -0
- slm/templates/slm/station/uploads/legacy.html +77 -0
- slm/templates/slm/top_nav.html +14 -0
- slm/templates/slm/user_activity.html +16 -0
- slm/templates/slm/widgets/alert_scroll.html +135 -0
- slm/templates/slm/widgets/filelist.html +258 -0
- slm/templates/slm/widgets/legend.html +12 -0
- slm/templates/slm/widgets/log_scroll.html +88 -0
- slm/templates/slm/widgets/stationlist.html +233 -0
- slm/templatetags/__init__.py +0 -0
- slm/templatetags/jinja2.py +9 -0
- slm/templatetags/slm.py +459 -0
- slm/urls.py +148 -0
- slm/utils.py +299 -0
- slm/validators.py +297 -0
- slm/views.py +654 -0
- slm/widgets.py +134 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{% if location -%}
|
|
2
|
+
<geo:SiteLocation gml:id="site-location">
|
|
3
|
+
<geo:city>{{ location.city }}</geo:city>
|
|
4
|
+
<geo:state>{{ location.state }}</geo:state>
|
|
5
|
+
<geo:countryCodeISO codeList="http://xml.gov.au/icsm/geodesyml/codelists/country-codes-codelist.xml#GeodesyML_CountryCode" codeListValue="AUS" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.5">{{ location.country|enum_str }}</geo:countryCodeISO>
|
|
6
|
+
<geo:tectonicPlate codeSpace="urn:ga-gov-au:plate-type">{{ location.tectonic|enum_str|upper }}</geo:tectonicPlate>
|
|
7
|
+
<geo:approximatePositionITRF>
|
|
8
|
+
<geo:cartesianPosition>
|
|
9
|
+
<gml:Point gml:id="itrf_cartesian">
|
|
10
|
+
<gml:pos srsName="EPSG:7789">{{ location.xyz.0|precision(4) }} {{ location.xyz.1|precision(4) }} {{ location.xyz.2|precision(4) }}</gml:pos>
|
|
11
|
+
</gml:Point>
|
|
12
|
+
</geo:cartesianPosition>
|
|
13
|
+
<geo:geodeticPosition>
|
|
14
|
+
<gml:Point gml:id="itrf_geodetic">
|
|
15
|
+
<gml:pos srsName="EPSG:7912">{{ location.llh.0|epsg7912(10) }} {{ location.llh.1|epsg7912(10) }} {{ location.llh2|precision(4) }}</gml:pos>
|
|
16
|
+
</gml:Point>
|
|
17
|
+
</geo:geodeticPosition>
|
|
18
|
+
</geo:approximatePositionITRF>
|
|
19
|
+
<geo:notes>{{ identification.additional_information }}</geo:notes>
|
|
20
|
+
</geo:SiteLocation>
|
|
21
|
+
{%- endif %}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<geo:SurveyedLocalTie gml:id="local-tie-{{ count }}">
|
|
2
|
+
<geo:tiedMarkerName>{{ tie.name }}</geo:tiedMarkerName>
|
|
3
|
+
<geo:tiedMarkerUsage>{{ tie.usage }}</geo:tiedMarkerUsage>
|
|
4
|
+
<geo:tiedMarkerCDPNumber>{{ tie.cdp_number }}</geo:tiedMarkerCDPNumber>
|
|
5
|
+
<geo:tiedMarkerDOMESNumber>{{ tie.domes_number }}</geo:tiedMarkerDOMESNumber>
|
|
6
|
+
{% if tie.diff_xyz is none %}
|
|
7
|
+
<geo:differentialComponentsGNSSMarkerToTiedMonumentITRS xsi:nil="true"/>
|
|
8
|
+
{% else %}
|
|
9
|
+
<geo:differentialComponentsGNSSMarkerToTiedMonumentITRS>
|
|
10
|
+
<geo:dx>{{ tie.diff_xyz.0 }}</geo:dx>
|
|
11
|
+
<geo:dy>{{ tie.diff_xyz.1 }}</geo:dy>
|
|
12
|
+
<geo:dz>{{ tie.diff_xyz.2 }}</geo:dz>
|
|
13
|
+
</geo:differentialComponentsGNSSMarkerToTiedMonumentITRS>
|
|
14
|
+
{% endif %}
|
|
15
|
+
<geo:localSiteTiesAccuracy{% if tie.accuracy is none %} xsi:nil="true"{% endif %}>{{ tie.accuracy|precision(1) }}</geo:localSiteTiesAccuracy>
|
|
16
|
+
<geo:surveyMethod>{{ tie.survey_method }}</geo:surveyMethod>
|
|
17
|
+
<geo:dateMeasured>{{ tie.measured|iso_utc_full }}</geo:dateMeasured>
|
|
18
|
+
{% if tie.additional_information %}<geo:notes>{{ tie.additional_information }}</geo:notes>{% endif %}
|
|
19
|
+
</geo:SurveyedLocalTie>
|
|
20
|
+
<geo:dateInserted>{{ tie.inserted|iso_utc_full }}</geo:dateInserted>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{% set sensor_tag='TemperatureSensor' %}
|
|
2
|
+
{% set sensor_id="temperature-sensor" %}
|
|
3
|
+
{% extends "slm/sitelog/xsd/0.4/sensor.xml" %}
|
|
4
|
+
{% block sensor %}
|
|
5
|
+
{{ super() }}
|
|
6
|
+
{% block section %}
|
|
7
|
+
<geo:type codeSpace="urn:ga-gov-au:temperature-sensor-type">{{ sensor.model }}</geo:type>
|
|
8
|
+
{{ super() }}
|
|
9
|
+
<geo:dataSamplingInterval>{{ sensor.sampling_interval|none2empty }}</geo:dataSamplingInterval>
|
|
10
|
+
<geo:accuracy-degreesCelcius>{{ sensor.accuracy|precision(1) }}</geo:accuracy-degreesCelcius>
|
|
11
|
+
<geo:aspiration>{{ sensor.aspiration|enum_str|upper }}</geo:aspiration>
|
|
12
|
+
{% endblock section %}
|
|
13
|
+
{% endblock sensor %}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% set sensor_tag='WaterVaporSensor' %}
|
|
2
|
+
{% set sensor_id="water-vapor-sensor" %}
|
|
3
|
+
{% extends "slm/sitelog/xsd/0.4/sensor.xml" %}
|
|
4
|
+
{% block sensor %}
|
|
5
|
+
{{ super() }}
|
|
6
|
+
{% block section %}
|
|
7
|
+
<geo:type codeSpace="urn:ga-gov-au:water-vapor-sensor-type">{{ sensor.model }}</geo:type>
|
|
8
|
+
{{ super() }}
|
|
9
|
+
<geo:distanceToAntenna>{{ sensor.distance_to_antenna|none2empty }}</geo:distanceToAntenna>
|
|
10
|
+
{% endblock section %}
|
|
11
|
+
{% endblock sensor %}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<geo:Document gml:id="file-{{ file.id }}">
|
|
2
|
+
{% if file.description %}<gml:description>{{ file.description }}</gml:description>{% endif %}
|
|
3
|
+
{% if file.name %}<gml:name>{{ file.name }}</gml:name>{% endif %}
|
|
4
|
+
<geo:type>{{ file.file_type.type }}</geo:type>
|
|
5
|
+
{% if file.created is not none %}<geo:createdDate>{{ file.created|iso_utc_full }}</geo:createdDate>{% endif %}
|
|
6
|
+
{% if file.timestamp is not none %}<geo:receivedDate>{{ file.timestamp|iso_utc_full }}</geo:receivedDate>{% endif %}
|
|
7
|
+
<geo:body>
|
|
8
|
+
<geo:fileReference xlink:href="{{ file.link|file_url }}"/>
|
|
9
|
+
</geo:body>
|
|
10
|
+
</geo:Document>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<geo:GeodesyML gml:id="{{ site.name }}" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:geo="urn:xml-gov-au:icsm:egeodesy:0.4" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
3
|
+
<geo:siteLog gml:id="{{ identifier }}">
|
|
4
|
+
{% include "slm/sitelog/xsd/0.4/formInformation.xml" %}
|
|
5
|
+
{% include "slm/sitelog/xsd/0.4/siteIdentification.xml" %}
|
|
6
|
+
{% include "slm/sitelog/xsd/0.4/siteLocation.xml" %}
|
|
7
|
+
{% for rcvr in receiver %}
|
|
8
|
+
<geo:gnssReceiver>
|
|
9
|
+
{% with rcvr=rcvr, count=loop.index %}{% include "slm/sitelog/xsd/0.4/gnssReceiver.xml" %}{% endwith %}
|
|
10
|
+
</geo:gnssReceiver>
|
|
11
|
+
{% endfor %}
|
|
12
|
+
{% for ant in antenna %}
|
|
13
|
+
<geo:gnssAntenna>
|
|
14
|
+
{% with ant=ant, count=loop.index %}{% include "slm/sitelog/xsd/0.4/gnssAntenna.xml" %}{% endwith %}
|
|
15
|
+
</geo:gnssAntenna>
|
|
16
|
+
{% endfor %}
|
|
17
|
+
{% for tie in surveyedlocalties %}
|
|
18
|
+
<geo:surveyedLocalTie>
|
|
19
|
+
{% with tie=tie, count=loop.index %}{% include "slm/sitelog/xsd/0.4/surveyedLocalTie.xml" %}{% endwith %}
|
|
20
|
+
</geo:surveyedLocalTie>
|
|
21
|
+
{% endfor %}
|
|
22
|
+
{% for standard in frequencystandard %}
|
|
23
|
+
<geo:frequencyStandard>
|
|
24
|
+
{% with standard=standard, count=loop.index %}{% include "slm/sitelog/xsd/0.4/frequencyStandard.xml" %}{% endwith %}
|
|
25
|
+
</geo:frequencyStandard>
|
|
26
|
+
{% endfor %}
|
|
27
|
+
{% for colloc in collocation %}
|
|
28
|
+
<geo:collocationInformation>
|
|
29
|
+
{% with colloc=colloc, count=loop.index %}{% include "slm/sitelog/xsd/0.4/collocationInformation.xml" %}{% endwith %}
|
|
30
|
+
</geo:collocationInformation>
|
|
31
|
+
{% endfor %}
|
|
32
|
+
{% for sensor in humiditysensor %}
|
|
33
|
+
<geo:humiditySensor>
|
|
34
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/humiditySensor.xml" %}{% endwith %}
|
|
35
|
+
</geo:humiditySensor>
|
|
36
|
+
{% endfor %}
|
|
37
|
+
{% for sensor in pressuresensor %}
|
|
38
|
+
<geo:pressureSensor>
|
|
39
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/pressureSensor.xml" %}{% endwith %}
|
|
40
|
+
</geo:pressureSensor>
|
|
41
|
+
{% endfor %}
|
|
42
|
+
{% for sensor in temperaturesensor %}
|
|
43
|
+
<geo:temperatureSensor>
|
|
44
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/temperatureSensor.xml" %}{% endwith %}
|
|
45
|
+
</geo:temperatureSensor>
|
|
46
|
+
{% endfor %}
|
|
47
|
+
{% for sensor in watervaporradiometer %}
|
|
48
|
+
<geo:waterVaporSensor>
|
|
49
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/waterVaporSensor.xml" %}{% endwith %}
|
|
50
|
+
</geo:waterVaporSensor>
|
|
51
|
+
{% endfor %}
|
|
52
|
+
{% for instrument in otherinstrumentation %}
|
|
53
|
+
<geo:otherInstrumentation>
|
|
54
|
+
{% with instrument=instrument, count=loop.index %}{% include "slm/sitelog/xsd/0.4/otherInstrumentation.xml" %}{% endwith %}
|
|
55
|
+
</geo:otherInstrumentation>
|
|
56
|
+
{% endfor %}
|
|
57
|
+
{% for condition in radiointerferences %}
|
|
58
|
+
<geo:radioInterference>
|
|
59
|
+
{% with condition=condition, count=loop.index %}{% include "slm/sitelog/xsd/0.4/radioInterference.xml" %}{% endwith %}
|
|
60
|
+
</geo:radioInterference>
|
|
61
|
+
{% endfor %}
|
|
62
|
+
{% for condition in multipathsources %}
|
|
63
|
+
<geo:multipathSource>
|
|
64
|
+
{% with condition=condition, count=loop.index %}{% include "slm/sitelog/xsd/0.4/multipathSource.xml" %}{% endwith %}
|
|
65
|
+
</geo:multipathSource>
|
|
66
|
+
{% endfor %}
|
|
67
|
+
{% for condition in signalobstructions %}
|
|
68
|
+
<geo:signalObstruction>
|
|
69
|
+
{% with condition=condition, count=loop.index %}{% include "slm/sitelog/xsd/0.4/signalObstruction.xml" %}{% endwith %}
|
|
70
|
+
</geo:signalObstruction>
|
|
71
|
+
{% endfor %}
|
|
72
|
+
{% for effect in localepisodiceffects %}
|
|
73
|
+
<geo:localEpisodicEffect>
|
|
74
|
+
{% with effect=effect, count=loop.index %}{% include "slm/sitelog/xsd/0.4/localEpisodicEffect.xml" %}{% endwith %}
|
|
75
|
+
</geo:localEpisodicEffect>
|
|
76
|
+
{% endfor %}
|
|
77
|
+
{% if responsibleagency|contact("primary") %}
|
|
78
|
+
<geo:siteOwner gml:id="site-owner">
|
|
79
|
+
{% with agency=responsibleagency, contact=responsibleagency|contact("primary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
80
|
+
</geo:siteOwner>
|
|
81
|
+
{% endif %}
|
|
82
|
+
{% if responsibleagency|contact("secondary") %}
|
|
83
|
+
<geo:siteContact gml:id="site-contact-1">
|
|
84
|
+
{% with agency=responsibleagency, contact=responsibleagency|contact("secondary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
85
|
+
</geo:siteContact>
|
|
86
|
+
{% endif %}
|
|
87
|
+
{% if operationalcontact|contact("secondary") %}
|
|
88
|
+
<geo:siteContact gml:id="site-contact-2">
|
|
89
|
+
{% with agency=operationalcontact, contact=operationalcontact|contact("secondary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
90
|
+
</geo:siteContact>
|
|
91
|
+
{% endif %}
|
|
92
|
+
<geo:siteMetadataCustodian gml:id="site-metadata-custodian">
|
|
93
|
+
{% with agency=operationalcontact, contact=operationalcontact|contact("primary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
94
|
+
</geo:siteMetadataCustodian>
|
|
95
|
+
{% if moreinformation %}
|
|
96
|
+
{% with moreinformation=moreinformation %}{% include "slm/sitelog/xsd/0.4/moreInformation.xml" %}{% endwith %}
|
|
97
|
+
{% endif %}
|
|
98
|
+
</geo:siteLog>
|
|
99
|
+
</geo:GeodesyML>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<geo:GeodesyML gml:id="{{ site.name }}" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:geo="urn:xml-gov-au:icsm:egeodesy:0.5" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
3
|
+
<geo:siteLog gml:id="{{ identifier }}">
|
|
4
|
+
<geo:formInformation>
|
|
5
|
+
{% include "slm/sitelog/xsd/0.4/formInformation.xml" %}
|
|
6
|
+
</geo:formInformation>
|
|
7
|
+
<geo:siteIdentification>
|
|
8
|
+
{% include "slm/sitelog/xsd/0.4/siteIdentification.xml" %}
|
|
9
|
+
</geo:siteIdentification>
|
|
10
|
+
<geo:siteLocation>
|
|
11
|
+
{% include "slm/sitelog/xsd/0.4/siteLocation.xml" %}
|
|
12
|
+
</geo:siteLocation>
|
|
13
|
+
{% for rcvr in receiver %}
|
|
14
|
+
<geo:gnssReceiver>
|
|
15
|
+
{% with rcvr=rcvr, count=loop.index %}{% include "slm/sitelog/xsd/0.4/gnssReceiver.xml" %}{% endwith %}
|
|
16
|
+
</geo:gnssReceiver>
|
|
17
|
+
{% endfor %}
|
|
18
|
+
{% for ant in antenna %}
|
|
19
|
+
<geo:gnssAntenna>
|
|
20
|
+
{% with ant=ant, count=loop.index %}{% include "slm/sitelog/xsd/0.4/gnssAntenna.xml" %}{% endwith %}
|
|
21
|
+
</geo:gnssAntenna>
|
|
22
|
+
{% endfor %}
|
|
23
|
+
{% for tie in surveyedlocalties %}
|
|
24
|
+
<geo:surveyedLocalTie>
|
|
25
|
+
{% with tie=tie, count=loop.index %}{% include "slm/sitelog/xsd/0.4/surveyedLocalTie.xml" %}{% endwith %}
|
|
26
|
+
</geo:surveyedLocalTie>
|
|
27
|
+
{% endfor %}
|
|
28
|
+
{% for standard in frequencystandard %}
|
|
29
|
+
<geo:frequencyStandard>
|
|
30
|
+
{% with standard=standard, count=loop.index %}{% include "slm/sitelog/xsd/0.4/frequencyStandard.xml" %}{% endwith %}
|
|
31
|
+
</geo:frequencyStandard>
|
|
32
|
+
{% endfor %}
|
|
33
|
+
{% for colloc in collocation %}
|
|
34
|
+
<geo:collocationInformation>
|
|
35
|
+
{% with colloc=colloc, count=loop.index %}{% include "slm/sitelog/xsd/0.4/collocationInformation.xml" %}{% endwith %}
|
|
36
|
+
</geo:collocationInformation>
|
|
37
|
+
{% endfor %}
|
|
38
|
+
{% for sensor in humiditysensor %}
|
|
39
|
+
<geo:humiditySensor>
|
|
40
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/humiditySensor.xml" %}{% endwith %}
|
|
41
|
+
</geo:humiditySensor>
|
|
42
|
+
{% endfor %}
|
|
43
|
+
{% for sensor in pressuresensor %}
|
|
44
|
+
<geo:pressureSensor>
|
|
45
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/pressureSensor.xml" %}{% endwith %}
|
|
46
|
+
</geo:pressureSensor>
|
|
47
|
+
{% endfor %}
|
|
48
|
+
{% for sensor in temperaturesensor %}
|
|
49
|
+
<geo:temperatureSensor>
|
|
50
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/temperatureSensor.xml" %}{% endwith %}
|
|
51
|
+
</geo:temperatureSensor>
|
|
52
|
+
{% endfor %}
|
|
53
|
+
{% for sensor in watervaporradiometer %}
|
|
54
|
+
<geo:waterVaporSensor>
|
|
55
|
+
{% with sensor=sensor, count=loop.index %}{% include "slm/sitelog/xsd/0.4/waterVaporSensor.xml" %}{% endwith %}
|
|
56
|
+
</geo:waterVaporSensor>
|
|
57
|
+
{% endfor %}
|
|
58
|
+
{% for instrument in otherinstrumentation %}
|
|
59
|
+
<geo:otherInstrumentation>
|
|
60
|
+
{% with instrument=instrument, count=loop.index %}{% include "slm/sitelog/xsd/0.4/otherInstrumentation.xml" %}{% endwith %}
|
|
61
|
+
</geo:otherInstrumentation>
|
|
62
|
+
{% endfor %}
|
|
63
|
+
{% for condition in radiointerferences %}
|
|
64
|
+
<geo:radioInterference>
|
|
65
|
+
{% with condition=condition, count=loop.index %}{% include "slm/sitelog/xsd/0.4/radioInterference.xml" %}{% endwith %}
|
|
66
|
+
</geo:radioInterference>
|
|
67
|
+
{% endfor %}
|
|
68
|
+
{% for condition in multipathsources %}
|
|
69
|
+
<geo:multipathSource>
|
|
70
|
+
{% with condition=condition, count=loop.index %}{% include "slm/sitelog/xsd/0.4/multipathSource.xml" %}{% endwith %}
|
|
71
|
+
</geo:multipathSource>
|
|
72
|
+
{% endfor %}
|
|
73
|
+
{% for condition in signalobstructions %}
|
|
74
|
+
<geo:signalObstruction>
|
|
75
|
+
{% with condition=condition, count=loop.index %}{% include "slm/sitelog/xsd/0.4/signalObstruction.xml" %}{% endwith %}
|
|
76
|
+
</geo:signalObstruction>
|
|
77
|
+
{% endfor %}
|
|
78
|
+
{% for effect in localepisodiceffects %}
|
|
79
|
+
<geo:localEpisodicEffect>
|
|
80
|
+
{% with effect=effect, count=loop.index %}{% include "slm/sitelog/xsd/0.4/localEpisodicEffect.xml" %}{% endwith %}
|
|
81
|
+
</geo:localEpisodicEffect>
|
|
82
|
+
{% endfor %}
|
|
83
|
+
{% if responsibleagency|contact("primary") %}
|
|
84
|
+
<geo:siteOwner gml:id="site-owner">
|
|
85
|
+
{% with agency=responsibleagency, contact=responsibleagency|contact("primary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
86
|
+
</geo:siteOwner>
|
|
87
|
+
{% endif %}
|
|
88
|
+
{% if responsibleagency|contact("secondary") %}
|
|
89
|
+
<geo:siteContact gml:id="site-contact-1">
|
|
90
|
+
{% with agency=responsibleagency, contact=responsibleagency|contact("secondary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
91
|
+
</geo:siteContact>
|
|
92
|
+
{% endif %}
|
|
93
|
+
{% if operationalcontact|contact("secondary") %}
|
|
94
|
+
<geo:siteContact gml:id="site-contact-2">
|
|
95
|
+
{% with agency=operationalcontact, contact=operationalcontact|contact("secondary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
96
|
+
</geo:siteContact>
|
|
97
|
+
{% endif %}
|
|
98
|
+
<geo:siteMetadataCustodian gml:id="site-metadata-custodian">
|
|
99
|
+
{% with agency=operationalcontact, contact=operationalcontact|contact("primary"), role_code="pointOfContact" %}{% include "slm/sitelog/xsd/0.4/contact.xml" %}{% endwith %}
|
|
100
|
+
</geo:siteMetadataCustodian>
|
|
101
|
+
{% if moreinformation %}
|
|
102
|
+
<geo:moreInformation>
|
|
103
|
+
{% with moreinformation=moreinformation %}{% include "slm/sitelog/xsd/0.4/moreInformation.xml" %}{% endwith %}
|
|
104
|
+
</geo:moreInformation>
|
|
105
|
+
{% endif %}
|
|
106
|
+
{% for file in files %}
|
|
107
|
+
<geo:associatedDocument>
|
|
108
|
+
{% with file=file, count=loop.index %}{% include "slm/sitelog/xsd/0.5/document.xml" %}{% endwith %}
|
|
109
|
+
</geo:associatedDocument>
|
|
110
|
+
{% endfor %}
|
|
111
|
+
</geo:siteLog>
|
|
112
|
+
</geo:GeodesyML>
|
|
File without changes
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import typing as t
|
|
2
|
+
from enum import Enum
|
|
3
|
+
|
|
4
|
+
from click import Context, Parameter, ParamType
|
|
5
|
+
from click.shell_completion import CompletionItem
|
|
6
|
+
from django.core.management import CommandError
|
|
7
|
+
from django.utils.translation import gettext as _
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EnumParser(ParamType):
|
|
11
|
+
enum: t.Type[Enum]
|
|
12
|
+
field: str = "value"
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def __name__(self):
|
|
16
|
+
return self.enum.__name__
|
|
17
|
+
|
|
18
|
+
def __init__(self, enum: t.Type[Enum], field: str = field):
|
|
19
|
+
self.enum = enum
|
|
20
|
+
self.field = field
|
|
21
|
+
|
|
22
|
+
def convert(
|
|
23
|
+
self, value: t.Any, param: t.Optional[Parameter], ctx: t.Optional[Context]
|
|
24
|
+
):
|
|
25
|
+
"""
|
|
26
|
+
Convert a given value to the Enumeration type.
|
|
27
|
+
"""
|
|
28
|
+
# we have to return the value because typer also registers a converter for
|
|
29
|
+
# any enum type parameter that expects a value to be passed in. This is a
|
|
30
|
+
# design flaw in typer - should use an isinstance test before bailing
|
|
31
|
+
if isinstance(value, self.enum):
|
|
32
|
+
return value.value
|
|
33
|
+
try:
|
|
34
|
+
for en in self.enum:
|
|
35
|
+
if str(getattr(en, self.field)) == value:
|
|
36
|
+
return en.value
|
|
37
|
+
return self.enum(value).value
|
|
38
|
+
except ValueError as err:
|
|
39
|
+
raise CommandError(
|
|
40
|
+
_("{value} is not a valid {param}").format(
|
|
41
|
+
value=value, param=param.name
|
|
42
|
+
)
|
|
43
|
+
) from err
|
|
44
|
+
|
|
45
|
+
def shell_complete(
|
|
46
|
+
self, ctx: "Context", param: "Parameter", incomplete: str
|
|
47
|
+
) -> t.List["CompletionItem"]:
|
|
48
|
+
completions = []
|
|
49
|
+
for en in self.enum:
|
|
50
|
+
str_val = str(getattr(en, self.field))
|
|
51
|
+
if str_val.startswith(incomplete):
|
|
52
|
+
completions.append(CompletionItem(str_val))
|
|
53
|
+
return completions
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Under normal operations, each time a station's information is published, a new point
|
|
3
|
+
in time index is created and logs are serialized in all of the supported formats at
|
|
4
|
+
that index. If for whatever reason, those logs were not generated or the indexed
|
|
5
|
+
archived of site logs becomes stale you may run this command to generate indexed site
|
|
6
|
+
log files of the specified formats.
|
|
7
|
+
|
|
8
|
+
.. warning::
|
|
9
|
+
|
|
10
|
+
This will not regenerate the historical index, but only files from the current
|
|
11
|
+
database state.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import typing as t
|
|
15
|
+
from django.db import transaction
|
|
16
|
+
from django.utils.translation import gettext as _
|
|
17
|
+
from django_typer.management import TyperCommand
|
|
18
|
+
from django_typer.completers import these_strings
|
|
19
|
+
from tqdm import tqdm
|
|
20
|
+
from typer import Option
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
|
|
23
|
+
from slm.defines import SiteLogStatus, SiteLogFormat
|
|
24
|
+
from slm.models import ArchiveIndex, Site
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Command(TyperCommand):
|
|
28
|
+
help = _(
|
|
29
|
+
"Update the site index from the current data. This will generate new "
|
|
30
|
+
"serialized files for all published data that is not up to date in the "
|
|
31
|
+
"index of archived site log files."
|
|
32
|
+
)
|
|
33
|
+
suppressed_base_arguments = {
|
|
34
|
+
*TyperCommand.suppressed_base_arguments,
|
|
35
|
+
"version",
|
|
36
|
+
"pythonpath",
|
|
37
|
+
"settings",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
formats: t.List[t.Union[str, SiteLogFormat]] = list(
|
|
41
|
+
set([fmt.ext for fmt in SiteLogFormat])
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def handle(
|
|
45
|
+
self,
|
|
46
|
+
rebuild: Annotated[
|
|
47
|
+
bool,
|
|
48
|
+
Option(
|
|
49
|
+
"--rebuild",
|
|
50
|
+
help="Clear the existing index first. WARNING: cannot be undone.",
|
|
51
|
+
),
|
|
52
|
+
] = False,
|
|
53
|
+
formats: Annotated[
|
|
54
|
+
t.List[
|
|
55
|
+
str
|
|
56
|
+
], # list of SiteLogFormat's does not work for some upstream reason
|
|
57
|
+
Option(
|
|
58
|
+
"--format",
|
|
59
|
+
metavar="FORMAT",
|
|
60
|
+
help=_("Only import any site logs of the specified format(s)."),
|
|
61
|
+
shell_complete=these_strings(set([fmt.ext for fmt in SiteLogFormat])),
|
|
62
|
+
),
|
|
63
|
+
] = formats,
|
|
64
|
+
):
|
|
65
|
+
self.formats = [SiteLogFormat(fmt) for fmt in formats]
|
|
66
|
+
if SiteLogFormat.LEGACY in self.formats:
|
|
67
|
+
self.formats.insert(0, SiteLogFormat.ASCII_9CHAR)
|
|
68
|
+
|
|
69
|
+
with transaction.atomic():
|
|
70
|
+
|
|
71
|
+
def yes(ipt):
|
|
72
|
+
return ipt.lower() in {"y", "yes", "true", "continue"}
|
|
73
|
+
|
|
74
|
+
if rebuild:
|
|
75
|
+
if yes(
|
|
76
|
+
input(
|
|
77
|
+
_(
|
|
78
|
+
"WARNING: this will delete the current index. This cannot "
|
|
79
|
+
"be undone if you do not have an external archive! "
|
|
80
|
+
"Proceed? (Y/N): "
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
):
|
|
84
|
+
ArchiveIndex.objects.all().delete()
|
|
85
|
+
else:
|
|
86
|
+
return
|
|
87
|
+
|
|
88
|
+
sites = Site.objects.public().filter(status=SiteLogStatus.PUBLISHED)
|
|
89
|
+
# build from current data
|
|
90
|
+
with tqdm(
|
|
91
|
+
total=sites.count(), desc="Indexing", unit="sites", postfix={"site": ""}
|
|
92
|
+
) as p_bar:
|
|
93
|
+
for site in sites:
|
|
94
|
+
p_bar.set_postfix({"site": site.name})
|
|
95
|
+
ArchiveIndex.objects.add_index(site=site, formats=self.formats)
|
|
96
|
+
p_bar.update(n=1)
|