Skip to content

Conversation

@tomas-quix
Copy link
Collaborator

No description provided.

@tomas-quix tomas-quix self-assigned this Jan 30, 2025
@tomas-quix tomas-quix requested a review from Copilot January 30, 2025 14:24
@tomas-quix tomas-quix removed their assignment Jan 30, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 11 changed files in this pull request and generated no comments.

Files not reviewed (6)
  • Downsampling/dockerfile: Language not supported
  • Downsampling/requirements.txt: Language not supported
  • grafana/dashboards/sensors.json: Language not supported
  • raw-to-table/requirements.txt: Language not supported
  • raw-to-table/main.py: Evaluated as low risk
  • fleet-console-web-sockets/main.py: Evaluated as low risk
Comments suppressed due to low confidence (1)

Downsampling/main.py:9

  • The environment variable 'window_size_s' is used without validation. Ensure it is a valid integer before using it.
window_size_s = os.environ["window_size_s"]

@tomas-quix tomas-quix requested a review from Copilot January 30, 2025 15:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 11 changed files in this pull request and generated 2 comments.

Files not reviewed (6)
  • Downsampling/dockerfile: Language not supported
  • Downsampling/requirements.txt: Language not supported
  • grafana/dashboards/sensors.json: Language not supported
  • raw-to-table/requirements.txt: Language not supported
  • raw-to-table/main.py: Evaluated as low risk
  • fleet-console-web-sockets/main.py: Evaluated as low risk
Comments suppressed due to low confidence (3)

Downsampling/main.py:9

  • The environment variable 'window_size_s' is accessed directly without validation. This can cause runtime errors if the variable is not set or is not an integer. Add a validation check to ensure 'window_size_s' is set and is a valid integer.
window_size_s = os.environ["window_size_s"]

Downsampling/downsampling.py:38

  • Ensure that the key 'end' exists in the 'window' dictionary before accessing it to avoid a KeyError.
"timestamp": int(window["end"] * 1E6)

Downsampling/downsampling.py:41

  • Ensure that the key 'value' exists in the 'window' dictionary before accessing it to avoid a KeyError.
for key, value in window["value"].items():

value: sensor-data-1s
- name: window_size_s
inputType: FreeText
description: ''
Copy link

Copilot AI Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description for 'window_size_s' is empty. Please provide a clear description.

Suggested change
description: ''
description: 'Size of the time window in seconds for downsampling.'

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,48 @@

Copy link

Copilot AI Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the empty lines at the beginning of the file.

Suggested change
def reduce_window(window:dict, row: dict):

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant