ZIm/crates
Julian de Ruiter 5b0c15d8c4
Add pytest-based test discovery and runnables for Python (#18824)
Closes  #12080, #18649.

Screenshot:

<img width="1499" alt="image"
src="https://github.com/user-attachments/assets/2644c2fc-19cf-4d2c-a992-5c56cb22deed">

Still in progress:

1. I'd like to add configuration options for selecting a Python test
runner (either pytest or unittest) so that users can explicitly choose
which runner they'd like to use for running their tests. This preference
has to be configured as unittest-style tests can also be run by pytest,
meaning we can't rely on auto-discovery to choose the desired test
runner.
2. I'd like to add venv auto-discovery similar to the feature currently
provided by the terminal using detect_venv.
3. Unit tests.

Unfortunately I'm struggling a bit with how to add settings in the
appropriate location (e.g. Python language settings). Can anyone provide
me with some pointers and/or examples on how to either add extra
settings or to re-use the existing ones?

My rust programming level is OK-ish but I'm not very familiar with the
Zed project structure and could use some help.

I'm also open for pair programming as mentioned on the website if that
helps!

Release Notes:

- Added pytest-based test discovery and runnables for Python.
- Adds a configurable option for switching between unittest and pytest
as a test runner under Python language settings. Set "TASK_RUNNER" to
"unittest" under task settings for Python if you wish to use unittest to
run Python tasks; the default is pytest.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-11-19 14:34:56 +01:00
..
activity_indicator language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
anthropic assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
assets add ui::Vector and separate images from icons (#17815) 2024-09-13 17:44:16 -04:00
assistant editor: Show hints for using AI features on empty lines (#20824) 2024-11-19 09:41:44 +01:00
assistant_slash_command Extract ExtensionSlashCommand to assistant_slash_command crate (#20617) 2024-11-13 14:34:58 -05:00
assistant_tool assistant: Add basic tool invocation (#17368) 2024-09-04 14:32:20 -04:00
audio Update Rust crate rodio to 0.19.0 (#17389) 2024-09-16 21:55:32 -06:00
auto_update Rebuild SSH installation (#20220) 2024-11-05 13:37:54 -07:00
breadcrumbs Add missing shortcuts in tooltips (#18282) 2024-09-27 11:06:48 +02:00
call Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
channel Remove hosted projects (#19754) 2024-10-27 19:44:21 -07:00
cli Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
client client: Remove unneeded return (#20685) 2024-11-14 13:16:55 -05:00
clock Fix bugs with applying hunks from branch buffers (#18721) 2024-10-07 16:28:33 -07:00
collab collab: Add feature flag to bypass account age check (#20843) 2024-11-18 18:20:32 -05:00
collab_ui Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
collections gpui: Add SVG rendering to img element and generic asset cache (#9931) 2024-03-29 17:09:49 -07:00
command_palette chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
command_palette_hooks Improve context server lifecycle management (#20622) 2024-11-13 13:55:06 -08:00
context_servers context_servers: Upgrade protocol to version 2024-11-05 (#20615) 2024-11-14 13:03:30 -05:00
copilot Add File.disk_state enum to clarify filesystem states (#20776) 2024-11-18 10:30:08 -08:00
db chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795) 2024-10-07 01:29:58 +02:00
diagnostics Require save confirmation and prevent autosave for deleted files (#20742) 2024-11-15 15:01:16 -07:00
docs_preprocessor Don't rely on relative path for docs preprocessor (#16883) 2024-08-26 11:43:13 -04:00
editor editor: Show hints for using AI features on empty lines (#20824) 2024-11-19 09:41:44 +01:00
evals Restore HTTP client transition, but use reqwest everywhere (#19055) 2024-10-11 14:58:58 -07:00
extension Use Extension trait in ExtensionLspAdapter (#20704) 2024-11-14 20:44:57 -05:00
extension_api zed_extension_api: Release v0.2.0 (#20683) 2024-11-14 12:44:10 -05:00
extension_cli Add new extension crate (#20089) 2024-11-01 13:20:30 -04:00
extension_host Use Extension trait in ExtensionLspAdapter (#20704) 2024-11-14 20:44:57 -05:00
extensions_ui Revert "remove usages of theme::color_alpha" 2024-11-19 00:24:48 -05:00
feature_flags Initial Notebook UI structure (#19756) 2024-10-29 11:30:07 -07:00
feedback ci: Update issue templates. Rename defect to bug and improve log formatting (#20246) 2024-11-05 12:07:17 -05:00
file_finder Adjust file finder width configuration (#20819) 2024-11-18 16:32:16 -03:00
file_icons chore: Clean up allocs around project panel (#15422) 2024-07-29 14:21:41 +02:00
fs Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
fsevent Retain run loop (#11241) 2024-04-30 23:31:59 -06:00
fuzzy Improve slash commands (#16195) 2024-08-13 23:06:07 -07:00
git git: Add support for opening git worktrees (#20164) 2024-11-06 09:43:39 +01:00
git_hosting_providers git_hosting_providers: Fix support for GitLab remotes containing subgroups (#19962) 2024-10-30 11:16:44 -04:00
go_to_line Improve project search performance (#20211) 2024-11-05 03:49:37 +02:00
google_ai assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
gpui editor: Show hints for using AI features on empty lines (#20824) 2024-11-19 09:41:44 +01:00
gpui_macros add ui::Vector and separate images from icons (#17815) 2024-09-13 17:44:16 -04:00
html_to_markdown chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
http_client Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
image_viewer Enable reload of images in image viewer (#20374) 2024-11-10 11:37:02 +01:00
indexed_docs Use Extension trait in ExtensionLspAdapter (#20704) 2024-11-14 20:44:57 -05:00
inline_completion_button Support .editorconfig (#19455) 2024-10-21 13:05:30 +03:00
install_cli Fix flickering (#9012) 2024-03-11 10:45:57 +01:00
journal chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
language Don't treat absence of a file on fs as conflict for new files from CLI (#20828) 2024-11-18 10:55:44 -08:00
language_model Update references of Ollama Llama 3.1 to model Llama 3.2 (#20757) 2024-11-16 11:18:53 -05:00
language_selector python: Fix toolchains not getting picked up after workspace deserialization (#20488) 2024-11-11 14:35:01 +01:00
language_tools Expose active key equivalents in the keymap context view (#20530) 2024-11-11 23:04:15 -07:00
languages Add pytest-based test discovery and runnables for Python (#18824) 2024-11-19 14:34:56 +01:00
live_kit_client Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
live_kit_server Restore HTTP client transition, but use reqwest everywhere (#19055) 2024-10-11 14:58:58 -07:00
lsp lsp: Retrieve links to documentation for the given symbol (#19233) 2024-11-16 20:23:49 +02:00
markdown Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
markdown_preview markdown preview: Refresh preview when file is changed outside of the editor (#20175) 2024-11-04 17:23:32 +01:00
media Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
menu open picker (#14524) 2024-07-15 17:04:15 -06:00
multi_buffer Add File.disk_state enum to clarify filesystem states (#20776) 2024-11-18 10:30:08 -08:00
node_runtime typescript: Improve installation checks for vtsls (#20197) 2024-11-04 16:00:51 -05:00
notifications Pass Summary::Context to Item::summarize (#18510) 2024-09-29 10:30:48 -06:00
ollama assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
open_ai assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
outline Revert "remove usages of theme::color_alpha" 2024-11-19 00:24:48 -05:00
outline_panel editor: Show hints for using AI features on empty lines (#20824) 2024-11-19 09:41:44 +01:00
paths Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
picker Prefer revealing items in the middle of the list for outline and project panels (#20349) 2024-11-07 14:36:29 +02:00
prettier Add more common Prettier plugin base paths (#20758) 2024-11-16 13:20:52 +02:00
project Remove use of current File for new buffers that never have File (#20832) 2024-11-18 14:30:38 -08:00
project_panel project panel: Update decoration icon active color (#20723) 2024-11-15 11:48:26 -03:00
project_symbols Fix renames over language server for SSH remoting (#17897) 2024-09-16 16:20:17 -06:00
proto lsp: Retrieve links to documentation for the given symbol (#19233) 2024-11-16 20:23:49 +02:00
quick_action_bar Create RunningKernel trait to allow for native and remote jupyter kernels (#20842) 2024-11-18 18:12:23 -08:00
recent_projects editor: Show hints for using AI features on empty lines (#20824) 2024-11-19 09:41:44 +01:00
refineable Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
release_channel chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
remote ssh: Fix SSH to mac remotes (#20838) 2024-11-18 17:17:24 -05:00
remote_server tasks: Add ability to query active toolchains for languages (#20667) 2024-11-14 14:37:37 +01:00
repl Create RunningKernel trait to allow for native and remote jupyter kernels (#20842) 2024-11-18 18:12:23 -08:00
reqwest_client assistant: Remove low_speed_timeout (#20681) 2024-11-15 07:37:31 +01:00
rich_text Disable definition lists in Markdown (#17648) 2024-09-10 11:16:27 -04:00
rope rope: Index tab locations for each chunk (#20289) 2024-11-06 13:18:30 +01:00
rpc Add support for git branches on remote projects (#19755) 2024-10-27 15:50:54 -07:00
search Restore the ability to navigate into project search input with the keyboard (#20579) 2024-11-13 12:45:30 +01:00
semantic_index semantic_index: Disable embeddings index for non-staff (#19618) 2024-10-23 12:34:51 -04:00
semantic_version Extract SemanticVersion into its own crate (#9956) 2024-03-29 12:11:57 -04:00
session chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795) 2024-10-07 01:29:58 +02:00
settings Expose active key equivalents in the keymap context view (#20530) 2024-11-11 23:04:15 -07:00
settings_ui Revert "theme: Turn ThemeRegistry into a trait (#20076)" (#20094) 2024-11-01 15:34:20 -04:00
snippet Snippet choices (#13958) 2024-11-18 22:56:34 +01:00
snippet_provider chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795) 2024-10-07 01:29:58 +02:00
snippets_ui Add snippet commands (#18453) 2024-10-02 13:27:16 +02:00
sqlez Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
sqlez_macros Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
story chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
storybook Add preview for Checkbox with Label (#20448) 2024-11-08 22:53:15 -05:00
sum_tree Speed up point translation in the Rope (#19913) 2024-10-30 10:59:03 +01:00
supermaven Cap the size of the Supermaven states buffer (#19246) 2024-10-23 10:36:14 +03:00
supermaven_api chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
tab_switcher tab_switcher: Use git-aware colors for file icons (#18733) 2024-10-04 10:37:41 -04:00
task tasks: Add editor: Spawn Nearest Task action (#19901) 2024-10-31 14:25:57 +01:00
tasks_ui Add more context to the save new file path picker (#19863) 2024-10-28 17:21:41 -07:00
telemetry_events Start to send data to Snowflake too (#20698) 2024-11-15 12:58:00 -07:00
terminal Add initial FreeBSD support (#20480) 2024-11-11 18:39:05 +01:00
terminal_view Deadkeys 2 (#20612) 2024-11-13 10:42:08 -07:00
text Fix a test flake involving zeroed out group_intervals (#20328) 2024-11-07 09:17:43 -07:00
theme Revert "remove usages of theme::color_alpha" 2024-11-19 00:24:48 -05:00
theme_importer chore: Another round of style lints fixes (#17519) 2024-09-07 02:36:55 +02:00
theme_selector Revert "theme: Turn ThemeRegistry into a trait (#20076)" (#20094) 2024-11-01 15:34:20 -04:00
time_format chore: Fix several style lints (#17488) 2024-09-06 11:58:39 +02:00
title_bar Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
toolchain_selector python: Fix toolchains not getting picked up after workspace deserialization (#20488) 2024-11-11 14:35:01 +01:00
ui theme: Add color darken function (#20746) 2024-11-18 12:44:49 -03:00
ui_input Rename ui_text_field crate to ui_input (#13949) 2024-07-08 17:05:30 -04:00
ui_macros Fix DynamicSpacing docs (#20509) 2024-11-11 12:58:39 -05:00
util util: Remove unused code (#20734) 2024-11-15 12:25:18 -05:00
vcs_menu chore: Update BranchListDelegate to use WeakView<Workspace> (#20157) 2024-11-04 12:17:11 +02:00
vim vim: Allow :cpplink for CopyPermalinkToLine (#20707) 2024-11-14 23:44:40 -07:00
welcome Add ui::ContentGroup (#20666) 2024-11-14 08:25:48 -05:00
workspace Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809) 2024-11-18 11:43:53 +02:00
worktree Add File.disk_state enum to clarify filesystem states (#20776) 2024-11-18 10:30:08 -08:00
zed editor: Show hints for using AI features on empty lines (#20824) 2024-11-19 09:41:44 +01:00
zed_actions Add KeyContextView (#19872) 2024-10-30 11:26:54 -06:00