High precision GPS firmware for point surveyor xHound hardware modules based on ARM64 Raspberry Pi platforms.
👉 We aim to automate this setup process. In the meantime, use the following instructions.
- Download and install Visual Studio Code
- Download and install the latest version of Python 3.9.x
- Install
pipenv
by opening an elevated terminal window and runningpip install pipenv
. - Clone this repository and initialize the environment
- Open a command window.
- Create a subdirectory where to deploy the sources (e.g.,
mkdir C:\repos
). - Change current directory to the desired location (e.g.,
cd C:\repos
). - Clone the repository (i.e.,
git clone https://github.com/dacabdi/xhoundpi.git
). - Step into the sources directory (i.e.,
cd xhoundapi
if you are still inC:\repos
). - Run command
pipenv install --dev
and await for initialization to complete. - Run
pipenv shell
to enter thepipenv
shell for this environment.
- Verify by running tests and linter (see below in Testing and validation)
- Download and install Visual Studio Code
- Install Python 3 (use this guide)
- Ensure that Python and
pip
are installed$ python --version
and$ pip --version
respectively. - From a terminal window, run:
$ pip install pipenv
.
- Ensure that Python and
- Clone this repository and initialize the environment
- Open a command window.
- Create a subdirectory where to deploy the sources (e.g.,
md ~\repos
). - Change current directory to the desired location (e.g.,
cd ~\repos
). - Clone the repository (i.e.,
git clone https://github.com/dacabdi/xhoundpi.git
). - Step into the sources directory (i.e.,
cd xhoundapi
if you are still in~\repos
). - Run command
pipenv install --dev
and await for initialization to complete. - Run
pipenv shell
to enter thepipenv
shell for this environment.
- Verify by running tests and linter (see below in Testing and validation)
- Open workspace (i.e.,
code .
on the project root)
- Run all tests issue the following command from the root of the repository:
pipenv run python -m unittest discover --verbose --locals
- Then run the linter using the commend:
pipenv run pylint xhoundpi
(tests are not linting and style conforming but please keep them clean)
Run Canary to perform a smoke test of the overall functionality by issuing the command $ python -m tools.canary --verbose --parse-gnss-input ./data/mixed_nmea_ubx_sample.cap ./gnss_out.hex
. This will prepare mocked input and output files, run xHoundPi, and collect results for a simple smoke test. The return code of the process indicates success/failure.
The project nektos/act
is designed to run GitHub actions locally and provide immediate feedback without resorting to the GitHub agents and pipelines. These tests would provide a closer validation to the one your PRs will be subjected too and always setup temporary clean environments on every run. Follow the setup instructions on the project's README and use it with our repository to run the validation workflows.
act
s ability to resolve the Python versions. Will be fixed soon.
To allow functional testing in isolation from the hardware, we have collected captures off the actual devices. See the data
subdir for samples (the notes.md
file describes the contents). To convert these text based captures to binary files, run the following commands from the root of the repository (assumes the pipenv
shell is initialized):
$ python -m tools.hermes [inputfile] [outputfile]
E.g., to parse the data/mixed_nmea_ubx_sample.txt
file and output the results into the file data.hex
use $ python -m tools.hermes "data/mixed_nmea_ubx_sample.txt" "data.hex"
. .hex
extension for your processed samples, it will allow to filter them in the .gitignore
file and avoid accidentally commiting them.
- Branches should be named
[user-github-handle]/[topic]
.⚠️ Will be enforced programmatically in the future. - We aim for 100% test coverage, PRs with no testing and verification should not/will not be completed.
- Squash all commits into one and delete the PR branch upon completion/merge.
- Provide context in the PR description and ensure at least one other member reviewed the code.
- All PRs must be named following the convention
[feature,patch,release,major]/some-informative-title'
to pass validation. This is programmatically enforced. The prefixes will be mapped to a version bump as follows (brush up on semantic versioning to better understand the scheme),
release -> release
major -> major
feature -> minor
patch -> patch
😃 Happy coding!
See LICENSE file.