Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/checkpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14.0-rc.2"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install deploy dependencies
run: pip install --group deploy
- name: Install optional cryptography dependencies
run: pip install --group crypto
run: pip install --group optional
- name: Install code dependencies
run: pip install .
- name: Lint with pylint
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14.0-rc.2"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install deploy dependencies
run: pip install --group deploy
- name: Install optional cryptography dependencies
run: pip install --group crypto
run: pip install --group optional
- name: Install code dependencies
run: pip install .
- name: Lint with pylint
Expand Down
14 changes: 11 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// this venv, i.e.
// "${userHome}/pygpsclient/bin/python3" on linux/macos
// "${userHome}/pygpsclient/Scripts/python" on windows
"python.testing.pytestEnabled": true,
"python.testing.pytestEnabled": false,
"python.terminal.activateEnvironment": true,
"editor.formatOnSave": true,
"modulename": "${workspaceFolderBasename}",
Expand All @@ -17,10 +17,18 @@
"C_Cpp.copilotHover": "disabled",
"chat.agent.enabled": false,
"chat.commandCenter.enabled": false,
"chat.notifyWindowOnConfirmation": false,
"chat.notifyWindowOnConfirmation": "off",
"telemetry.feedback.enabled": false,
"python.analysis.addHoverSummaries": false,
"python-envs.defaultEnvManager": "ms-python.python:venv",
"python-envs.pythonProjects": [],
"python.defaultInterpreterPath": "${userHome}/pygpsclient/bin/python3"
"python.defaultInterpreterPath": "${userHome}/pygpsclient/bin/python3",
"python.testing.unittestEnabled": true,
"python.testing.unittestArgs": [
"-v",
"-s",
"./tests",
"-p",
"test_*.py"
]
}
192 changes: 119 additions & 73 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,79 @@
{
// These test, build and deploy tasks are targeted at a venv
// pyspartn VSCode workflow.
//
// These build, install and test tasks are targeted at a venv
// called 'pygpsclient' located in the user's home directory.
// Set your workspace default VSCode Python interpreter to
// this venv, i.e.
// "${userHome}/pygpsclient/bin/python3" on linux/macos
// "${userHome}/pygpsclient/Scripts/python" on windows
// "${userHome}/pygpsclient/bin/python3" on Linux/MacOS
// "C:/Users/user/pygpsclient/Scripts/python.exe" on Windows
//
// The "Test" task will initialise the venv and execute all
// necessary build and installation precursors.
//
"version": "2.0.0",
"tasks": [
{
"label": "Delete Venv",
"type": "shell",
"command": "rm",
"args": [
"-rf",
"${config:venv}",
],
"problemMatcher": []
},
{
"label": "Create Venv",
"type": "process",
"command": "${config:python.defaultInterpreterPath}",
"type": "shell",
"command": "${config:python.systemPath}",
"args": [
"-m",
"venv",
"${config:venv}",
//"--system-site-packages"
],
"problemMatcher": []
"problemMatcher": [],
"dependsOrder": "sequence",
"dependsOn": [
"Delete Venv",
],
},
{
"label": "Run Local Version",
"type": "process",
"command": "${config:python.defaultInterpreterPath}",
"label": "Activate Venv",
"type": "shell",
"command": "source",
"args": [
"-m",
"pygpsclient",
"--ntripcasteruser",
"semuadmin",
"--ntripcasterpassword",
"testpassword",
"--verbosity",
"3"
"~/pygpsclient/bin/activate",
],
"options": {
"cwd": "src"
},
"problemMatcher": []
"problemMatcher": [],
},
{
"label": "Install Deploy Dependencies",
"type": "process",
"type": "shell",
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
"pip",
"install",
"--upgrade",
"--group",
"deploy"
],
"problemMatcher": []
"problemMatcher": [],
},
{
"label": "Install Optional Dependencies",
"type": "shell",
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
"pip",
"install",
"--upgrade",
"--group",
"optional"
],
"problemMatcher": [],
},
{
"label": "Clean",
Expand All @@ -64,13 +88,14 @@
"${config:modulename}.egg-info",
],
"windows": {
"command": "rm",
"command": "Remove-Item",
"args": [
"-R",
"-Path",
"'src/${config:modulename}.egg-info','build','dist','htmlcov','docs/_build'",
"-Recurse",
"-Force",
"-ErrorAction",
"SilentlyContinue" // doesn't work! - stops on exit code 1 anyway
"SilentlyContinue", // doesn't work! - stops on exit code 1 anyway
"-Path",
"'build','dist','htmlcov','docs/_build','src/${config:modulename}.egg-info'",
]
},
"options": {
Expand All @@ -80,7 +105,7 @@
},
{
"label": "Sort Imports",
"type": "process",
"type": "shell",
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
Expand All @@ -93,7 +118,7 @@
},
{
"label": "Format",
"type": "process",
"type": "shell",
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
Expand All @@ -116,60 +141,91 @@
{
"label": "Security",
"type": "process",
"command": "${config:python.defaultInterpreterPath}",
"command": "bandit",
"args": [
"-m",
"bandit",
"-c",
"pyproject.toml",
"-r",
"."
"src/pygpsclient"
],
"problemMatcher": []
},
{
"label": "Test",
"type": "process",
"label": "Build",
"type": "shell",
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
"pytest"
"build",
".",
"--wheel",
"--sdist",
],
"problemMatcher": [],
"dependsOrder": "sequence",
"dependsOn": [
//"Create Venv",
"Install Deploy Dependencies",
"Install Optional Dependencies",
"Clean",
"Sort Imports",
"Format",
],
"group": {
"kind": "test",
"kind": "build",
"isDefault": true
}
},
{
"label": "Build",
"type": "process",
"label": "Install", // into Virtual Environment
"type": "shell",
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
"build",
".",
"--wheel",
"--sdist",
"pip",
"install",
"--force-reinstall",
// wildcard only works on Posix platforms
"${workspaceFolder}/dist/pyspartn-*-py3-none-any.whl",
],
"windows": {
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
"pip",
"install",
"--force-reinstall",
"${workspaceFolder}/dist/pyspartn-1.0.8-py3-none-any.whl",
]
},
"problemMatcher": [],
},
{
"label": "Test",
"type": "shell",
"command": "${config:python.defaultInterpreterPath}",
"args": [
"-m",
"pytest"
],
"problemMatcher": [],
"dependsOrder": "sequence",
"dependsOn": [
"Clean",
"Security",
"Sort Imports",
"Format",
"Activate Venv",
"Build",
"Install", // have to install before running pylint
"Pylint",
"Test",
"Security",
"Sphinx HTML",
],
"group": {
"kind": "build",
"kind": "test",
"isDefault": true
}
},
{
"label": "Sphinx",
"type": "process",
"type": "shell",
"command": "sphinx-apidoc",
"args": [
"--ext-autodoc",
Expand All @@ -184,7 +240,7 @@
},
{
"label": "Sphinx HTML",
"type": "process",
"type": "shell",
"command": "/usr/bin/make",
"windows": {
"command": "${workspaceFolder}/docs/make.bat"
Expand All @@ -202,8 +258,8 @@
"problemMatcher": []
},
{
"label": "Sphinx Deploy to S3", // needs AWS credentials
"type": "process",
"label": "Sphinx Deploy", // needs AWS S3 credentials
"type": "shell",
"command": "aws",
"args": [
"s3",
Expand All @@ -219,29 +275,19 @@
"problemMatcher": []
},
{
"label": "Install Locally",
"type": "process",
"command": "${config:python.defaultInterpreterPath}",
"label": "Run from Source",
"type": "shell",
"command": "python3",
"args": [
"-m",
"pip",
"install",
"--upgrade",
"--force-reinstall",
"--find-links=${workspaceFolder}/dist",
"${workspaceFolderBasename}",
// "--target",
// "${config:venv}/Lib/site-packages"
"pygpsclient",
//"--verbosity",
//"3"
],
"options": {
"cwd": "dist"
"cwd": "${workspaceFolder}/src"
},
"dependsOrder": "sequence",
"dependsOn": [
"Build",
"Sphinx HTML"
],
"problemMatcher": []
}
},
]
}
Loading