goodmap 0.4.4__tar.gz → 0.5.0__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.3
2
2
  Name: goodmap
3
- Version: 0.4.4
3
+ Version: 0.5.0
4
4
  Summary: Map engine to serve all the people :)
5
5
  Author: Krzysztof Kolodzinski
6
6
  Author-email: krzysztof.kolodzinski@problematy.pl
@@ -22,7 +22,7 @@ Requires-Dist: google-cloud-storage (>=2.7.0,<3.0.0)
22
22
  Requires-Dist: gql (>=3.4.0,<4.0.0)
23
23
  Requires-Dist: gunicorn (>=20.1.0,<21.0.0)
24
24
  Requires-Dist: humanize (>=4.6.0,<5.0.0)
25
- Requires-Dist: platzky (>=0.2.5,<0.3.0)
25
+ Requires-Dist: platzky (>=0.3.1,<0.4.0)
26
26
  Requires-Dist: pydantic (>=2.7.1,<3.0.0)
27
27
  Description-Content-Type: text/markdown
28
28
 
@@ -1,13 +1,11 @@
1
1
  import importlib.metadata
2
2
  import uuid
3
3
 
4
- import deprecation
5
4
  from flask import Blueprint, jsonify, make_response, request
6
5
  from flask_babel import gettext
7
6
  from flask_restx import Api, Resource, fields
8
7
  from platzky.config import LanguagesMapping
9
8
 
10
- from goodmap.core import get_queried_data
11
9
  from goodmap.formatter import prepare_pin
12
10
 
13
11
 
@@ -76,29 +74,6 @@ def core_pages(
76
74
  return make_response(jsonify({"message": f"{error_message} : {e}"}), 400)
77
75
  return make_response(jsonify({"message": gettext("Location reported")}), 200)
78
76
 
79
- @core_api.route("/data")
80
- class Data(Resource):
81
- @deprecation.deprecated(
82
- deprecated_in="0.4.1",
83
- removed_in="0.5.0",
84
- current_version=importlib.metadata.version("goodmap"),
85
- details="Use /locations or /location/<point_id> instead",
86
- )
87
- def get(self):
88
- """
89
- Shows all data filtered by query parameters
90
- e.g. /api/data?category=category1&category=category2
91
- """
92
- all_data = database.get_data()
93
- query_params = request.args.to_dict(flat=False)
94
- data = all_data["data"]
95
- categories = all_data["categories"]
96
- visible_data = all_data["visible_data"]
97
- meta_data = all_data["meta_data"]
98
- queried_data = get_queried_data(data, categories, query_params)
99
- formatted_data = [prepare_pin(x, visible_data, meta_data) for x in queried_data]
100
- return jsonify(formatted_data)
101
-
102
77
  @core_api.route("/locations")
103
78
  class GetLocations(Resource):
104
79
  def get(self):
@@ -50,7 +50,7 @@ def get_invalid_value_in_category_violations(p, categories):
50
50
  for category in categories & p.keys():
51
51
  category_value_in_point = p[category]
52
52
  valid_values_set = categories[category]
53
- if type(category_value_in_point) is list:
53
+ if isinstance(category_value_in_point, list):
54
54
  for attribute_value in category_value_in_point:
55
55
  if attribute_value not in valid_values_set:
56
56
  violations.append(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "goodmap"
3
- version = "0.4.4"
3
+ version = "0.5.0"
4
4
  description = "Map engine to serve all the people :)"
5
5
  authors = ["Krzysztof Kolodzinski <krzysztof.kolodzinski@problematy.pl>"]
6
6
  readme = "README.md"
@@ -20,7 +20,7 @@ Flask-WTF = "^1.2.1"
20
20
  gql = "^3.4.0"
21
21
  aiohttp = "^3.8.4"
22
22
  pydantic = "^2.7.1"
23
- platzky = "^0.2.5"
23
+ platzky = "^0.3.1"
24
24
  deprecation = "^2.1.0"
25
25
 
26
26
  [tool.poetry.group.dev.dependencies]
@@ -30,8 +30,9 @@ coveralls = "^3.3.1"
30
30
  pyright = "^1.1.291"
31
31
  freezegun = "^1.2.2"
32
32
  black = "^24.8.0"
33
- ruff = "^0.0.257"
33
+ ruff = "^0.4.4"
34
34
  platzky = {path = "vendor/platzky", develop = true}
35
+ platzky-redirections = "^0.1.0"
35
36
 
36
37
  [build-system]
37
38
  requires = ["poetry-core>=1.0.0"]
@@ -55,6 +56,10 @@ reportUntypedClassDecorator = false
55
56
  reportUnusedClass = false
56
57
  reportUntypedBaseClass = false
57
58
 
59
+ exclude = [
60
+ "**/vendor/**",
61
+ ]
62
+
58
63
  [tool.black]
59
64
  line-length = 100
60
65
  target-version = ["py310"]
@@ -63,14 +68,13 @@ target-version = ["py310"]
63
68
  line-length = 100
64
69
  target-version = "py310"
65
70
  show-fixes = true
66
- select = [
71
+ lint.select = [
67
72
  "I", # isort
68
73
  "F", # Pyflakes
69
74
  "E", # pycodestyle Error
70
75
  "W", # pycodestyle Warning
71
76
  "RUF", # Ruff-specific rules
72
77
  ]
73
- ignore = []
74
78
 
75
79
  [tool.pytest.ini_options]
76
80
  addopts = "--ignore=vendor"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes