ics-wivi-analytics-ingest 0.1.5__py3-none-any.whl → 0.1.7__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 ics-wivi-analytics-ingest might be problematic. Click here for more details.

@@ -26,9 +26,7 @@ from analytics_ingest.internal.utils.signal_buffer_manager import SignalBufferMa
26
26
  class IcsAnalytics:
27
27
  def __init__(self, **kwargs):
28
28
  self.config = IngestConfigSchema(**kwargs)
29
- self.executor = GraphQLExecutor(
30
- self.config.graphql_endpoint, self.config.debug, self.config.jwt_token
31
- )
29
+ self.executor = GraphQLExecutor(self.config.graphql_endpoint, self.config.debug)
32
30
 
33
31
  self.configuration_id = ConfigurationService(self.executor).create(
34
32
  self.config.model_dump()
@@ -1,7 +1,7 @@
1
1
  # analytics_ingest/src/analytics_ingest/internal/schemas/gps_schema.py
2
2
 
3
3
  from datetime import datetime
4
- from typing import Optional, Any
4
+ from typing import Optional
5
5
 
6
6
  from pydantic import BaseModel
7
7
 
@@ -21,7 +21,7 @@ class GPSSchema(BaseModel):
21
21
  accuracy: Optional[float] = None
22
22
  altitude: Optional[float] = None
23
23
  speed: Optional[float] = None
24
- bearing: Optional[Any] = None
24
+ bearing: Optional[float] = None
25
25
  available: Optional[AvailableSchema] = None
26
26
 
27
27
  @classmethod
@@ -17,12 +17,11 @@ class IngestConfigSchema(BaseModel):
17
17
  graphql_endpoint: str = Field(default_factory=lambda: os.getenv("GRAPH_ENDPOINT"))
18
18
  max_signal_count: Optional[int] = Field(default=1, ge=1)
19
19
  debug: Optional[bool] = True
20
- jwt_token: Optional[str] = Field(
21
- default_factory=lambda: os.getenv("SEC_AUTH_TOKEN")
22
- )
23
20
 
24
21
  @model_validator(mode="after")
25
22
  def validate_env_or_param(self):
26
23
  if not self.graphql_endpoint:
27
- self.graphql_endpoint = "https://0.0.0.0:8092/graphql"
24
+ raise ValueError(
25
+ "Missing GraphQL endpoint. Set via param or GRAPH_ENDPOINT env."
26
+ )
28
27
  return self
@@ -8,10 +8,9 @@ from requests.exceptions import RequestException
8
8
 
9
9
 
10
10
  class GraphQLExecutor:
11
- def __init__(self, graphql_endpoint, debug=False, jwt_token=None):
11
+ def __init__(self, graphql_endpoint, debug=False):
12
12
  self.graphql_endpoint = graphql_endpoint
13
13
  self.debug = debug
14
- self.jwt_token = jwt_token
15
14
  self._semaphore = asyncio.Semaphore(1)
16
15
  self._pending_requests = []
17
16
  self._executor_pool = ThreadPoolExecutor(max_workers=10)
@@ -35,9 +34,6 @@ class GraphQLExecutor:
35
34
  parsed_query = print_ast(parse(query))
36
35
  headers = {"Content-Type": "application/json"}
37
36
 
38
- if self.jwt_token:
39
- headers["Authorization"] = f"Bearer {self.jwt_token}"
40
-
41
37
  request_data = {"query": parsed_query, "variables": variables}
42
38
 
43
39
  if self.debug:
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ics-wivi-analytics-ingest
3
- Version: 0.1.5
4
- Summary: - Bearing accept both string and float.
3
+ Version: 0.1.7
4
+ Summary: - Bearing accept only float.
5
5
  Author-email: Haseeb Saif Ullah <hsaif@intrepidcs.com>, Scott VanDeWater <svandewater@intrepidcs.com>
6
6
  License: Copyright (c) 2018-2025 Intrepid Control Systems, Inc.
7
7
 
@@ -55,7 +55,7 @@ A lightweight Python library to batch and send automotive telemetry — like sig
55
55
 
56
56
  ---
57
57
 
58
- ## 🔧 Features
58
+ ## Features
59
59
 
60
60
  * Python 3.11+ support
61
61
  * Clean, single-class interface: `IcsAnalytics`
@@ -68,24 +68,24 @@ A lightweight Python library to batch and send automotive telemetry — like sig
68
68
 
69
69
  ---
70
70
 
71
- ## 📦 Installation
71
+ ## Installation
72
72
 
73
73
  ```bash
74
74
  pip install ics-wivi-analytics-ingest
75
75
  ```
76
76
  ---
77
77
 
78
- ## 🔑 Setting Endpoint via Environment Variables
78
+ ## Setting Endpoint via Environment Variables
79
79
 
80
80
  You can avoid hardcoding sensitive values like GraphQL endpoints by using environment variables.
81
81
 
82
82
  ### Example (Linux / macOS)
83
83
 
84
84
  ```bash
85
- export GRAPHQL_ENDPOINT="https://0.0.0.0:8092/graphql"
85
+ export GRAPHQL_ENDPOINT="https://graph.{server}.wlnv.srv:8080/graphql" # example endpoint = https://graph.a7f1.wlnv.srv:8080/graphql
86
86
  ```
87
87
 
88
- ## 🚀 Quick Usage
88
+ ## Quick Usage
89
89
 
90
90
  ```python
91
91
  from analytics_ingest import IcsAnalytics
@@ -95,7 +95,7 @@ client = IcsAnalytics(
95
95
  vehicle_id=456,
96
96
  fleet_id=789,
97
97
  org_id=1011,
98
- graphql_endpoint="https://0.0.0.0:8092/graphql", #default endpoint
98
+ graphql_endpoint="https://graph.{server}.wlnv.srv:8080/graphql", # example endpoint = https://graph.a7f1.wlnv.srv:8080/graphql
99
99
  batch_size=100,
100
100
  batch_interval_seconds=10,
101
101
  max_signal_count=100
@@ -185,7 +185,7 @@ client.close()
185
185
 
186
186
  ---
187
187
 
188
- ## ⚙️ Config Options
188
+ ## Config Options
189
189
 
190
190
  Set through constructor or environment variables.
191
191
 
@@ -205,7 +205,7 @@ Set through constructor or environment variables.
205
205
 
206
206
  ---
207
207
 
208
- ### 🔧 Payload Reference
208
+ ### Payload Reference
209
209
 
210
210
  #### `add_signal` Payload
211
211
 
@@ -245,7 +245,7 @@ Set through constructor or environment variables.
245
245
  | `ecuId` | ECU ID | Optional |
246
246
  | `messageDate` | Message timestamp (ISO 8601) | Optional |
247
247
  | `fileId` | File ID for trace reference | Optional |
248
- | `data` | List of DTC data objects | **Required** |
248
+ | `data` | List of DTC data objects | Optional |
249
249
 
250
250
  **Inside `data`:**
251
251
 
@@ -293,7 +293,7 @@ Set through constructor or environment variables.
293
293
 
294
294
  ---
295
295
 
296
- ## 🛠️ Error Handling & Logging
296
+ ## Error Handling & Logging
297
297
 
298
298
  * Raises exceptions for bad input or backend failures
299
299
  * Use logging instead of print in production
@@ -301,7 +301,7 @@ Set through constructor or environment variables.
301
301
 
302
302
  ---
303
303
 
304
- ## 🧪 Testing
304
+ ## Testing
305
305
 
306
306
  Run all tests:
307
307
 
@@ -320,7 +320,7 @@ python -m twine upload dist/*
320
320
 
321
321
  ---
322
322
 
323
- ## 💡 Improvements & Roadmap
323
+ ## Improvements & Roadmap
324
324
 
325
325
  * Full async API support
326
326
  * Runtime config updates
@@ -330,7 +330,7 @@ python -m twine upload dist/*
330
330
 
331
331
  ---
332
332
 
333
- ## 🤝 Contributing
333
+ ## Contributing
334
334
 
335
335
  We welcome PRs and issues! Please follow PEP8 and include tests with any changes.
336
336
 
@@ -343,7 +343,7 @@ pre-commit install
343
343
 
344
344
  ---
345
345
 
346
- ## 🏁 Dev Quick Start
346
+ ## Dev Quick Start
347
347
 
348
348
  ```bash
349
349
  git clone http://lustra.intrepidcs.corp/ics/wivi/ipa-py-library.git
@@ -367,7 +367,7 @@ PYTHONPATH=src python3 integeration_test.py
367
367
 
368
368
  ---
369
369
 
370
- ## 📄 License
370
+ ## License
371
371
 
372
372
  MIT License
373
373
  Readme.txt
@@ -1,11 +1,11 @@
1
1
  analytics_ingest/__init__.py,sha256=3NotwU8QUX3nXIZOyDiyRNM7Evhozl2aJsR630Vc5jY,68
2
- analytics_ingest/ingest_client.py,sha256=oW32pldoaDgdCGlxXuDAzflgbDoEBEzebzLiDgx_Zpk,3889
2
+ analytics_ingest/ingest_client.py,sha256=Kuw1FT9DjMjtd-UY48ENxV2fKUSVSQdGei8iwK4EFnM,3844
3
3
  analytics_ingest/internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  analytics_ingest/internal/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  analytics_ingest/internal/schemas/configuration_schema.py,sha256=u53vkAPBjEI6orcIxapiD983VrytyrSz1ZfwCymMvhc,451
6
6
  analytics_ingest/internal/schemas/dtc_schema.py,sha256=l-XeV0zj8fMwfbJH_V7SF29di4wBoMlglLwCer0tEmQ,491
7
- analytics_ingest/internal/schemas/gps_schema.py,sha256=cJGq87YJ8twyMsebseTWaNC_Q-wi6cACHIyS98PteqQ,922
8
- analytics_ingest/internal/schemas/ingest_config_schema.py,sha256=KyBLJKdK492KDmDiK4EZhf3UZVDFJkXMQE8r74OIWik,888
7
+ analytics_ingest/internal/schemas/gps_schema.py,sha256=4h7yvL8rf8jk_zdHvrCMjoVz6deidcGUvGASMMSrSdg,919
8
+ analytics_ingest/internal/schemas/ingest_config_schema.py,sha256=c9VJB98Wn4xpj8bq8QdwgVg5u-bvE3upL5L5pGV4FWE,842
9
9
  analytics_ingest/internal/schemas/message_schema.py,sha256=dtNwwjxVE0NHrsoJDiveKjus_ENZVyWj0guAGDlrW1Q,979
10
10
  analytics_ingest/internal/schemas/network_schema.py,sha256=d003Z5oAd5bT-KdBKBoKE0DI9owj0rR1951hrLoiml0,1023
11
11
  analytics_ingest/internal/schemas/signal_schema.py,sha256=vRklzKC4gaAnk-q8iafnPqP2Ch3NjpKKLW9GMK6ZA9U,3179
@@ -14,7 +14,7 @@ analytics_ingest/internal/utils/batching.py,sha256=pBnqQ6q1qK-eIf4CIovb2hJn9ATcF
14
14
  analytics_ingest/internal/utils/configuration.py,sha256=V_O-JbqkQaRIKFY6DnZy3Yf5vbAIHHICL4odgifRuXA,501
15
15
  analytics_ingest/internal/utils/dtc.py,sha256=A2ge3FP8eeGVJPq5__yPBUvycY9Hv2upP8McyAdgHyk,1282
16
16
  analytics_ingest/internal/utils/gps.py,sha256=aFM5tpzZbiQBPwHnnP1bjJsaS922GtG8WNnh0cEe8OU,659
17
- analytics_ingest/internal/utils/graphql_executor.py,sha256=J7ZB9FCeMW16-2c9FCgVDxpIR0oM2JiovcjBE5z1xuU,3266
17
+ analytics_ingest/internal/utils/graphql_executor.py,sha256=ryS09u2VxmUTfhQPAe_LnJVFQAKPTAu8UNGTapQg0tM,3113
18
18
  analytics_ingest/internal/utils/message.py,sha256=F0i5ZedQXcvs39CNLhf7PsFLYXeZqrgwJpXPiPalvKg,2796
19
19
  analytics_ingest/internal/utils/mutations.py,sha256=imXw9EmtIlcaA1VEKSOvINAHsjsjfrAOiMJCBPDgB24,2488
20
20
  analytics_ingest/internal/utils/network.py,sha256=UP18alLfHgbt4rknAoz5Icd6wImOYXJ4MQ52GB-Brns,494
@@ -28,8 +28,8 @@ factories/init_schema_factory.py,sha256=1EnCD_IHoKTER2X6gbug0ZUsr9Iho9t3bbgABwLH
28
28
  factories/message.py,sha256=C7JorFPIrFzBSfsmRP2pIQ6MKS-1H9imDhm0PMe1YSc,722
29
29
  factories/network_stats.py,sha256=HCttDWOXPUDqJnh66DuwbtJEQmUzrPGYHmaxCVD6Bvo,813
30
30
  factories/signal.py,sha256=zsj1p13dbKDStNhW0GHOOf8Ru8bM-VHV1pW1mj5ZZFs,1513
31
- ics_wivi_analytics_ingest-0.1.5.dist-info/licenses/LICENSE,sha256=y8iihD3bEcObJaLI4FUKuGXa0Yr3BnOmQ3QUPuPvO90,1649
32
- ics_wivi_analytics_ingest-0.1.5.dist-info/METADATA,sha256=-XWN709vBP1KSuyceyqBS-U1fDHachqg2HuwfAsdkN8,12427
33
- ics_wivi_analytics_ingest-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- ics_wivi_analytics_ingest-0.1.5.dist-info/top_level.txt,sha256=SSaHIk3V55_kvJGdVYLZUIP5tJVdSibTLt1rFtqKN00,27
35
- ics_wivi_analytics_ingest-0.1.5.dist-info/RECORD,,
31
+ ics_wivi_analytics_ingest-0.1.7.dist-info/licenses/LICENSE,sha256=y8iihD3bEcObJaLI4FUKuGXa0Yr3BnOmQ3QUPuPvO90,1649
32
+ ics_wivi_analytics_ingest-0.1.7.dist-info/METADATA,sha256=LBU7NwVQsmAIMcFRaJqX0ncxrQkCO9noDBppiGjCkpc,12488
33
+ ics_wivi_analytics_ingest-0.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ ics_wivi_analytics_ingest-0.1.7.dist-info/top_level.txt,sha256=SSaHIk3V55_kvJGdVYLZUIP5tJVdSibTLt1rFtqKN00,27
35
+ ics_wivi_analytics_ingest-0.1.7.dist-info/RECORD,,