Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a666bae
tests: do not write the log files when the tests are only collected, …
everoddandeven Nov 18, 2026
a8dac90
bin: install python3-venv and python3-pybind11 with the Linux build d…
everoddandeven Nov 18, 2026
3b9c081
build: move the stubs to src/monero, the package that they describe, …
everoddandeven Nov 18, 2026
7c4b7f3
bin: lint the workflows locally with the actionlint and zizmor versio…
everoddandeven Nov 18, 2026
ea054ec
bin: build and serve the docs locally with the versions of docs/mkdoc…
everoddandeven Nov 18, 2026
b68a29e
vscode: share the configuration of the build, the tests, the debugger…
everoddandeven Nov 18, 2026
de8f314
build: find boost with its CMake config, and with the FindBoost modul…
everoddandeven Nov 18, 2026
07948a1
build: install the stubs next to the module, so the wheels have the t…
everoddandeven Nov 18, 2026
f14dd2a
tests: do not create the folder of the test wallets when the tests ar…
everoddandeven Nov 18, 2026
735c76d
bin: run docker compose without sudo in the scripts of the test envir…
everoddandeven Nov 18, 2026
e8ee92b
vscode: remove the task of the typings, VS Code reads the stubs of sr…
everoddandeven Nov 18, 2026
01308ec
build: link libusb after hidapi, which uses it, so the linker keeps i…
everoddandeven Nov 18, 2026
9b20f22
vscode: debug the C++ of the module with gdb, on a debug build in bui…
everoddandeven Nov 18, 2026
7faa356
vscode: hide the configuration of the Testing panel from Run and Debu…
everoddandeven Nov 18, 2026
eeccabf
build: include the headers of monero-project as the ones of the syste…
everoddandeven Nov 18, 2026
77b003b
vscode: export the compile commands in the build tasks, IntelliSense …
everoddandeven Nov 18, 2026
fcbc2b8
bin: fix cleanup test env script
everoddandeven Nov 18, 2026
2009270
vscode: check the types in strict mode
everoddandeven Nov 18, 2026
c503f9d
tests: import override from typing_extensions in the fake rpc servers…
everoddandeven Nov 18, 2026
3ba4b37
tests: mark with @override the methods that override one of their bas…
everoddandeven Nov 18, 2026
26fbe5e
pyi: mark with @override the deserialize methods that override the on…
everoddandeven Nov 18, 2026
68e13da
tests: remove the type ignore comments that are not needed
everoddandeven Nov 18, 2026
95f73b4
vscode: check every file of the project, with the overrides and the t…
everoddandeven Nov 18, 2026
d44cdfd
build: link chrono and atomic with boost thread
everoddandeven Nov 19, 2026
a542e60
docs: update copyright
everoddandeven Nov 19, 2026
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
14 changes: 3 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Docs

# Builds the API site from the stubs of src/python and publishes it to GitHub Pages from main. Pull
# Builds the API site from the stubs of src/monero and publishes it to GitHub Pages from main. Pull
# requests only build it, to see that it still builds. The site is not kept in the repository.
on:
push:
branches: [ main ]
paths:
- 'docs/mkdocs/**'
- 'src/python/**'
- 'src/monero/**'
- 'docs/architecture.png'
- '.github/workflows/docs.yml'
pull_request:
branches: [ main ]
paths:
- 'docs/mkdocs/**'
- 'src/python/**'
- 'src/monero/**'
- 'docs/architecture.png'
- '.github/workflows/docs.yml'
workflow_dispatch:
Expand Down Expand Up @@ -48,14 +48,6 @@ jobs:
- name: Install mkdocs and its plugins
run: pip install -r docs/mkdocs/requirements.in

# mkdocstrings reads the stubs without importing anything, so the module does not have to be
# built, but it looks for them in a folder named monero
- name: Lay the stubs out as the monero package
run: |
mkdir -p "$RUNNER_TEMP/stubs"
cp -r src/python "$RUNNER_TEMP/stubs/monero"
echo "MONERO_STUBS=$RUNNER_TEMP/stubs" >> "$GITHUB_ENV"

# strict, so that a docstring or a reference that does not resolve fails the build
- name: Build the site
working-directory: docs/mkdocs
Expand Down
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
.vscode
# the shared VS Code configuration is committed, the rest of the folder is personal
.vscode/*
!.vscode/settings.json
!.vscode/launch.json
!.vscode/tasks.json
!.vscode/extensions.json
!.vscode/.env
/.env
# made by bin/generate_typings.sh
typings
build/*
# the module for the debugger of C++, see .vscode/tasks.json
build-debug
dist
__pycache__
.pytest_cache
Expand Down
2 changes: 2 additions & 0 deletions .vscode/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# read by VS Code (python.envFile): the module that cmake builds in build/, for the tests and the processes that they start
PYTHONPATH=build
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"ms-python.python",
"ms-python.debugpy",
"ms-python.vscode-pylance",
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"ms-azuretools.vscode-containers",
"github.vscode-github-actions",
"timonwong.shellcheck",
"ryanluker.vscode-coverage-gutters"
]
}
96 changes: 96 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
// the reruns and the timeout of pytest.ini would rerun a failed test and stop one that waits at a breakpoint; the module
// is built before, so that the tests do not run with an old one
"version": "0.2.0",
"configurations": [
{
"name": "pytest: current file",
"presentation": { "group": "1-pytest", "order": 1 },
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": ["${file}", "--reruns", "0", "--timeout", "0", "--no-cov"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"justMyCode": false,
"preLaunchTask": "build: monero-python module"
},
{
"name": "pytest: unit tests",
"presentation": { "group": "1-pytest", "order": 2 },
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": ["-m", "unit", "--reruns", "0", "--timeout", "0", "--no-cov"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"justMyCode": false,
"preLaunchTask": "build: monero-python module"
},
{
"name": "pytest: integration tests (docker)",
"presentation": { "group": "1-pytest", "order": 3 },
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": ["-m", "integration", "--reruns", "0", "--timeout", "0", "--no-cov"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"justMyCode": false,
"preLaunchTask": "tests: build and start docker environment"
},
{
// the one of the Testing panel, when it debugs a test: it gives the test to run, so it is hidden from the list of Run and Debug
"name": "pytest: debug test (Testing panel)",
"type": "debugpy",
"request": "launch",
"purpose": ["debug-test"],
"presentation": { "hidden": true },
"env": { "PYTEST_ADDOPTS": "--reruns 0 --timeout 0 --no-cov" },
"console": "integratedTerminal",
"justMyCode": false,
"preLaunchTask": "build: monero-python module"
},
{
// gdb starts python, so the breakpoints of src/cpp stop in the module of build-debug; it needs gdb (apt install gdb)
"name": "C++: pytest current file (gdb)",
"presentation": { "group": "2-cpp", "order": 1 },
"type": "cppdbg",
"request": "launch",
"program": "${command:python.interpreterPath}",
"args": ["-m", "pytest", "${file}", "--reruns", "0", "--timeout", "0", "--no-cov"],
"cwd": "${workspaceFolder}",
"environment": [{ "name": "PYTHONPATH", "value": "${workspaceFolder}/build-debug" }],
"MIMode": "gdb",
"setupCommands": [
{ "description": "pretty printing of the types of the standard library", "text": "-enable-pretty-printing", "ignoreFailures": true }
],
"preLaunchTask": "build: monero-python module (debug)"
},
{
// gdb on a python that already runs, as one that waits at a breakpoint of debugpy: attaching to a process that gdb did
// not start needs kernel.yama.ptrace_scope=0, or gdb as root
"name": "C++: attach to a python process (gdb)",
"presentation": { "group": "2-cpp", "order": 2 },
"type": "cppdbg",
"request": "attach",
"program": "${command:python.interpreterPath}",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{ "description": "pretty printing of the types of the standard library", "text": "-enable-pretty-printing", "ignoreFailures": true }
]
},
{
"name": "python: current file",
"presentation": { "group": "3-python", "order": 1 },
"type": "debugpy",
"request": "launch",
"program": "${file}",
"env": { "PYTHONPATH": "${workspaceFolder}/build" },
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"justMyCode": false
}
]
}
76 changes: 76 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"github-actions.workflows.pinned.workflows": [
".github/workflows/build-deb.yml",
".github/workflows/build-linux.yml",
".github/workflows/build-macos.yml",
".github/workflows/build-windows.yml",
".github/workflows/ci.yml"
],

// the module is not installed, it is the one that cmake builds in build/: .env gives its folder to the tests, also to
// the python processes that some of them start
"python.envFile": "${workspaceFolder}/.vscode/.env",
// no interpreter path: VS Code picks the .venv of the task "setup: venv" on its own, and a path to one that is not there yet
// would be a warning until it is made

// tests/ as well: the tests import their helpers as utils, pytest puts tests/ in the path
"python.analysis.extraPaths": ["${workspaceFolder}/build", "${workspaceFolder}/tests"],
// the stubs of src/monero, the package that they describe: without them the types of the compiled module are unknown
"python.analysis.stubPath": "src",
// the tests, the scripts and the stubs pass it: a new error is one of the change that brings it
"python.analysis.typeCheckingMode": "strict",
// more than strict: the code passes these too
"python.analysis.diagnosticSeverityOverrides": {
"reportImplicitOverride": "error",
"reportUnnecessaryTypeIgnoreComment": "error",
"reportPropertyTypeMismatch": "error",
"reportShadowedImports": "error",
"reportImportCycles": "error",
"reportCallInDefaultInitializer": "error"
},
// the errors of every file in Problems, not only of the open ones; not of the submodules, the builds and what is generated
"python.analysis.diagnosticMode": "workspace",
"python.analysis.exclude": ["external", "build", "build-debug", ".cache", ".venv", "docs/mkdocs/public", "test_wallets"],
"terminal.integrated.env.linux": { "PYTHONPATH": "${workspaceFolder}/build" },
"terminal.integrated.env.osx": { "PYTHONPATH": "${workspaceFolder}/build" },

"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"python.testing.pytestArgs": ["tests"],

// CMake Tools builds the module, with few jobs: a compiler of monero takes up to 1.5 GB of memory
"cmake.buildDirectory": "${workspaceFolder}/build",
"cmake.configureOnOpen": false,
"cmake.parallelJobs": 3,
"cmake.exportCompileCommandsFile": true,
"C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json",
"C_Cpp.default.cppStandard": "c++17",

// monero-project, the builds and the test wallets have too many files to watch and to index
"files.watcherExclude": {
"**/external/**": true,
"**/build/**": true,
"**/build-debug/**": true,
"**/.ccache/**": true,
"**/test_wallets/**": true
},
"search.exclude": {
"**/external/monero-cpp/external/**": true,
"**/build/**": true,
"**/build-debug/**": true,
"**/.ccache/**": true,
"**/test_wallets/**": true
},
"C_Cpp.files.exclude": {
"**/external/monero-cpp/external/**/build/**": true,
"**/.ccache/**": true
},

// the project has no formatter, a format on save would rewrite whole files
"[python]": { "editor.formatOnSave": false },
"[cpp]": { "editor.formatOnSave": false },
"[c]": { "editor.formatOnSave": false },

"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true
}
106 changes: 106 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"version": "2.0.0",
"tasks": [
{
// the packages of apt of the build, on Ubuntu and Debian; sudo asks the password in the terminal of the task
"label": "setup: system dependencies",
"type": "shell",
"command": "./bin/install_dependencies_linux.sh",
"problemMatcher": []
},
{
// the virtual environment of the README, with the versions that the CI tests and builds with
"label": "setup: venv",
"type": "shell",
"command": "python3 -m venv .venv && .venv/bin/pip install -r tests/requirements.txt -r requirements-build.txt",
"problemMatcher": []
},
{
// monero-project and monero-cpp, once and after an update of the submodules; JOBS=3 because a compiler of monero
// takes up to 1.5 GB of memory
"label": "build: monero-cpp",
"type": "shell",
"command": "./bin/build_monero_cpp.sh",
"options": { "env": { "JOBS": "3" } },
"problemMatcher": ["$gcc"]
},
{
"label": "build: monero-python module",
"type": "shell",
"command": "cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -Dpybind11_DIR=\"$(python3 -m pybind11 --cmakedir)\" && cmake --build build -j3",
"group": { "kind": "build", "isDefault": true },
"problemMatcher": ["$gcc"]
},
{
// the module with the symbols and no optimization, for the debugger of C++, in a folder of its own
"label": "build: monero-python module (debug)",
"type": "shell",
"command": "cmake -B build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -Dpybind11_DIR=\"$(python3 -m pybind11 --cmakedir)\" && cmake --build build-debug -j3",
"problemMatcher": ["$gcc"]
},
{
// monero-cpp again, optimized but with the symbols, so the debugger steps into it too; the module links it at the next
// build. The type stays in the cache of that build, also for bin/build_monero_cpp.sh: -DCMAKE_BUILD_TYPE= goes back
"label": "build: monero-cpp with debug info",
"type": "shell",
"command": "cmake -S external/monero-cpp -B external/monero-cpp/build -DCMAKE_BUILD_TYPE=RelWithDebInfo && cmake --build external/monero-cpp/build -j3",
"problemMatcher": ["$gcc"]
},
{
"label": "tests: start docker environment",
"type": "shell",
"command": "docker compose -f tests/docker-compose.yml up -d node_1 node_2 xmr_wallet_1 xmr_wallet_2 xmr_wallet_3",
"problemMatcher": []
},
{
"label": "tests: build and start docker environment",
"dependsOn": ["build: monero-python module", "tests: start docker environment"],
"dependsOrder": "sequence",
"problemMatcher": []
},
{
"label": "tests: stop docker environment",
"type": "shell",
"command": "docker compose -f tests/docker-compose.yml down -v",
"problemMatcher": []
},
{
"label": "tests: unit",
"type": "shell",
"command": "${command:python.interpreterPath} -m pytest -m unit",
"options": { "env": { "PYTHONPATH": "${workspaceFolder}/build" } },
"group": "test",
"problemMatcher": []
},
{
// as in CI, the coverage of the python of the tests; Coverage Gutters shows coverage.xml in the editor
"label": "tests: unit with coverage",
"type": "shell",
"command": "${command:python.interpreterPath} -m pytest -m unit --cov=tests --cov-report=xml:coverage.xml --cov-report=term:skip-covered",
"options": { "env": { "PYTHONPATH": "${workspaceFolder}/build" } },
"group": "test",
"problemMatcher": []
},
{
// actionlint and zizmor, with the versions of .github/workflows/lint-workflows.yml
"label": "lint: workflows",
"type": "shell",
"command": "./bin/lint_workflows.sh",
"problemMatcher": []
},
{
"label": "docs: serve",
"type": "shell",
"command": "./bin/docs.sh serve",
"isBackground": true,
"problemMatcher": []
},
{
// strict, as in CI
"label": "docs: build",
"type": "shell",
"command": "./bin/docs.sh build",
"problemMatcher": []
}
]
}
Loading
Loading