goodmap 1.1.0__tar.gz → 1.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: goodmap
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Map engine to serve all the people :)
5
5
  License-File: LICENSE.md
6
6
  Author: Krzysztof Kolodzinski
@@ -786,6 +786,12 @@ def mongodb_db_add_suggestion(self, suggestion_data):
786
786
  CRUDHelper.add_item_to_mongodb(self.db.suggestions, suggestion_data, "Suggestion", "pending")
787
787
 
788
788
 
789
+ def google_json_db_add_suggestion(self, suggestion_data):
790
+ # Temporary workaround: just use notifier without storing
791
+ # Full implementation would require writing back to Google Cloud Storage
792
+ pass
793
+
794
+
789
795
  def add_suggestion(db, suggestion_data):
790
796
  return globals()[f"{db.module_name}_add_suggestion"](db, suggestion_data)
791
797
 
@@ -876,6 +882,16 @@ def mongodb_db_get_suggestions_paginated(self, query):
876
882
  return __build_pagination_response(items, total_count, page, per_page)
877
883
 
878
884
 
885
+ def google_json_db_get_suggestions(self, query_params):
886
+ # GoogleJsonDb is read-only, suggestions not stored in blob
887
+ return []
888
+
889
+
890
+ def google_json_db_get_suggestions_paginated(self, query):
891
+ """Google JSON suggestions with pagination (read-only)."""
892
+ return PaginationHelper.create_paginated_response([], query)
893
+
894
+
879
895
  def get_suggestions(db):
880
896
  return globals()[f"{db.module_name}_get_suggestions"]
881
897
 
@@ -906,6 +922,11 @@ def mongodb_db_get_suggestion(self, suggestion_id):
906
922
  return self.db.suggestions.find_one({"uuid": suggestion_id}, {"_id": 0})
907
923
 
908
924
 
925
+ def google_json_db_get_suggestion(self, suggestion_id):
926
+ # GoogleJsonDb is read-only, suggestions not stored in blob
927
+ return None
928
+
929
+
909
930
  def get_suggestion(db):
910
931
  return globals()[f"{db.module_name}_get_suggestion"]
911
932
 
@@ -946,6 +967,11 @@ def mongodb_db_update_suggestion(self, suggestion_id, status):
946
967
  raise ValueError(f"Suggestion with uuid {suggestion_id} not found")
947
968
 
948
969
 
970
+ def google_json_db_update_suggestion(self, suggestion_id, status):
971
+ # GoogleJsonDb is read-only, no-op
972
+ pass
973
+
974
+
949
975
  def update_suggestion(db, suggestion_id, status):
950
976
  return globals()[f"{db.module_name}_update_suggestion"](db, suggestion_id, status)
951
977
 
@@ -984,6 +1010,11 @@ def mongodb_db_delete_suggestion(self, suggestion_id):
984
1010
  raise ValueError(f"Suggestion with uuid {suggestion_id} not found")
985
1011
 
986
1012
 
1013
+ def google_json_db_delete_suggestion(self, suggestion_id):
1014
+ # GoogleJsonDb is read-only, no-op
1015
+ pass
1016
+
1017
+
987
1018
  def delete_suggestion(db, suggestion_id):
988
1019
  return globals()[f"{db.module_name}_delete_suggestion"](db, suggestion_id)
989
1020
 
@@ -1022,6 +1053,12 @@ def mongodb_db_add_report(self, report_data):
1022
1053
  self.db.reports.insert_one(report_data)
1023
1054
 
1024
1055
 
1056
+ def google_json_db_add_report(self, report_data):
1057
+ # Temporary workaround: just use notifier without storing
1058
+ # Full implementation would require writing back to Google Cloud Storage
1059
+ pass
1060
+
1061
+
1025
1062
  def add_report(db, report_data):
1026
1063
  return globals()[f"{db.module_name}_add_report"](db, report_data)
1027
1064
 
@@ -1128,6 +1165,16 @@ def mongodb_db_get_reports_paginated(self, query):
1128
1165
  return __build_pagination_response(items, total_count, page, per_page)
1129
1166
 
1130
1167
 
1168
+ def google_json_db_get_reports(self, query_params):
1169
+ # GoogleJsonDb is read-only, reports not stored in blob
1170
+ return []
1171
+
1172
+
1173
+ def google_json_db_get_reports_paginated(self, query):
1174
+ """Google JSON reports with pagination (read-only)."""
1175
+ return PaginationHelper.create_paginated_response([], query)
1176
+
1177
+
1131
1178
  def get_reports(db):
1132
1179
  return globals()[f"{db.module_name}_get_reports"]
1133
1180
 
@@ -1157,6 +1204,11 @@ def mongodb_db_get_report(self, report_id):
1157
1204
  return self.db.reports.find_one({"uuid": report_id}, {"_id": 0})
1158
1205
 
1159
1206
 
1207
+ def google_json_db_get_report(self, report_id):
1208
+ # GoogleJsonDb is read-only, reports not stored in blob
1209
+ return None
1210
+
1211
+
1160
1212
  def get_report(db):
1161
1213
  return globals()[f"{db.module_name}_get_report"]
1162
1214
 
@@ -1210,6 +1262,11 @@ def mongodb_db_update_report(self, report_id, status=None, priority=None):
1210
1262
  raise ValueError(f"Report with uuid {report_id} not found")
1211
1263
 
1212
1264
 
1265
+ def google_json_db_update_report(self, report_id, status=None, priority=None):
1266
+ # GoogleJsonDb is read-only, no-op
1267
+ pass
1268
+
1269
+
1213
1270
  def update_report(db, report_id, status=None, priority=None):
1214
1271
  return globals()[f"{db.module_name}_update_report"](db, report_id, status, priority)
1215
1272
 
@@ -1247,6 +1304,11 @@ def mongodb_db_delete_report(self, report_id):
1247
1304
  raise ValueError(f"Report with uuid {report_id} not found")
1248
1305
 
1249
1306
 
1307
+ def google_json_db_delete_report(self, report_id):
1308
+ # GoogleJsonDb is read-only, no-op
1309
+ pass
1310
+
1311
+
1250
1312
  def delete_report(db, report_id):
1251
1313
  return globals()[f"{db.module_name}_delete_report"](db, report_id)
1252
1314
 
@@ -1266,17 +1328,16 @@ def extend_db_with_goodmap_queries(db, location_model):
1266
1328
  db.extend("delete_location", delete_location)
1267
1329
  db.extend("get_categories", get_categories(db))
1268
1330
  db.extend("get_category_data", get_category_data(db))
1269
- if db.module_name in ("json_db", "json_file_db", "mongodb_db"):
1270
- db.extend("add_suggestion", add_suggestion)
1271
- db.extend("get_suggestions", get_suggestions(db))
1272
- db.extend("get_suggestions_paginated", get_suggestions_paginated(db))
1273
- db.extend("get_suggestion", get_suggestion(db))
1274
- db.extend("update_suggestion", update_suggestion)
1275
- db.extend("delete_suggestion", delete_suggestion)
1276
- db.extend("add_report", add_report)
1277
- db.extend("get_reports", get_reports(db))
1278
- db.extend("get_reports_paginated", get_reports_paginated(db))
1279
- db.extend("get_report", get_report(db))
1280
- db.extend("update_report", update_report)
1281
- db.extend("delete_report", delete_report)
1331
+ db.extend("add_suggestion", add_suggestion)
1332
+ db.extend("get_suggestions", get_suggestions(db))
1333
+ db.extend("get_suggestions_paginated", get_suggestions_paginated(db))
1334
+ db.extend("get_suggestion", get_suggestion(db))
1335
+ db.extend("update_suggestion", update_suggestion)
1336
+ db.extend("delete_suggestion", delete_suggestion)
1337
+ db.extend("add_report", add_report)
1338
+ db.extend("get_reports", get_reports(db))
1339
+ db.extend("get_reports_paginated", get_reports_paginated(db))
1340
+ db.extend("get_report", get_report(db))
1341
+ db.extend("update_report", update_report)
1342
+ db.extend("delete_report", delete_report)
1282
1343
  return db
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "goodmap"
3
- version = "1.1.0"
3
+ version = "1.1.1"
4
4
  description = "Map engine to serve all the people :)"
5
5
  authors = ["Krzysztof Kolodzinski <krzysztof.kolodzinski@problematy.pl>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes