diff --git a/.vscode/launch.json b/.vscode/launch.json index 151b757da..5a052a112 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,9 +6,9 @@ "type": "pickString", "description": "Select the process to debug", "options": [ - "selfdrive/controls/controlsd.py", - "system/timed/timed.py", - "tools/sim/run_bridge.py" + "openpilot/selfdrive/controls/controlsd.py", + "openpilot/system/timed/timed.py", + "openpilot/tools/sim/run_bridge.py" ] }, { @@ -16,7 +16,7 @@ "type": "pickString", "description": "Select the process to debug", "options": [ - "selfdrive/ui/ui" + "openpilot/selfdrive/ui/ui" ] }, { diff --git a/.vscode/settings.json b/.vscode/settings.json index 811306f39..68f6b9037 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,10 +17,5 @@ "**/.git", "**/.venv", "**/__pycache__", - // exclude directories that should be using the symlinked version - "common/**", - "selfdrive/**", - "system/**", - "tools/**", ] } diff --git a/docs/concepts/logs.md b/docs/concepts/logs.md index 8ba2486ab..dd954d4c7 100644 --- a/docs/concepts/logs.md +++ b/docs/concepts/logs.md @@ -2,7 +2,7 @@ openpilot records routes in one minute chunks called segments. A route starts on the rising edge of ignition and ends on the falling edge. -Check out our [Python library](https://github.com/commaai/openpilot/blob/master/openpilot/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot. +Check out our [Python library](https://github.com/commaai/openpilot/blob/master/openpilot/tools/lib/logreader.py) for reading openpilot logs. Also checkout our [tools](https://github.com/commaai/openpilot/tree/master/openpilot/tools) to replay and view your data. These are the same tools we use to debug and develop openpilot. For each segment, openpilot records the following log types: diff --git a/openpilot/tools/CTF.md b/openpilot/tools/CTF.md index b8acc46fe..2b877a0e2 100644 --- a/openpilot/tools/CTF.md +++ b/openpilot/tools/CTF.md @@ -5,7 +5,7 @@ Welcome to the first part of the comma CTF! * there's 2 flags in each segment, with roughly increasing difficulty * everything you'll need to find the flags is in the openpilot repo * grep is also your friend - * first, [setup](https://github.com/commaai/openpilot/tree/master/tools#setup-your-pc) your PC + * first, [setup](https://github.com/commaai/openpilot/tree/master/openpilot/tools#setup-your-pc) your PC * read the docs & checkout out the tools in openpilot/tools/ * tip: once you get the replay and UI up, start by familiarizing yourself with seeking in replay diff --git a/openpilot/tools/jotpluggler/app.cc b/openpilot/tools/jotpluggler/app.cc index f80443e56..01eec1536 100644 --- a/openpilot/tools/jotpluggler/app.cc +++ b/openpilot/tools/jotpluggler/app.cc @@ -49,7 +49,7 @@ std::string layout_name_from_arg(const std::string &layout_arg) { } fs::path layouts_dir() { - return repo_root() / "tools" / "jotpluggler" / "layouts"; + return repo_root() / "openpilot" / "tools" / "jotpluggler" / "layouts"; } std::string sanitize_layout_stem(std::string_view name) { @@ -249,7 +249,7 @@ void configure_style() { g_ui_font = nullptr; g_ui_bold_font = nullptr; g_mono_font = nullptr; - const fs::path fonts_dir = repo_root() / "selfdrive" / "assets" / "fonts"; + const fs::path fonts_dir = repo_root() / "openpilot" / "selfdrive" / "assets" / "fonts"; ImFontConfig font_cfg; font_cfg.OversampleH = 2; font_cfg.OversampleV = 2; diff --git a/openpilot/tools/jotpluggler/custom_series.cc b/openpilot/tools/jotpluggler/custom_series.cc index aabf78a0d..70b3e8c3c 100644 --- a/openpilot/tools/jotpluggler/custom_series.cc +++ b/openpilot/tools/jotpluggler/custom_series.cc @@ -189,7 +189,7 @@ PythonEvalResult evaluate_custom_python_series(const AppSession &session, const CommandResult process = run_process_capture_output({ "python3", - (repo_root() / "tools" / "jotpluggler" / "math_eval.py").string(), + (repo_root() / "openpilot" / "tools" / "jotpluggler" / "math_eval.py").string(), manifest_path.string(), globals_path.string(), code_path.string(), diff --git a/openpilot/tools/jotpluggler/layout.cc b/openpilot/tools/jotpluggler/layout.cc index bf2a3f208..dc7109808 100644 --- a/openpilot/tools/jotpluggler/layout.cc +++ b/openpilot/tools/jotpluggler/layout.cc @@ -274,7 +274,7 @@ std::string default_dbc_template() { } DbcEditorSource resolve_dbc_editor_source(const std::string &dbc_name) { - const fs::path generated_dbc_dir = repo_root() / "tools" / "jotpluggler" / "generated_dbcs"; + const fs::path generated_dbc_dir = repo_root() / "openpilot" / "tools" / "jotpluggler" / "generated_dbcs"; const std::array candidates = {{ {.path = repo_root() / "opendbc" / "dbc" / (dbc_name + ".dbc"), .kind = DbcEditorState::SourceKind::Opendbc}, {.path = generated_dbc_dir / (dbc_name + ".dbc"), .kind = DbcEditorState::SourceKind::Generated}, @@ -334,7 +334,7 @@ bool save_dbc_editor_contents(AppSession *session, UiState *state) { } try { dbc::Database::fromContent(editor.text, editor.save_name + ".dbc"); - const fs::path generated_dbc_dir = repo_root() / "tools" / "jotpluggler" / "generated_dbcs"; + const fs::path generated_dbc_dir = repo_root() / "openpilot" / "tools" / "jotpluggler" / "generated_dbcs"; fs::create_directories(generated_dbc_dir); const fs::path output = generated_dbc_dir / (editor.save_name + ".dbc"); write_file_or_throw(output, editor.text); diff --git a/openpilot/tools/jotpluggler/sketch_layout.cc b/openpilot/tools/jotpluggler/sketch_layout.cc index 143a6f5a1..fcc4b183d 100644 --- a/openpilot/tools/jotpluggler/sketch_layout.cc +++ b/openpilot/tools/jotpluggler/sketch_layout.cc @@ -386,7 +386,7 @@ std::vector available_dbc_names_impl() { std::set names; for (const fs::path &dbc_dir : { repo_root() / "opendbc" / "dbc", - repo_root() / "tools" / "jotpluggler" / "generated_dbcs", + repo_root() / "openpilot" / "tools" / "jotpluggler" / "generated_dbcs", }) { if (fs::exists(dbc_dir) && fs::is_directory(dbc_dir)) { for (const auto &entry : fs::directory_iterator(dbc_dir)) { @@ -408,7 +408,7 @@ std::vector available_dbc_names_impl() { fs::path resolve_dbc_path(const std::string &dbc_name) { for (const fs::path &candidate : { repo_root() / "opendbc" / "dbc" / (dbc_name + ".dbc"), - repo_root() / "tools" / "jotpluggler" / "generated_dbcs" / (dbc_name + ".dbc"), + repo_root() / "openpilot" / "tools" / "jotpluggler" / "generated_dbcs" / (dbc_name + ".dbc"), }) { if (fs::exists(candidate)) return candidate; } diff --git a/pyproject.toml b/pyproject.toml index b844145a4..54f67d629 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -182,10 +182,6 @@ exclude = [ lint.flake8-implicit-str-concat.allow-multiline = false [tool.ruff.lint.flake8-tidy-imports.banned-api] -"selfdrive".msg = "Use openpilot.selfdrive" -"common".msg = "Use openpilot.common" -"system".msg = "Use openpilot.system" -"tools".msg = "Use openpilot.tools" "pytest.main".msg = "pytest.main requires special handling that is easy to mess up!" "unittest".msg = "Use pytest" "time.time".msg = "Use time.monotonic"