geovisio 2.9.0__py3-none-any.whl → 2.10.0__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 (65) hide show
  1. geovisio/__init__.py +6 -1
  2. geovisio/config_app.py +5 -5
  3. geovisio/translations/ar/LC_MESSAGES/messages.mo +0 -0
  4. geovisio/translations/ar/LC_MESSAGES/messages.po +818 -0
  5. geovisio/translations/br/LC_MESSAGES/messages.po +1 -1
  6. geovisio/translations/da/LC_MESSAGES/messages.mo +0 -0
  7. geovisio/translations/da/LC_MESSAGES/messages.po +4 -3
  8. geovisio/translations/de/LC_MESSAGES/messages.mo +0 -0
  9. geovisio/translations/de/LC_MESSAGES/messages.po +55 -2
  10. geovisio/translations/el/LC_MESSAGES/messages.po +1 -1
  11. geovisio/translations/en/LC_MESSAGES/messages.mo +0 -0
  12. geovisio/translations/en/LC_MESSAGES/messages.po +193 -139
  13. geovisio/translations/eo/LC_MESSAGES/messages.mo +0 -0
  14. geovisio/translations/eo/LC_MESSAGES/messages.po +53 -4
  15. geovisio/translations/es/LC_MESSAGES/messages.po +1 -1
  16. geovisio/translations/fi/LC_MESSAGES/messages.po +1 -1
  17. geovisio/translations/fr/LC_MESSAGES/messages.mo +0 -0
  18. geovisio/translations/fr/LC_MESSAGES/messages.po +91 -3
  19. geovisio/translations/hu/LC_MESSAGES/messages.po +1 -1
  20. geovisio/translations/it/LC_MESSAGES/messages.mo +0 -0
  21. geovisio/translations/it/LC_MESSAGES/messages.po +63 -3
  22. geovisio/translations/ja/LC_MESSAGES/messages.po +1 -1
  23. geovisio/translations/ko/LC_MESSAGES/messages.po +1 -1
  24. geovisio/translations/messages.pot +185 -129
  25. geovisio/translations/nl/LC_MESSAGES/messages.mo +0 -0
  26. geovisio/translations/nl/LC_MESSAGES/messages.po +292 -63
  27. geovisio/translations/oc/LC_MESSAGES/messages.mo +0 -0
  28. geovisio/translations/oc/LC_MESSAGES/messages.po +818 -0
  29. geovisio/translations/pl/LC_MESSAGES/messages.po +1 -1
  30. geovisio/translations/sv/LC_MESSAGES/messages.mo +0 -0
  31. geovisio/translations/sv/LC_MESSAGES/messages.po +4 -3
  32. geovisio/translations/ti/LC_MESSAGES/messages.mo +0 -0
  33. geovisio/translations/ti/LC_MESSAGES/messages.po +762 -0
  34. geovisio/translations/zh_Hant/LC_MESSAGES/messages.po +1 -1
  35. geovisio/utils/annotations.py +14 -17
  36. geovisio/utils/auth.py +14 -13
  37. geovisio/utils/cql2.py +2 -2
  38. geovisio/utils/fields.py +14 -2
  39. geovisio/utils/items.py +44 -0
  40. geovisio/utils/model_query.py +2 -2
  41. geovisio/utils/pic_shape.py +1 -1
  42. geovisio/utils/pictures.py +111 -18
  43. geovisio/utils/semantics.py +32 -3
  44. geovisio/utils/sentry.py +1 -1
  45. geovisio/utils/sequences.py +51 -34
  46. geovisio/utils/upload_set.py +285 -198
  47. geovisio/utils/website.py +1 -1
  48. geovisio/web/annotations.py +209 -68
  49. geovisio/web/auth.py +1 -1
  50. geovisio/web/collections.py +26 -22
  51. geovisio/web/configuration.py +24 -4
  52. geovisio/web/docs.py +93 -11
  53. geovisio/web/items.py +197 -121
  54. geovisio/web/params.py +44 -31
  55. geovisio/web/pictures.py +34 -0
  56. geovisio/web/tokens.py +49 -1
  57. geovisio/web/upload_set.py +150 -32
  58. geovisio/web/users.py +4 -4
  59. geovisio/web/utils.py +2 -2
  60. geovisio/workers/runner_pictures.py +128 -23
  61. {geovisio-2.9.0.dist-info → geovisio-2.10.0.dist-info}/METADATA +13 -13
  62. geovisio-2.10.0.dist-info/RECORD +105 -0
  63. geovisio-2.9.0.dist-info/RECORD +0 -98
  64. {geovisio-2.9.0.dist-info → geovisio-2.10.0.dist-info}/WHEEL +0 -0
  65. {geovisio-2.9.0.dist-info → geovisio-2.10.0.dist-info}/licenses/LICENSE +0 -0
geovisio/web/docs.py CHANGED
@@ -1,4 +1,4 @@
1
- from geovisio.web import collections, items, prepare, users, utils, upload_set, reports, excluded_areas, pages
1
+ from geovisio.web import collections, items, prepare, users, utils, upload_set, reports, excluded_areas, pages, annotations
2
2
  from geovisio.utils import (
3
3
  upload_set as upload_set_utils,
4
4
  reports as reports_utils,
@@ -245,6 +245,12 @@ Note that you may not rely only on these ID that could change through time.
245
245
  "PreparationParameter": prepare.PreparationParameter.model_json_schema(
246
246
  ref_template="#/components/schemas/PreparationParameter/$defs/{model}", mode="serialization"
247
247
  ),
248
+ "GeovisioPostToken": {
249
+ "type": "object",
250
+ "properties": {
251
+ "description": {"type": "string", "description": "optional description of the token"},
252
+ },
253
+ },
248
254
  "GeoVisioPostUploadSet": upload_set.UploadSetCreationParameter.model_json_schema(
249
255
  ref_template="#/components/schemas/GeoVisioPostUploadSet/$defs/{model}", mode="serialization"
250
256
  ),
@@ -303,7 +309,7 @@ Note that you may not rely only on these ID that could change through time.
303
309
  },
304
310
  "GeoVisioCSVCollections": {
305
311
  "type": "string",
306
- "descrition": f"""CSV file containing the collections.
312
+ "description": f"""CSV file containing the collections.
307
313
 
308
314
  The CSV headers will be:
309
315
  * id: ID of the collection
@@ -464,7 +470,22 @@ The CSV headers will be:
464
470
  "datetimetz": {
465
471
  "type": "string",
466
472
  "format": "date-time",
467
- "title": "Date & time with original timezone information",
473
+ "title": "Date & time of the picture (when it was captured).",
474
+ },
475
+ "datetimetz": {
476
+ "type": "string",
477
+ "format": "date-time",
478
+ "title": "Date & time of the picture (when it was captured) with original timezone information",
479
+ },
480
+ "created": {
481
+ "type": "string",
482
+ "format": "date-time",
483
+ "title": "Date & time of picture upload",
484
+ },
485
+ "updated": {
486
+ "type": "string",
487
+ "format": "date-time",
488
+ "title": "Date & time of picture's metadata update",
468
489
  },
469
490
  "geovisio:status": {"$ref": "#/components/schemas/GeoVisioItemStatus"},
470
491
  "geovisio:producer": {"type": "string"},
@@ -538,7 +559,7 @@ The CSV headers will be:
538
559
  "override_capture_time": {
539
560
  "type": "string",
540
561
  "format": "date-time",
541
- "description": "datetime when the picture was taken. It will change the picture's metadata with this datetime. It should be an iso 3339 formated datetime (like '2017-07-21T17:32:28Z')",
562
+ "description": "datetime when the picture was taken. It will change the picture's metadata with this datetime. It should be an iso 3339 formatted datetime (like '2017-07-21T17:32:28Z')",
542
563
  },
543
564
  "override_latitude": {
544
565
  "type": "number",
@@ -591,6 +612,20 @@ Example values are:
591
612
  Note that this parameter is not taken in account for 360° pictures, as by definition a nearby place would be theorically always visible in it.
592
613
  """,
593
614
  },
615
+ "sortby": {
616
+ "description": """Define the sort order of the results of a search.
617
+ Sort order is defined based on preceding '+' (asc) or '-' (desc).
618
+
619
+ By default we sort to get the last updated pictures first.
620
+
621
+ Available properties are:
622
+ * `ts`: capture datetime of the picture
623
+ * `updated`: sort by updated datetime of the picture
624
+ * `id`: us the picture ID for sort
625
+ """,
626
+ "default": "-updated",
627
+ "type": "string",
628
+ },
594
629
  },
595
630
  },
596
631
  ],
@@ -776,6 +811,32 @@ Available properties are:
776
811
  "description": "The GeoVisio API version number",
777
812
  "example": "2.6.0-12-ab12cd34",
778
813
  },
814
+ "defaults": {
815
+ "type": "object",
816
+ "properties": {
817
+ "collaborative_metadata": {
818
+ "type": "integer",
819
+ "description": "If `true`, the pictures's metadata will be, by default, editable by all users.",
820
+ },
821
+ "split_distance": {
822
+ "type": "integer",
823
+ "description": "Maximum distance between two pictures to be considered in the same sequence (in meters). If both split_distance and split_time are None, no split will occur by default.",
824
+ },
825
+ "split_time": {
826
+ "type": "integer",
827
+ "description": "Maximum time interval between two pictures to be considered in the same sequence. If both split_distance and split_time are None, no split will occur by default.",
828
+ },
829
+ "duplicate_distance": {
830
+ "type": "integer",
831
+ "description": "Maximum distance between two pictures to be considered as duplicates (in meters). If both duplicate_distance andduplicate_rotation are None, no deduplication will occur by default.",
832
+ },
833
+ "duplicate_rotation": {
834
+ "type": "integer",
835
+ "description": "Maximum angle of rotation for two too-close-pictures to be considered as duplicates (in degrees).",
836
+ },
837
+ },
838
+ "required": ["collaborative_metadata", "duplicate_distance", "duplicate_rotation", "split_distance", "split_time"],
839
+ },
779
840
  },
780
841
  "required": ["auth"],
781
842
  },
@@ -841,9 +902,12 @@ Available properties are:
841
902
  "GeoVisioAnnotation": annotations_utils.Annotation.model_json_schema(
842
903
  ref_template="#/components/schemas/GeoVisioAnnotation/$defs/{model}", mode="serialization"
843
904
  ),
844
- "GeoVisioPostAnnotation": annotations_utils.AnnotationCreationParameter.model_json_schema(
905
+ "GeoVisioPostAnnotation": annotations.AnnotationPostParameter.model_json_schema(
845
906
  ref_template="#/components/schemas/GeoVisioPostAnnotation/$defs/{model}", mode="serialization"
846
907
  ),
908
+ "GeoVisioPatchAnnotation": annotations.AnnotationPatchParameter.model_json_schema(
909
+ ref_template="#/components/schemas/GeoVisioPatchAnnotation/$defs/{model}", mode="serialization"
910
+ ),
847
911
  },
848
912
  "parameters": {
849
913
  "STAC_bbox": {"$ref": f"https://api.stacspec.org/v{utils.STAC_VERSION}/item-search/openapi.yaml#/components/parameters/bbox"},
@@ -871,7 +935,7 @@ Available properties are:
871
935
  "description": """
872
936
  A CQL2 filter expression for filtering sequences.
873
937
 
874
- Allowed properties are:
938
+ Allowed properties are:
875
939
  * "created": upload date
876
940
  * "updated": last edit date
877
941
  * "status": status of the sequence. Can either be "ready" (for collections ready to be served) or "deleted" for deleted collection. By default, only the "ready" collections will be shown.
@@ -895,7 +959,7 @@ Examples:
895
959
  "description": """
896
960
  A CQL2 filter expression for filtering tiles.
897
961
 
898
- Allowed properties are:
962
+ Allowed properties are:
899
963
  * "status": status of the sequence. Can either be "ready" (for collections ready to be served) or "hidden" for hidden collections. By default, only the "ready" collections will be shown.
900
964
 
901
965
  Usage doc can be found here: https://docs.geoserver.org/2.23.x/en/user/tutorials/cql/cql_tutorial.html
@@ -939,6 +1003,24 @@ Note that this parameter is not taken in account for 360° pictures, as by defin
939
1003
  "required": False,
940
1004
  "schema": {"type": "integer", "minimum": 2, "maximum": 180, "default": 30},
941
1005
  },
1006
+ "GeoVisioSearchSortedBy": {
1007
+ "name": "sortby",
1008
+ "in": "query",
1009
+ "description": """Define the sort order of the results of a search.
1010
+ Sort order is defined based on preceding '+' (asc) or '-' (desc).
1011
+
1012
+ By default we sort to get the last updated pictures firstn (-updated).
1013
+
1014
+ Available properties are:
1015
+ * `ts`: capture datetime of the picture
1016
+ * `updated`: sort by updated datetime of the picture
1017
+ * `id`: us the picture ID for sort
1018
+ """,
1019
+ "required": False,
1020
+ "schema": {
1021
+ "type": "string",
1022
+ },
1023
+ },
942
1024
  "searchCQL2_filter": {
943
1025
  "name": "filter",
944
1026
  "in": "query",
@@ -972,7 +1054,7 @@ Examples:
972
1054
  "description": """
973
1055
  A CQL2 filter expression for filtering reports.
974
1056
 
975
- Allowed properties are:
1057
+ Allowed properties are:
976
1058
  * status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
977
1059
  * reporter: 'me', user account ID or unset
978
1060
  * owner: 'me', user account ID or unset
@@ -997,7 +1079,7 @@ By default, we only show open or waiting reports, sorted by descending creation
997
1079
  "description": """
998
1080
  A CQL2 filter expression for filtering reports.
999
1081
 
1000
- Allowed properties are:
1082
+ Allowed properties are:
1001
1083
  * status: 'open', 'open_autofix', 'waiting', 'closed_solved', 'closed_ignored'
1002
1084
  * reporter: 'me' or unset
1003
1085
  * owner: 'me' or unset
@@ -1022,7 +1104,7 @@ By default, we only show open or waiting reports concerning you, sorted by desce
1022
1104
  "description": """
1023
1105
  A CQL2 filter expression for filtering upload sets.
1024
1106
 
1025
- Allowed properties are:
1107
+ Allowed properties are:
1026
1108
  * completed: TRUE or FALSE
1027
1109
  * dispatched: TRUE or FALSE
1028
1110
 
@@ -1092,7 +1174,7 @@ def getApiInfo():
1092
1174
  """Return API metadata parsed from pyproject.toml"""
1093
1175
  apiMeta = metadata.metadata("geovisio")
1094
1176
 
1095
- # url is formated like 'Home, <url>
1177
+ # url is formatted like 'Home, <url>
1096
1178
  url = apiMeta["Project-URL"].split(",")[1].rstrip()
1097
1179
  # there can be several authors, but we only display the first one in docs
1098
1180
  author = apiMeta["Author-email"].split(",")[0]