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

Update to python 3.11 #47

Merged
merged 10 commits into from
Aug 22, 2024
Merged

Update to python 3.11 #47

merged 10 commits into from
Aug 22, 2024

Conversation

maxlou05
Copy link
Member

Tested test_flight_controller.py with mission planner simulation, which succeeded.

@maxlou05 maxlou05 changed the title [draft] copied dronkeit code to make compatible with python 3.11 Update to python 3.11 Aug 19, 2024
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

requirements.txt Outdated
Comment on lines 15 to 18

# (from dronekit-python)
pymavlink>=2.2.20
monotonic>=1.3
Copy link
Contributor

Choose a reason for hiding this comment

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

move to dronekit requirements and install from there

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

requirements.txt Outdated
Comment on lines 14 to 15
# Module mavlink
dronekit

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove the comment

git submodule update --init --remote --recursive
git submodule foreach --recursive "pip install -r requirements.txt"

deactivate
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we deactivate the venv after installing dependencies?

git submodule update --init --remote --recursive
git submodule foreach --recursive "pip install -r requirements.txt"

deactivate
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

@maxlou05 maxlou05 merged commit 1c001ea into main Aug 22, 2024
1 check passed
@maxlou05 maxlou05 deleted the py311 branch August 22, 2024 02:07
maxlou05 added a commit that referenced this pull request Sep 1, 2024
* 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
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