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

Feature/eco counter telraam enable camera move #314

Merged
merged 40 commits into from
Oct 30, 2023

Conversation

juuso-j
Copy link

@juuso-j juuso-j commented Oct 11, 2023

Possibility to move Telraam cameras

Trello #489


Breakdown:

API

  1. eco_counter/api/serializers.py
    • Add is_active, data_from_date and data_until_date fields, removed data_from_year field

Management command

  1. eco_counter/management/commands/delete_counter_data.py
    • Add management command to delete specific counter data
  2. eco_counter/management/commands/import_counter_data.py
    • Major refactoring. Handle Telraam counter so that the cameras can be moved.
  3. eco_counter/management/commands/import_telraam_to_csv.py
    • Save location and geometry as comment into the daily CSV file
  4. eco_counter/management/commands/utils.py
    • Return Telraam data frame for every camera position. Parse Telraam CSV file comment. Save Telraam cameras into station. Refactoring

Other

  1. eco_counter/README.md
    • Add info about deletion
  2. eco_counter/constants.py
    • Add Telraam init coordinates, moved constants from importer
  3. eco_counter/tasks.py
    • Add task for deleting data

Tests

  1. eco_counter/tests/conftest.py
    • Add is_active fixture and refactor
  2. eco_counter/tests/constants.py
    • add TEST_COLUMN_NAMES
  3. eco_counter/tests/test_api.py
    • Test is_active, data_from_date and data_until_date fields
  4. eco_counter/tests/test_import_counter_data.py
    • Test importing/moving Telraam cameras
  5. eco_counter/tests/utils.py
    *Add function to generate Telraam fixture data

@juuso-j juuso-j added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Oct 11, 2023
@juuso-j juuso-j requested a review from ezkat October 11, 2023 05:45
@juuso-j juuso-j self-assigned this Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Attention: 140 lines in your changes are missing coverage. Please review.

Comparison is base (bcc68d8) 67.28% compared to head (42abd74) 66.59%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #314      +/-   ##
===========================================
- Coverage    67.28%   66.59%   -0.70%     
===========================================
  Files          214      217       +3     
  Lines        12967    13766     +799     
  Branches      1647     1759     +112     
===========================================
+ Hits          8725     9167     +442     
- Misses        3883     4230     +347     
- Partials       359      369      +10     
Files Coverage Δ
eco_counter/api/serializers.py 100.00% <100.00%> (ø)
eco_counter/constants.py 100.00% <100.00%> (ø)
eco_counter/tests/conftest.py 100.00% <100.00%> (ø)
eco_counter/tests/constants.py 100.00% <100.00%> (ø)
eco_counter/tests/test_api.py 100.00% <100.00%> (ø)
eco_counter/tests/test_import_counter_data.py 26.13% <100.00%> (+18.88%) ⬆️
eco_counter/tasks.py 0.00% <0.00%> (ø)
eco_counter/tests/utils.py 92.85% <92.85%> (ø)
eco_counter/management/commands/utils.py 19.81% <25.84%> (ø)
...counter/management/commands/import_counter_data.py 67.25% <70.58%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juuso-j juuso-j merged commit 21fa5c9 into develop Oct 30, 2023
5 checks passed
@juuso-j juuso-j mentioned this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants