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

Add measurement campaign table #108

Merged
merged 72 commits into from
Mar 9, 2023
Merged

Conversation

cortadocodes
Copy link
Member

@cortadocodes cortadocodes commented Nov 2, 2022

Summary

Add support for thew new measurement campaigns table in BigQuery. This allows data to be associated with a measurement campaign that can be given a label and description. The code has also been cleaned up and some bugs fixed.

Contents (#108)

IMPORTANT: There are 2 breaking changes.

New features

  • Add measurement campaign data (start time, end time, label, and available sensors) to session table when uploading a window

Enhancements

  • Replace label field with session_reference in existing tables

Fixes

  • Raise warning if data gateway configuration not present in metadata

Reversions

  • 💥 BREAKING CHANGE: Remove ability to provide label via CLI

Operations

  • Use latest conventional commit message checker
  • Use new Octue GitHub actions in workflows
  • Pin snok/install-poetry to avoid missing poetry bug
  • Ensure poetry is available within tox
  • Use new syntax for setting outputs in GitHub workflow

Dependencies

  • 💥 BREAKING CHANGE: Drop python3.7 support
  • Update dependencies to patch some security vulnerabilities
  • Use octue==0.41.0
  • Add pandas dev dependency
  • Add missing pyarrow dev dependency
  • Combine old dev-dependencies group with new dev group
  • Regenerate requirements files for Raspberry Pi

Refactoring

  • Remove repetition of method call in BatchingUploader
  • Factor stopping the gateway out into a method

Testing

  • Avoid timezone issues with timestamp value of 0
  • Update MockBigQueryClient
  • Rename MockBigQueryClient.rows attribute to inserted_rows
  • Use Mock instead of types.SimpleNamespace
  • Update deployment test to check for session creation

Upgrade instructions

💥 Remove ability to provide label via CLI

Provide a "label" key mapped to the label in the "measurement_campaign" dictionary of the configuration file instead.

💥 Drop python3.7 support

Update to python>=3.8.

@cortadocodes cortadocodes self-assigned this Nov 2, 2022
@cortadocodes cortadocodes linked an issue Nov 2, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2022

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.76 ⚠️

Comparison is base (cf3b26f) 60.87% compared to head (cec5a3d) 60.11%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
- Coverage   60.87%   60.11%   -0.76%     
==========================================
  Files          15       15              
  Lines        1122     1176      +54     
==========================================
+ Hits          683      707      +24     
- Misses        439      469      +30     
Impacted Files Coverage Δ
data_gateway/packet_reader.py 44.76% <27.90%> (-2.13%) ⬇️
data_gateway/data_gateway.py 90.00% <68.42%> (+1.11%) ⬆️
data_gateway/persistence.py 94.20% <87.50%> (-0.50%) ⬇️
data_gateway/cli.py 91.57% <100.00%> (ø)
data_gateway/configuration.py 94.26% <100.00%> (+0.04%) ⬆️
data_gateway/serial_port.py 93.75% <0.00%> (-6.25%) ⬇️
data_gateway/dummy_serial/dummy_serial.py 90.00% <0.00%> (-4.29%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cortadocodes cortadocodes force-pushed the feature/add-sessions-table branch from 15b5ab6 to 9485a04 Compare November 2, 2022 16:55
Copy link
Contributor

@time-trader time-trader left a comment

Choose a reason for hiding this comment

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

Changes to conversion constants and number of sensors..

tests/valid_configuration.json Outdated Show resolved Hide resolved
tests/valid_configuration.json Outdated Show resolved Hide resolved
tests/valid_configuration.json Outdated Show resolved Hide resolved
tests/valid_configuration.json Show resolved Hide resolved
@cortadocodes cortadocodes changed the title Add sessions table Add measurement campaign table Mar 9, 2023
@cortadocodes cortadocodes merged commit 86ff01f into main Mar 9, 2023
@cortadocodes cortadocodes deleted the feature/add-sessions-table branch March 9, 2023 16:52
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.

Add sessions table
3 participants