Skip to content

Commit f378f97

Browse files
committed
initial commit
0 parents  commit f378f97

32 files changed

+3007
-0
lines changed

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.DS_Store
2+
.dropbox
3+
.project
4+
.coverage
5+
.pydevproject
6+
*.code-workspace
7+
Pipfile*.*
8+
/.settings
9+
/htmlcov
10+
/build
11+
/dist
12+
/docs/_build
13+
/references
14+
/pyubxutils_*
15+
/pyubxutils-*
16+
src/pyubxutils.egg-*
17+
/__pycache__
18+
/.dbeaver
19+
/pyubxutils/__pycache__
20+
/tests/__pycache__
21+
*.pyc
22+
/examples/ubxsandpit.py
23+
/examples/temp*.*
24+
/.pytest_cache/
25+
pylint_report.txt
26+
venv
27+
output.*

.vscode/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"python.testing.pytestEnabled": true,
3+
"python.testing.unittestEnabled": false,
4+
"editor.formatOnSave": true,
5+
"python.defaultInterpreterPath": "python3",
6+
"modulename": "${workspaceFolderBasename}",
7+
"distname": "${workspaceFolderBasename}",
8+
"moduleversion": "1.0.0"
9+
}

.vscode/tasks.json

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
// Use the Install Build/Test Dependencies tasks to install the necessary packages.
5+
"version": "2.0.0",
6+
"tasks": [
7+
{
8+
"label": "Install Dependencies",
9+
"type": "process",
10+
"command": "${config:python.defaultInterpreterPath}",
11+
"args": [
12+
"-m",
13+
"pip",
14+
"install",
15+
"--upgrade",
16+
"."
17+
],
18+
"problemMatcher": []
19+
},
20+
{
21+
"label": "Clean",
22+
"type": "shell",
23+
"command": "rm",
24+
"args": [
25+
"-rfvd",
26+
"build",
27+
"dist",
28+
"htmlcov",
29+
"docs/_build",
30+
"${config:modulename}.egg-info",
31+
],
32+
"windows": {
33+
"command": "Get-ChildItem",
34+
"args": [
35+
"-Path",
36+
"build\\,",
37+
"dist\\,",
38+
"htmlcov\\,",
39+
"docs\\_build,",
40+
"${config:modulename}.egg-info",
41+
"-Recurse",
42+
"|",
43+
"Remove-Item",
44+
"-Recurse",
45+
"-Confirm:$false",
46+
"-Force",
47+
],
48+
},
49+
"options": {
50+
"cwd": "${workspaceFolder}"
51+
},
52+
"problemMatcher": []
53+
},
54+
{
55+
"label": "Sort Imports",
56+
"type": "process",
57+
"command": "${config:python.defaultInterpreterPath}",
58+
"args": [
59+
"-m",
60+
"isort",
61+
"src",
62+
"--jobs",
63+
"-1"
64+
],
65+
"problemMatcher": []
66+
},
67+
{
68+
"label": "Format",
69+
"type": "process",
70+
"command": "${config:python.defaultInterpreterPath}",
71+
"args": [
72+
"-m",
73+
"black",
74+
"src"
75+
],
76+
"problemMatcher": []
77+
},
78+
{
79+
"label": "Pylint",
80+
"type": "process",
81+
"command": "${config:python.defaultInterpreterPath}",
82+
"args": [
83+
"-m",
84+
"pylint",
85+
"src"
86+
],
87+
"problemMatcher": []
88+
},
89+
{
90+
"label": "Security",
91+
"type": "process",
92+
"command": "${config:python.defaultInterpreterPath}",
93+
"args": [
94+
"-m",
95+
"bandit",
96+
"-c",
97+
"pyproject.toml",
98+
"-r",
99+
"."
100+
],
101+
"problemMatcher": []
102+
},
103+
{
104+
"label": "Build",
105+
"type": "process",
106+
"command": "${config:python.defaultInterpreterPath}",
107+
"args": [
108+
"-m",
109+
"build",
110+
".",
111+
"--wheel",
112+
"--sdist",
113+
],
114+
"problemMatcher": []
115+
},
116+
{
117+
"label": "Test",
118+
"type": "process",
119+
"command": "${config:python.defaultInterpreterPath}",
120+
"args": [
121+
"-m",
122+
"pytest",
123+
],
124+
"problemMatcher": []
125+
},
126+
{
127+
"label": "Sphinx",
128+
"type": "process",
129+
"command": "sphinx-apidoc",
130+
"args": [
131+
"--doc-project=${config:modulename}",
132+
"--doc-author=semuadmin",
133+
"--doc-version=${config:moduleversion}",
134+
"--doc-release=${config:moduleversion}",
135+
"--ext-autodoc",
136+
"--ext-viewcode",
137+
"--templatedir=docs",
138+
"-f",
139+
"-o",
140+
"docs",
141+
"src/${config:modulename}"
142+
],
143+
"problemMatcher": []
144+
},
145+
{
146+
"label": "Sphinx HTML",
147+
"type": "process",
148+
"command": "/usr/bin/make",
149+
"windows": {
150+
"command": "${workspaceFolder}/docs/make.bat"
151+
},
152+
"args": [
153+
"html"
154+
],
155+
"options": {
156+
"cwd": "${workspaceFolder}/docs"
157+
},
158+
"dependsOrder": "sequence",
159+
"dependsOn": [
160+
"Sphinx"
161+
],
162+
"problemMatcher": []
163+
},
164+
{
165+
"label": "Sphinx Deploy to S3", // needs AWS credentials
166+
"type": "process",
167+
"command": "aws",
168+
"args": [
169+
"s3",
170+
"cp",
171+
"${workspaceFolder}/docs/_build/html",
172+
"s3://www.semuconsulting.com/${config:modulename}/",
173+
"--recursive"
174+
],
175+
"dependsOrder": "sequence",
176+
"dependsOn": [
177+
"Sphinx HTML"
178+
],
179+
"problemMatcher": []
180+
},
181+
{
182+
"label": "Install Locally",
183+
"type": "process",
184+
"command": "${config:python.defaultInterpreterPath}",
185+
"args": [
186+
"-m",
187+
"pip",
188+
"install",
189+
"${workspaceFolder}/dist/${config:distname}-${config:moduleversion}-py3-none-any.whl",
190+
"--user",
191+
"--force-reinstall"
192+
],
193+
"dependsOrder": "sequence",
194+
"dependsOn": [
195+
"Clean",
196+
"Install Dependencies",
197+
"Security",
198+
"Sort Imports",
199+
"Format",
200+
"Pylint",
201+
//"Test",
202+
"Build",
203+
"Sphinx HTML"
204+
],
205+
"problemMatcher": []
206+
},
207+
]
208+
}

CITATION.bib

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@Misc{pyubxutils,
2+
author = {{SEMU Consulting}},
3+
howpublished = {GitHub repository},
4+
note = {Viewed last: xxxx:xx:xx},
5+
title = {Python library for reading, parsing and generating NMEA, UBX and RTCM3 GNSS messages},
6+
year = {2022},
7+
url = {https://github.com/semuconsulting/pyubxutils},
8+
}

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at semuadmin@semuconsulting.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# pyubxutils How to contribute
2+
3+
**pyubxutils** is a volunteer project and we appreciate any contribution, from fixing a grammar mistake in a comment to extending device test coverage or implementing new functionality. Please read this section if you are contributing your work.
4+
5+
If you're intending to make significant changes, please raise them in the [Discussions Channel](https://github.com/semuconsulting/pyubxutils/discussions/categories/ideas) beforehand.
6+
7+
Being one of our contributors, you agree and confirm that:
8+
9+
* The work is all your own.
10+
* Your work will be distributed under a BSD 3-Clause License once your pull request is merged.
11+
* You submitted work fulfils or mostly fulfils our coding conventions, styles and standards.
12+
13+
Please help us keep our issue list small by adding fixes: #{$ISSUE_NO} to the commit message of pull requests that resolve open issues. GitHub will use this tag to auto close the issue when the PR is merged.
14+
15+
## Coding conventions
16+
17+
* This is open source software. Code should be as simple and transparent as possible. Favour clarity over brevity.
18+
* The code should be compatible with Python >= 3.9.
19+
* Avoid external library dependencies unless there's a compelling reason not to.
20+
* We use and recommend [Visual Studio Code](https://code.visualstudio.com/) with the [Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for development and testing.
21+
* Code should be documented in accordance with [Sphinx](https://www.sphinx-doc.org/en/master/) docstring conventions.
22+
* Code should formatted using [black](https://pypi.org/project/black/) (>= 24.4).
23+
* We use and recommend [pylint](https://pypi.org/project/pylint/) (>=3.0.1) for code analysis.
24+
* We use and recommend [bandit](https://pypi.org/project/bandit/) (>=1.7.5) for security vulnerability analysis.
25+
* Commits must be [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
26+
27+
## Testing
28+
29+
While we endeavour to test on as wide a variety of u-blox devices as possible, as a volunteer project we only have a limited number of devices available. We particularly welcome testing contributions relating to specialised devices (e.g. high precision HP, real-time kinematics RTK, automotive dead-reckoning ADR, etc.).
30+
31+
We use python's native pytest framework for local unit testing, complemented by the GitHub Actions automated build and testing workflow.
32+
33+
Please write pytest examples for new code you create and add them to the `/tests` folder following the naming convention `test_*.py`.
34+
35+
We test on the following platforms using a variety of u-blox devices from Generation 7 throught Generation 10:
36+
* Windows 11
37+
* MacOS (Ventura & Sonoma, Intel & Apple Silicon)
38+
* Linux (Ubuntu 22.04 LTS Jammy Jellyfish, 24.04 LTS Noble Numbat)
39+
* Raspberry Pi OS (32-bit & 64-bit)
40+
41+
## Submitting changes
42+
43+
Please send a [GitHub Pull Request to pyubxutils](https://github.com/semuconsulting/pyubxutils/pulls) with a clear list of what you've done (read more about [pull requests](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests)). Please follow our coding conventions (above) and make sure all of your commits are atomic (one feature per commit).
44+
45+
Please sign all commits - see [Signing GitHub Commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) for instructions.
46+
47+
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
48+
49+
$ git commit -m "A brief summary of the commit
50+
>
51+
> A paragraph describing what changed and its impact."
52+
53+
54+
Thanks,
55+
56+
semuadmin

0 commit comments

Comments
 (0)