-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(python): replace black with ruff for formatting + linting (#43)
- Loading branch information
1 parent
5087e06
commit 6ff1523
Showing
13 changed files
with
138 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
""" | ||
Contains the in memory representation of a telemetry config used to configure ingestion. | ||
""" | ||
|
||
from __future__ import annotations | ||
from ..flow import FlowConfig | ||
from typing import List, Optional | ||
|
||
|
||
class TelemetryConfig: | ||
""" | ||
Configurations necessary to start ingestion. | ||
Attributes: | ||
asset_name: The name of the asset that you wish to telemeter data for. | ||
ingestion_client_key: An arbitrary string completely chosen by the user to uniquely identify | ||
this ingestion configuration. It should be unique with respect to your | ||
organization. | ||
flows: The list of `FlowConfig`. A single flow can specify a single channel value | ||
or a set of channel values, with each value belonging to a different channel. Channels | ||
that send data at the same frequency and time should be in the same flow. | ||
organization_id: ID of your organization in Sift. This field is only required if your user | ||
belongs to multiple organizations | ||
""" | ||
|
||
asset_name: str | ||
ingestion_client_key: str | ||
organization_id: Optional[str] | ||
flows: List[FlowConfig] | ||
|
||
def __init__( | ||
self, | ||
asset_name: str, | ||
ingestion_client_key: str, | ||
organization_id: Optional[str] = None, | ||
flows: List[FlowConfig] = [], | ||
): | ||
self.asset_name = asset_name | ||
self.ingestion_client_key = ingestion_client_key | ||
self.organization_id = organization_id | ||
self.flows = flows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
python/lib/sift_py/ingestion/config_test.py → ...lib/sift_py/ingestion/config/yaml_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters