feldera 0.130.0__py3-none-any.whl → 0.132.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.

Potentially problematic release.


This version of feldera might be problematic. Click here for more details.

feldera/rest/errors.py CHANGED
@@ -1,5 +1,6 @@
1
1
  from requests import Response
2
2
  import json
3
+ from urllib.parse import urlparse
3
4
 
4
5
 
5
6
  class FelderaError(Exception):
@@ -40,6 +41,21 @@ class FelderaAPIError(FelderaError):
40
41
  self.details = json_data.get("details")
41
42
  except Exception:
42
43
  self.message = request.text
44
+ err_msg += request.text
45
+
46
+ err_msg += f"\nResponse Status: {request.status_code}"
47
+
48
+ if int(request.status_code) == 401:
49
+ parsed = urlparse(request.request.url)
50
+
51
+ auth_err = f"\nAuthorization error: Failed to connect to '{parsed.scheme}://{parsed.hostname}': "
52
+ auth = request.request.headers.get("Authorization")
53
+ if auth is None:
54
+ err_msg += f"{auth_err} API key not set"
55
+ else:
56
+ err_msg += f"{auth_err} invalid API key"
57
+
58
+ err_msg = err_msg.strip()
43
59
 
44
60
  super().__init__(err_msg)
45
61
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: feldera
3
- Version: 0.130.0
3
+ Version: 0.132.0
4
4
  Summary: The feldera python client
5
5
  Author-email: Feldera Team <dev@feldera.com>
6
6
  License: MIT
@@ -84,73 +84,6 @@ make html
84
84
 
85
85
  To clean the build, run `make clean`.
86
86
 
87
- ## Testing
88
-
89
- To run unit tests:
90
-
91
- ```bash
92
- cd python && python3 -m pytest tests/
93
- ```
94
-
95
- - This will detect and run all test files that match the pattern `test_*.py` or
96
- `*_test.py`.
97
- - By default, the tests expect a running Feldera instance at `http://localhost:8080`.
98
- To override the default endpoint, set the `FELDERA_HOST` environment variable.
99
-
100
- To run tests from a specific file:
101
-
102
- ```bash
103
- (cd python && python3 -m pytest ./tests/path-to-file.py)
104
- ```
105
-
106
- To run a specific test:
107
-
108
- ```bash
109
- uv run python -m pytest tests/test_shared_pipeline.py::TestPipeline::test_adhoc_query_hash -v
110
- ```
111
-
112
- #### Running All Tests
113
-
114
- The tests validate end-to-end correctness of SQL functionality. To
115
- run the tests use:
116
-
117
- ```bash
118
- cd python
119
- PYTHONPATH=`pwd` ./tests/run-all-tests.sh
120
- ```
121
-
122
- ### Reducing Compilation Cycles
123
-
124
- To reduce redundant compilation cycles during testing:
125
-
126
- * **Inherit from `SharedTestPipeline`** instead of `unittest.TestCase`.
127
- * **Define DDLs** (e.g., `CREATE TABLE`, `CREATE VIEW`) in the **docstring** of each test method.
128
- * All DDLs from all test functions in the class are combined and compiled into a single pipeline.
129
- * If a table or view is already defined in one test, it can be used directly in others without redefinition.
130
- * Ensure that all table and view names are unique within the class.
131
- * Use `@enterprise_only` on tests that require Enterprise features. Their DDLs will be skipped on OSS builds.
132
- * Use `self.set_runtime_config(...)` to override the default pipeline config.
133
- * Reset it at the end using `self.reset_runtime_config()`.
134
- * Access the shared pipeline via `self.pipeline`.
135
-
136
- #### Example
137
-
138
- ```python
139
- from tests.shared_test_pipeline import SharedTestPipeline
140
-
141
- class TestAverage(SharedTestPipeline):
142
- def test_average(self):
143
- """
144
- CREATE TABLE students(id INT, name STRING);
145
- CREATE MATERIALIZED VIEW v AS SELECT * FROM students;
146
- """
147
- ...
148
- self.pipeline.start()
149
- self.pipeline.input_pandas("students", df)
150
- self.pipeline.wait_for_completion(True)
151
- ...
152
- ```
153
-
154
87
  ## Linting and formatting
155
88
 
156
89
  Use [Ruff] to run the lint checks that will be executed by the
@@ -11,13 +11,13 @@ feldera/rest/__init__.py,sha256=Eg-EKUU3RSTDcdxTR_7wNDnCly8VpXEzsZCQUmf-y2M,308
11
11
  feldera/rest/_helpers.py,sha256=q7jWInKp9IiIli8N5o31lDG3hNUbcsJqufZXYHG04ps,222
12
12
  feldera/rest/_httprequests.py,sha256=WbMeFodRV0ZHjA4LhcsbGUtVO-j8HQ98SRfgogOFA8A,8074
13
13
  feldera/rest/config.py,sha256=ag8Vh1Ul0wmo--3kvfwL_vUfu4CHESnn07xUuIJRbv4,1213
14
- feldera/rest/errors.py,sha256=b4i2JjrbSmej7jdko_FL8UeXklLKenSipwMT80jowaM,1720
14
+ feldera/rest/errors.py,sha256=wKWwlL5WI3SVXC8rQTy3rS3wQ9Hjjn_EY7iRHXZFIVE,2341
15
15
  feldera/rest/feldera_client.py,sha256=Crt0WHBucC4YiRZi2M0GKQ1isdMjCm_Y-_fElOjoK3o,37095
16
16
  feldera/rest/feldera_config.py,sha256=1pnGbLFMSLvp7Qh_OlPLALSKCSHIktNWKvx6gYU00U4,1374
17
17
  feldera/rest/pipeline.py,sha256=Rmbflbwjvd86iZ5aSJ5b_bTSs6vgvEKQFwMZDtm0nxE,2835
18
18
  feldera/rest/sql_table.py,sha256=qrw-YwMzx5T81zDefNO1KOx7EyypFz1vPwGBzSUB7kc,652
19
19
  feldera/rest/sql_view.py,sha256=hN12mPM0mvwLCIPYywpb12s9Hd2Ws31IlTMXPriMisw,644
20
- feldera-0.130.0.dist-info/METADATA,sha256=ruLW28T6OdfrjxBCxX1oBGVm2uGhyeVw7W1ntUoElO0,4415
21
- feldera-0.130.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- feldera-0.130.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
23
- feldera-0.130.0.dist-info/RECORD,,
20
+ feldera-0.132.0.dist-info/METADATA,sha256=1RqRTcwVdbjECQ1U4UK5Fm1hT1KPHqDfuLMHUngcBmE,2368
21
+ feldera-0.132.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ feldera-0.132.0.dist-info/top_level.txt,sha256=fB6yTqrQiO6RCbY1xP2T_mpPoTjDFtJvkJJodiee7d0,8
23
+ feldera-0.132.0.dist-info/RECORD,,