garf-core 0.1.4.post0__tar.gz → 0.1.4.post1__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.
Files changed (21) hide show
  1. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/PKG-INFO +3 -3
  2. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/__init__.py +1 -1
  3. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/api_clients.py +1 -1
  4. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/query_editor.py +4 -10
  5. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core.egg-info/PKG-INFO +3 -3
  6. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core.egg-info/requires.txt +1 -0
  7. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/pyproject.toml +2 -2
  8. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/README.md +0 -0
  9. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/base_query.py +0 -0
  10. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/exceptions.py +0 -0
  11. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/fetchers/__init__.py +0 -0
  12. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/fetchers/fake.py +0 -0
  13. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/fetchers/rest.py +0 -0
  14. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/parsers.py +0 -0
  15. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/report.py +0 -0
  16. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core/report_fetcher.py +0 -0
  17. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core.egg-info/SOURCES.txt +0 -0
  18. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core.egg-info/dependency_links.txt +0 -0
  19. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core.egg-info/entry_points.txt +0 -0
  20. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/garf_core.egg-info/top_level.txt +0 -0
  21. {garf_core-0.1.4.post0 → garf_core-0.1.4.post1}/setup.cfg +0 -0
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: garf-core
3
- Version: 0.1.4.post0
3
+ Version: 0.1.4.post1
4
4
  Summary: Abstracts fetching data from API based on provided SQL-like query.
5
5
  Author-email: "Google Inc. (gTech gPS CSE team)" <no-reply@google.com>, Andrei Markin <andrey.markin.ppc@gmail.com>
6
6
  License: Apache 2.0
7
7
  Classifier: Programming Language :: Python :: 3 :: Only
8
- Classifier: Programming Language :: Python :: 3.8
9
8
  Classifier: Programming Language :: Python :: 3.9
10
9
  Classifier: Programming Language :: Python :: 3.10
11
10
  Classifier: Programming Language :: Python :: 3.11
@@ -15,7 +14,7 @@ Classifier: Intended Audience :: Developers
15
14
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
15
  Classifier: Operating System :: OS Independent
17
16
  Classifier: License :: OSI Approved :: Apache Software License
18
- Requires-Python: >=3.8
17
+ Requires-Python: >=3.9
19
18
  Description-Content-Type: text/markdown
20
19
  Requires-Dist: python-dateutil
21
20
  Requires-Dist: jinja2
@@ -23,6 +22,7 @@ Requires-Dist: typing-extensions
23
22
  Requires-Dist: requests
24
23
  Requires-Dist: pyyaml
25
24
  Requires-Dist: pydantic
25
+ Requires-Dist: eval_type_backport
26
26
  Provides-Extra: pandas
27
27
  Requires-Dist: pandas; extra == "pandas"
28
28
  Provides-Extra: polars
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = '0.1.4.post0'
15
+ __version__ = '0.1.4.post1'
@@ -155,7 +155,7 @@ class FakeApiClient(BaseClient):
155
155
  {key: _field_converter(value) for key, value in row.items()}
156
156
  )
157
157
  return FakeApiClient(data)
158
- except FileNotFoundError as e:
158
+ except (AttributeError, FileNotFoundError) as e:
159
159
  raise GarfApiError(f'Failed to open {file_location}') from e
160
160
 
161
161
 
@@ -25,24 +25,18 @@ from typing import Generator, Union
25
25
  import jinja2
26
26
  import pydantic
27
27
  from dateutil import relativedelta
28
- from typing_extensions import Self
28
+ from typing_extensions import Self, TypeAlias
29
29
 
30
30
  from garf_core import exceptions
31
31
 
32
- QueryParameters = dict[str, Union[str, float, int]]
32
+ QueryParameters: TypeAlias = dict[str, Union[str, float, int]]
33
33
 
34
34
 
35
35
  class GarfQueryParameters(pydantic.BaseModel):
36
36
  """Parameters for dynamically changing text of a query."""
37
37
 
38
- macro: QueryParameters | None = None
39
- template: QueryParameters | None = None
40
-
41
- def model_post_init(self, __context__) -> None:
42
- if self.macro is None:
43
- self.macro = {}
44
- if self.template is None:
45
- self.template = {}
38
+ macro: QueryParameters = pydantic.Field(default_factory=dict)
39
+ template: QueryParameters = pydantic.Field(default_factory=dict)
46
40
 
47
41
 
48
42
  class GarfQueryError(exceptions.GarfError):
@@ -1,11 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: garf-core
3
- Version: 0.1.4.post0
3
+ Version: 0.1.4.post1
4
4
  Summary: Abstracts fetching data from API based on provided SQL-like query.
5
5
  Author-email: "Google Inc. (gTech gPS CSE team)" <no-reply@google.com>, Andrei Markin <andrey.markin.ppc@gmail.com>
6
6
  License: Apache 2.0
7
7
  Classifier: Programming Language :: Python :: 3 :: Only
8
- Classifier: Programming Language :: Python :: 3.8
9
8
  Classifier: Programming Language :: Python :: 3.9
10
9
  Classifier: Programming Language :: Python :: 3.10
11
10
  Classifier: Programming Language :: Python :: 3.11
@@ -15,7 +14,7 @@ Classifier: Intended Audience :: Developers
15
14
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
15
  Classifier: Operating System :: OS Independent
17
16
  Classifier: License :: OSI Approved :: Apache Software License
18
- Requires-Python: >=3.8
17
+ Requires-Python: >=3.9
19
18
  Description-Content-Type: text/markdown
20
19
  Requires-Dist: python-dateutil
21
20
  Requires-Dist: jinja2
@@ -23,6 +22,7 @@ Requires-Dist: typing-extensions
23
22
  Requires-Dist: requests
24
23
  Requires-Dist: pyyaml
25
24
  Requires-Dist: pydantic
25
+ Requires-Dist: eval_type_backport
26
26
  Provides-Extra: pandas
27
27
  Requires-Dist: pandas; extra == "pandas"
28
28
  Provides-Extra: polars
@@ -4,6 +4,7 @@ typing-extensions
4
4
  requests
5
5
  pyyaml
6
6
  pydantic
7
+ eval_type_backport
7
8
 
8
9
  [all]
9
10
  garf-core[pandas,polars]
@@ -11,18 +11,18 @@ dependencies = [
11
11
  "requests",
12
12
  "pyyaml",
13
13
  "pydantic",
14
+ "eval_type_backport",
14
15
  ]
15
16
  authors = [
16
17
  {name = "Google Inc. (gTech gPS CSE team)", email = "no-reply@google.com"},
17
18
  {name = "Andrei Markin", email = "andrey.markin.ppc@gmail.com"},
18
19
  ]
19
- requires-python = ">=3.8"
20
+ requires-python = ">=3.9"
20
21
  description = "Abstracts fetching data from API based on provided SQL-like query."
21
22
  readme = "README.md"
22
23
  license = {text = "Apache 2.0"}
23
24
  classifiers = [
24
25
  "Programming Language :: Python :: 3 :: Only",
25
- "Programming Language :: Python :: 3.8",
26
26
  "Programming Language :: Python :: 3.9",
27
27
  "Programming Language :: Python :: 3.10",
28
28
  "Programming Language :: Python :: 3.11",