Skip to content

Commit

Permalink
Issue #324 and #318 fixes
Browse files Browse the repository at this point in the history
Things in this PR
1. fix issue #324 to add `--embed-auditing-info` and to remove, by default, all ephemeral meta data from the built-in templates.
2. fix issue #318 by adding `pascal` to the reserved word list for C
3. fixup copyrights to be dateless (in library)
4. general cleanup based on linter feedback as I encountered it.
5. modernized pytest dependencies
6. updated pydsdl dependency to use the latest
7. updated development environment detils (e.g. newer toxic container,
   improvements to coverage configuration and cSpell, switch to pylint, etc.)
8.various documentation improvements and cleanup
  • Loading branch information
thirtytwobits committed Mar 13, 2024
1 parent 09d9112 commit 8cffe45
Show file tree
Hide file tree
Showing 64 changed files with 2,026 additions and 952 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"ms-python.python",
"ms-python.mypy-type-checker",
"ms-python.black-formatter",
"ms-python.flake8",
"ms-python.autopep8"
"ms-python.pylint"
]
}
},
Expand Down
6 changes: 3 additions & 3 deletions .github/verify.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
#
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# Copyright (C) 2018-2021 OpenCyphal Development Team <opencyphal.org>
# This software is distributed under the terms of the MIT License.
# Copyright (C) OpenCyphal Development Team <opencyphal.org>
# Copyright Amazon.com Inc. or its affiliates.
# SPDX-License-Identifier: MIT
#
"""
Command-line helper for running verification builds.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
release:
if: ${{ github.event_name == 'release' && !github.event.release.prerelease }}
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toxic:tx22.4.1
container: ghcr.io/opencyphal/toxic:tx22.4.2
steps:
- uses: actions/checkout@v3
with:
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toxic:tx22.4.1
container: ghcr.io/opencyphal/toxic:tx22.4.2
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -75,10 +75,12 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
with:
args: >
-Dsonar.login=${{ env.SONAR_TOKEN }}
-Dsonar.token=${{ env.SONAR_TOKEN }}
-Dsonar.buildString=${{ env.GITHUB_RUN_ID }}
-Dsonar.projectVersion=${{ env.NUNAVUT_MAJOR_MINOR_VERSION }}
-Dsonar.python.version=python3.10
-Dsonar.python.coverage.reportPaths=.tox/report/tmp/coverage.xml
-Dsonar.python.xunit.reportPath=.tox/py310-test/tmp/xunit-result.xml
- name: report-pr
if: ${{ github.event_name == 'pull_request' }}
uses: sonarsource/sonarcloud-github-action@master
Expand All @@ -87,15 +89,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >
-Dsonar.login=${{ env.SONAR_TOKEN }}
-Dsonar.token=${{ env.SONAR_TOKEN }}
-Dsonar.buildString=${{ env.GITHUB_RUN_ID }}
-Dsonar.projectVersion=${{ env.NUNAVUT_MAJOR_MINOR_VERSION }}
-Dsonar.python.version=python3.10
-Dsonar.python.coverage.reportPaths=.tox/report/tmp/coverage.xml
-Dsonar.python.xunit.reportPath=.tox/py310-test/tmp/xunit-result.xml
compat-test-python3-windows-and-mac:
strategy:
matrix:
python3-version: ['10','11']
python3-version: ['11','12']
python3-platform: ['windows-latest', 'macos-latest']
runs-on: ${{ matrix.python3-platform }}
needs: test
Expand All @@ -115,9 +119,9 @@ jobs:
compat-test-python3-ubuntu:
strategy:
matrix:
python3-version: ['7', '8', '9', '10', '11']
python3-version: ['7', '8', '9', '10', '11', '12']
runs-on: ubuntu-latest
container: ghcr.io/opencyphal/toxic:tx22.4.1
container: ghcr.io/opencyphal/toxic:tx22.4.2
needs: test
steps:
- uses: actions/checkout@v3
Expand All @@ -129,7 +133,7 @@ jobs:
language-verification-c:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toolshed:ts22.4.1
container: ghcr.io/opencyphal/toolshed:ts22.4.2
strategy:
matrix:
build_type: [Debug, Release, MinSizeRel]
Expand Down Expand Up @@ -223,7 +227,7 @@ jobs:
language-verification-python:
runs-on: ubuntu-latest
needs: test
container: ghcr.io/opencyphal/toxic:tx22.4.1
container: ghcr.io/opencyphal/toxic:tx22.4.2
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ __pycache__
*.egg-info
*.patch
.tox
.nox
.coverage*
.venv
coverage.xml
Expand All @@ -26,6 +27,7 @@ dist
.DS_Store
prof
out
venv

# Eclipse
.metadata
Expand Down
2 changes: 2 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
sphinx:
configuration: conf.py
python:
install:
- requirements: requirements.txt
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"ms-python.python",
"ms-python.mypy-type-checker",
"ms-python.black-formatter",
"ms-python.flake8",
"ms-python.autopep8"
"ms-python.pylint"
]
}
21 changes: 16 additions & 5 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"configurations": [
{
"name": "Python: nnvg c++",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "nunavut",
"cwd": "${workspaceFolder}/src",
Expand All @@ -18,22 +18,33 @@
},
{
"name": "Pytest: current test",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"--keep-generated",
"--rootdir=${workspaceFolder}",
"${file}"
],
"console": "internalConsole",
"cwd": "${workspaceFolder}"
},
{
"name": "Pytest: all doc tests",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"--keep-generated",
"--rootdir=${workspaceFolder}",
"${workspaceFolder}/src"
],
"cwd": "${workspaceFolder}"
},
{
"name": "Pytest: all tests",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"console": "internalConsole",
"cwd": "${workspaceFolder}"
},
{
Expand Down
52 changes: 52 additions & 0 deletions .vscode/nunavut-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
addoption
allclose
astype
autouse
behaviour
bitorder
bools
builtins
Bxxx
caplog
CDEF
codegen
doctests
dryrun
dtype
EDCB
elementwise
emptylines
endianness
errstate
fillvalue
finalizer
fpid
frombuffer
functor
functors
htmlcov
itemsize
lctx
markupsafe
maxsplit
nbytes
ndarray
ndim
nnvg
noxfile
outdir
packbits
postprocessor
postprocessors
roadmap
rtype
Sriram
tobytes
transcompilation
typecheck
Unionant
unpackbits
unseparate
unstropped
WKCV
Xlang
74 changes: 22 additions & 52 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
"python.testing.cwd": "${workspaceFolder}",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"pylint.args": [
"--rcfile=${workspaceFolder}/tox.ini"
],
"black-formatter.args": [
"--line-length=120"
],
"mypy-type-checker.args": [
"--config-file=${workspaceFolder}/tox.ini"
],
"flake8.args": [
"--line-length=120"
],
"files.exclude": {
"**/.git": true,
"**/.svn": true,
Expand Down Expand Up @@ -168,56 +174,20 @@
"environment": "",
"sourceFileMap": "${sourceFileMapObj}"
},
"cSpell.words": [
"allclose",
"astype",
"autouse",
"bitorder",
"bools",
"builtins",
"Bxxx",
"caplog",
"CDEF",
"codegen",
"Cyphal",
"doctests",
"DSDL",
"dtype",
"EDCB",
"elementwise",
"emptylines",
"endianness",
"errstate",
"fillvalue",
"fpid",
"frombuffer",
"htmlcov",
"itemsize",
"Kirienko",
"maxsplit",
"nbytes",
"ndarray",
"ndim",
"nnvg",
"noxfile",
"opencyphal",
"outdir",
"packbits",
"Pavel",
"postprocessor",
"postprocessors",
"pycyphal",
"pydsdl",
"roadmap",
"Sriram",
"tobytes",
"transcompilation",
"typecheck",
"uavcan",
"unpackbits",
"unseparate",
"unstropped",
"WKCV",
"Unionant"
],
"cSpell.allowCompoundWords": true,
"cSpell.caseSensitive": false,
"cSpell.customDictionaries": {
"cyphal" : {
"name": "Cyphal-words",
"path": "${workspaceRoot}/cyphal-words.txt",
"description": "Words used in Cyphal and UAVCAN to add to spell checker dictionaries.",
"addWords": true
},
"nunavut" : {
"name": "Nunavut-words",
"path": "${workspaceRoot}/.vscode/nunavut-words.txt",
"description": "Words used in in the Nunavut codebase to add to spell checker dictionaries.",
"addWords": true
}
}
}
Loading

0 comments on commit 8cffe45

Please sign in to comment.