Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downsampling #27

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open

Downsampling #27

wants to merge 48 commits into from

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

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 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
Preview

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 is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@@ -0,0 +1,48 @@

Copy link
Preview

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 is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
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