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

Fix mavutil imports #49

Merged
merged 8 commits into from
Aug 25, 2024
Merged

Fix mavutil imports #49

merged 8 commits into from
Aug 25, 2024

Conversation

maxlou05
Copy link
Member

mavutil is imported from pymavlink and not dronekit

Copy link
Contributor

@TongguangZhang TongguangZhang left a comment

Choose a reason for hiding this comment

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

reviewed

.github/workflows/run-tests.yml Show resolved Hide resolved
camera/test_camera.py Show resolved Hide resolved
@@ -39,14 +39,3 @@ def main() -> int:

# Note: the following fail since JPEG encoding is lossy
Copy link
Contributor

Choose a reason for hiding this comment

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

move this to docstring or conf maybe? up to you tho

image_encoding/test_image_encode_decode.py Show resolved Hide resolved
kml/test_ground_locations_to_kml.py Show resolved Hide resolved
from .. import dronekit
from pymavlink import mavutil
Copy link
Contributor

Choose a reason for hiding this comment

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

why does our version of dronekit not include mavutil?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm pretty sure dronekit never included mavutil. It's just that dronekit depended upon mavutil, and it somehow worked?

Copy link
Contributor

@TongguangZhang TongguangZhang left a comment

Choose a reason for hiding this comment

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

conditionally approved

@maxlou05 maxlou05 merged commit cab3971 into main Aug 25, 2024
1 check passed
@maxlou05 maxlou05 deleted the fix-imports branch August 25, 2024 15:42
maxlou05 added a commit that referenced this pull request Sep 1, 2024
* mavutil is imported from pymavlink and not dronekit

* fix linter and add __init__ file for root directory (since common is meant to be a module)

* Apparently pytest cannot work if root dir has __init__ file

* switch to relative imports

* edit ci workflow to upgrade pip first

* udpate CI workflow to newer versions

* try adding __init__ again

* move comment to doc string for test_image_encode_decode
maxlou05 added a commit that referenced this pull request Sep 2, 2024
* Add image_encode and socket_wrapper in lte module

* Refactor socket classes into client/server

* Refactor network wrapper into "ClientSocket" and "ServerSocket" classes. Write tests for sending images

* Run linters/formatters

* Black and Pylint changes

* Fixes for test_network.py

* Refactor pytest into sender and receiver scripts

* Fix in ServerSocket constructor

* bug fixes for tests, and linter formats

* - Refactored to indicate current sockets are TCP specific
- Simplified many steps by using higher-level APIs
- Added some comments and changed README

* Created UDP sockets (#36)

* Created UDP Sockets

* Addressed Comments

* Added send() function and override recv() function in client_socket.py, addressed minor changes in socket_wrapper.py

* Made requested changes

* Updated docstrings

* Modify TCP unit tests to remove image encoding + linter and other fixes

* fix rebase to main

* add UDP unit tests + pytest automated unit tests for TCP & UDP. Refactored UDP class.

* linter fixes

* fix relative path issues

* add integration test and slight modification to image_encoding

* fix network address overuse in pytest due to teardown not fast enough

* Update to python 3.11 (#47)

* Using own forked dronekit, which is now compatible with python 3.11

* update to python 3.11

* incorporate WARG's dronekit fork as a submodule

* fix new dronekit import in tests

* fix linter issues

* update submodules

* minor fixes

* add project setup scripts which update submodules as well

* remove submodule libraries from requirements

* remove empty comment in requirement.txt

* Fix mavutil imports (#49)

* mavutil is imported from pymavlink and not dronekit

* fix linter and add __init__ file for root directory (since common is meant to be a module)

* Apparently pytest cannot work if root dir has __init__ file

* switch to relative imports

* edit ci workflow to upgrade pip first

* udpate CI workflow to newer versions

* try adding __init__ again

* move comment to doc string for test_image_encode_decode

* Add image_encode and socket_wrapper in lte module

* Refactor socket classes into client/server

* Refactor network wrapper into "ClientSocket" and "ServerSocket" classes. Write tests for sending images

* Run linters/formatters

* Black and Pylint changes

* Fixes for test_network.py

* Refactor pytest into sender and receiver scripts

* Fix in ServerSocket constructor

* bug fixes for tests, and linter formats

* - Refactored to indicate current sockets are TCP specific
- Simplified many steps by using higher-level APIs
- Added some comments and changed README

* Created UDP sockets (#36)

* Created UDP Sockets

* Addressed Comments

* Added send() function and override recv() function in client_socket.py, addressed minor changes in socket_wrapper.py

* Made requested changes

* Updated docstrings

* Modify TCP unit tests to remove image encoding + linter and other fixes

* fix rebase to main

* add UDP unit tests + pytest automated unit tests for TCP & UDP. Refactored UDP class.

* linter fixes

* use relative imports

* rename modules to be lower case

* make socket's server_address variable private, fixed logger pytest

---------

Co-authored-by: Maxwell Lou <maxlou2005@gmail.com>
Co-authored-by: Herman Gahra <108769665+HermanG05@users.noreply.github.com>
Co-authored-by: Maxwell Lou <62454180+maxlou05@users.noreply.github.com>
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.

2 participants