-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init commit * added print messages in run func * fixed location and waypoint retrieval * init commit * added print messages in run func * fixed location and waypoint retrieval * misc changes for merge * reverted prev change for merge * added new function under modules * fixed description * fixed spacing * fixed waypoint_tracking * fixed styling * fixed function descriptions * modified return status * added print messages for location * modified dronekit connection * changed method of counting in waypoint_trakcing * added github workflow * added workflow fix * removed skipped pytests * Update run-tests.yml * add zbar library to fix build error * updated tests to remove ci errors * remove zbar installation * revert changes * adjusted comments on tests * comment adjustment
- Loading branch information
Showing
4 changed files
with
60 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This workflow will install Python dependencies and run tests with PyTest using Python 3.8 | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Set Python version | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
# Set up submodules and submodule dependencies | ||
- name: Set up submodule and submodule dependencies | ||
run: | | ||
git submodule update --init --recursive --remote | ||
pip install -r ./modules/common/requirements.txt | ||
# Install pathing dependencies | ||
- name: Install project dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
# Install zbar library to resolve pyzbar import error | ||
- name: Install zbar library | ||
run: sudo apt-get install libzbar0 | ||
|
||
# Run tests with PyTest | ||
- name: Run tests | ||
run: pytest -vv |
Submodule common
updated
4 files
+7 −10 | kml/modules/waypoints_to_kml.py | |
+10 −17 | kml/test_waypoints_to_kml.py | |
+6 −26 | mavlink/modules/drone_odometry.py | |
+3 −9 | mavlink/modules/flight_controller.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,19 @@ | ||
""" | ||
Test process. | ||
Tests functionality for qr_input. | ||
""" | ||
|
||
import pytest | ||
|
||
from modules import qr_input | ||
|
||
|
||
CAMERA = 0 | ||
|
||
|
||
pytest.skip("Integration test", allow_module_level=True) | ||
|
||
|
||
def test_qr_input(): | ||
""" | ||
Tests functionality for qr_input | ||
""" | ||
is_qr_found, qr_string = qr_input.qr_input(CAMERA) | ||
if __name__ == '__main__': | ||
|
||
if is_qr_found: | ||
print(f"Decoded QR code with string value: {qr_string}") | ||
else: | ||
print("Exited early before a QR code was read") | ||
result, qr_string = qr_input.qr_input(CAMERA) | ||
assert result | ||
assert qr_string is not None | ||
|
||
print(f"Decoded QR code with string value: {qr_string}") | ||
|
||
if __name__ == '__main__': | ||
test_qr_input() | ||
print("Done!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters