instance_id
stringlengths
21
53
repo
stringclasses
188 values
language
stringclasses
1 value
pull_number
int64
20
148k
title
stringlengths
6
144
body
stringlengths
0
83.4k
created_at
stringdate
2015-09-25 03:17:17
2025-07-10 16:50:35
problem_statement
stringlengths
188
240k
hints_text
stringlengths
0
145k
resolved_issues
listlengths
1
6
base_commit
stringlengths
40
40
commit_to_review
dict
reference_review_comments
listlengths
1
62
merged_commit
stringlengths
40
40
merged_patch
stringlengths
297
9.87M
metadata
dict
Textualize__textual-4284@367843e
Textualize/textual
Python
4,284
Change `TextArea` to delete empty line on ctrl+k
Following the expected behaviour for ctrl+k from Emacs (and so by extension a text area on macOS -- see notes.app, or textedit.app, for example), this adds an alternative action to TextArea that will delete to end of line or, if the line is empty, will delete the line. Also, to further enhance compatibility with exp...
2024-03-12T10:27:33Z
TextArea CTRL-k behavior request Requesting CTRL-k (C-k) behavior be modified as follows. C-k currently does not kill new lines, and on a line with printable content, this is correct. On a line with only a newline, C-k *should* kill the new line. This will allow the TextArea user to kill multiple lines simply with r...
While I agree this would make sense, meanwhile, you could possibly go with something like this in your app: ```python from textual.app import App, ComposeResult from textual.widgets import TextArea class TextAreaEx(TextArea): """Extended TextArea.""" def action_delete_to_end_of_line(self) -> None: ...
[ { "body": "Requesting CTRL-k (C-k) behavior be modified as follows.\r\n\r\nC-k currently does not kill new lines, and on a line with printable content, this is correct. On a line with only a newline, C-k *should* kill the new line. This will allow the TextArea user to kill multiple lines simply with repeated ap...
f2dc11cd80b719744eb58ccd5e5c44bcfff3c05d
{ "head_commit": "367843e4311af60837887dce83320700da83d07b", "head_commit_message": "Change TextArea to delete empty line on ctrl+k\n\nFollowing the expected behaviour for ctrl+k from Emacs (and so by extension\na text area on macOS -- see notes.app, or textedit.app, for example), this\nadds an alternative action t...
[ { "diff_hunk": "@@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).\n - BREAKING: `AppFocus` and `AppBlur` are now posted when the terminal window gains or loses focus, if the terminal supports this https://github.com/Textualize/textual/pull/4265\n - When the terminal wind...
611ae5dae237c7eff03d950d69985789e5d0b273
diff --git a/CHANGELOG.md b/CHANGELOG.md index f300262eba..8e0faea6e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - BREAKING: `AppFocus` and `AppBlur` are now posted when the terminal window gains or loses focus, if the terminal ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
vllm-project__vllm-4573@8705f30
vllm-project/vllm
Python
4,573
[Bugfix][Kernel] allow non-power-of-2 for prefix prefill with alibi
FILL IN THE PR DESCRIPTION HERE FIX https://github.com/vllm-project/vllm/issues/4171 allow non-power-of-two head sizes in prefix prefill with alibi, this is a small fix based on https://github.com/vllm-project/vllm/pull/4128. **BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOV...
2024-05-03T03:44:46Z
[Bug]: Server crash for bloom-3b while use prefix_caching, `AssertionError assert Lk in {16, 32, 64, 128}` ### Your current environment ```text vllm v0.4.0.post1 CUDA 12.2 ``` ### 🐛 Describe the bug ```text [2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>> File "/usr/local/lib/python3.10/dist-pack...
"n_head": 32 "hidden_size": 2560 Hey, I had a similar problem and solved it by changing the `enable_prefix_caching` to `False` while initalizing the model Hope it will help @youkaichao for the latest vllm, i still hit this error for bloom-3b ```bash [2024-04-30 13:05:15,529] [ERROR] [MainThread] [vllm.engine.async_...
[ { "body": "### Your current environment\n\n```text\r\nvllm v0.4.0.post1 CUDA 12.2\r\n```\r\n\n\n### 🐛 Describe the bug\n\n```text\r\n[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>> File \"/usr/local/lib/python3.10/dist-packages/vllm/attention/ops/paged_attn.py\", line 178, in forward_prefix\r\n[...
cc466a32903d53d0ceca459b766d74ad668c8f87
{ "head_commit": "8705f30291522716ed638d2c5d727800718e6e81", "head_commit_message": "merged alibi test into prefix prefill test script", "patch_to_review": "diff --git a/tests/kernels/test_prefix_prefill.py b/tests/kernels/test_prefix_prefill.py\nindex 5a5987e2242f..3a62ceac992e 100644\n--- a/tests/kernels/test_p...
[ { "diff_hunk": "@@ -207,3 +207,245 @@ def test_contexted_kv_attention(\n print(f\"xformers Time: {(end_time - start_time)*1000:.2f} ms\")\n output_ref = output_ref.reshape(output.shape)\n assert torch.allclose(output_ref, output, atol=1e-6, rtol=0)\n+\n+\n+@pytest.mark.parametrize(\"num_heads\", NUM...
9691423ae2cda0fbf79661141ae0e6c77cb3ea13
diff --git a/tests/kernels/test_prefix_prefill.py b/tests/kernels/test_prefix_prefill.py index 5a5987e2242f..99fda8364dc0 100644 --- a/tests/kernels/test_prefix_prefill.py +++ b/tests/kernels/test_prefix_prefill.py @@ -1,3 +1,4 @@ +import math import random import time @@ -6,11 +7,12 @@ from xformers import ops as...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
vllm-project__vllm-4128@a1a2095
vllm-project/vllm
Python
4,128
[Bugfix][Kernel] allow non-power-of-two head sizes in prefix prefill
The existing prefix prefill kernel only supports head dimension that is a power of two. This due to Triton only supporting power of two block sizes. This PR enlarges the Q,K,V tensors to the next power of two and pads them with zeros when reading (and writing). It doesn't seem to affect performance of the non-padded...
2024-04-16T23:09:05Z
[Bug][Chunked prefill]: head size has to be power of two ### 🐛 Describe the bug The chunked prefill doesn't support head sizes that are not powers of two. For example, phi2 has head size of 80 (which is supported by flash attn, but the _flash_fwd triton kernel doesn't support it). Fix PR is coming. ```python ...
[ { "body": "### 🐛 Describe the bug\r\n\r\nThe chunked prefill doesn't support head sizes that are not powers of two. For example, phi2 has head size of 80 (which is supported by flash attn, but the _flash_fwd triton kernel doesn't support it).\r\n\r\nFix PR is coming.\r\n\r\n```python\r\nfrom vllm import LLM, S...
a53222544c6385ee314a26fdf42eb14f5b4e5ad9
{ "head_commit": "a1a2095560e6f2b4cfb376150537f72cea9c918c", "head_commit_message": "allow non-power-of-two head sizes in prefix prefill", "patch_to_review": "diff --git a/tests/kernels/test_prefix_prefill.py b/tests/kernels/test_prefix_prefill.py\nindex 6494fb34af98..ad31b0a7c2a1 100644\n--- a/tests/kernels/test...
[ { "diff_hunk": "@@ -636,7 +643,8 @@ def context_attention_fwd(q,\n # shape constraints\n Lq, Lk, Lv = q.shape[-1], k.shape[-1], v.shape[-1]\n assert Lq == Lk and Lk == Lv\n- assert Lk in {16, 32, 64, 128}\n+ # round up Lk to power of two\n+ Lk2 = 2**((Lk - 1).bit_len...
f4fabfb04a7e4ffd21105e38cf0bdeed19f3c72c
diff --git a/tests/kernels/test_prefix_prefill.py b/tests/kernels/test_prefix_prefill.py index 6494fb34af98..ad31b0a7c2a1 100644 --- a/tests/kernels/test_prefix_prefill.py +++ b/tests/kernels/test_prefix_prefill.py @@ -10,7 +10,7 @@ NUM_HEADS = [64] NUM_QUERIES_PER_KV = [1, 8, 64] -HEAD_SIZES = [128] +HEAD_SIZES = ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
vllm-project__vllm-4015@2b315ed
vllm-project/vllm
Python
4,015
[Kernel] Add extra punica sizes to support bigger vocabs
See if we can support more sizes with punica kernels to enable lm head modifications to more models. FIX https://github.com/vllm-project/vllm/issues/3994 **BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE** --- <details> <!-- inside this <details> section, markdown rende...
2024-04-11T19:02:27Z
[Bug]: vLLM doesn't support large vocabulary size with Lora Adapters ### Your current environment ```text The output of `python collect_env.py` ``` Collecting environment information... PyTorch version: 2.1.2+cu121 Is debug build: False CUDA used to build PyTorch: 12.1 ROCM used to build PyTorch: N/A OS: D...
I've encountered this issue in my project. My current solution is modify the model archs based on monkey patching. The pseudocode is as follows. ```python from vllm.model_executor.models.llama import LlamaForCausalLM # noqa drop_modules = ["embed_tokens", "lm_head"] supported_modules: List = Lla...
[ { "body": "### Your current environment\n\n```text\r\nThe output of `python collect_env.py`\r\n```\r\n\r\nCollecting environment information...\r\nPyTorch version: 2.1.2+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Debian GNU/Linux 10 (buster) ...
8afca50889bad6ad987c523c48c31fc52fcb72e4
{ "head_commit": "2b315ed07b0dfc8ef00e49e67c3177502c666805", "head_commit_message": "Add extra punica sizes to support bigger vocabs", "patch_to_review": "diff --git a/csrc/punica/bgmv/bgmv_config.h b/csrc/punica/bgmv/bgmv_config.h\nindex 1084a0f20df6..9b76b98ab332 100644\n--- a/csrc/punica/bgmv/bgmv_config.h\n++...
[ { "diff_hunk": "@@ -20,8 +20,8 @@ inline void check_shape(const torch::Tensor &a, const torch::Tensor &b,\n }\n }\n \n-inline constexpr uint32_t pack_u16(uint16_t a, uint16_t b) {\n- return (uint32_t(a) << 16) | uint32_t(b);\n+inline constexpr uint64_t pack_u32(uint32_t a, uint32_t b) {\n+ return (uint64_t(...
cbf8975c96354913b1ee36dc7881801bf624922d
diff --git a/csrc/punica/bgmv/bgmv_config.h b/csrc/punica/bgmv/bgmv_config.h index 1084a0f20df6..9b76b98ab332 100644 --- a/csrc/punica/bgmv/bgmv_config.h +++ b/csrc/punica/bgmv/bgmv_config.h @@ -60,7 +60,17 @@ void bgmv_kernel(out_T *__restrict__ Y, const in_T *__restrict__ X, f(in_T, out_T, W_T, narrow, 33024) \ ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
vllm-project__vllm-4389@364dba5
vllm-project/vllm
Python
4,389
[BugFix] Fix `min_tokens` when `eos_token_id` is None
Fixes #4365 Also fix re-use of index variable `i` within inner loop.
2024-04-26T04:07:35Z
[Bug]: When I specify `max-tokens` and `min-tokens` at the same time, the service reports an error in `_apply_min_tokens_penalty` ### Your current environment ```text Collecting environment information... PyTorch version: 2.2.1+cu121 Is debug build: False CUDA used to build PyTorch: 12.1 ROCM used to build PyT...
@youkaichao can you take a look? many thanks~ @DefTruth could you provide the exact request parameters you're using to trigger this? @njhill - launch server ```bash python3 -m vllm.entrypoints.openai.api_server \ --model Qwen/Qwen-72B-Chat \ --tensor-parallel-size 8 \ --max-model-len 8192 \ ...
[ { "body": "### Your current environment\r\n\r\n```text\r\nCollecting environment information...\r\nPyTorch version: 2.2.1+cu121\r\nIs debug build: False\r\nCUDA used to build PyTorch: 12.1\r\nROCM used to build PyTorch: N/A\r\n\r\nOS: Ubuntu 22.04.3 LTS (x86_64)\r\nGCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11...
603ad8481594321ceae7d54e2c0050b3638c6502
{ "head_commit": "364dba58233e1e2b632d6c4bbc56f283504d29c2", "head_commit_message": "[BugFix] Fix min_tokens when eos_token_id is None\n\nCo-authored-by: DefTruth <31974251+deftruth@users.noreply.github.com>", "patch_to_review": "diff --git a/vllm/model_executor/layers/sampler.py b/vllm/model_executor/layers/samp...
[ { "diff_hunk": "@@ -163,19 +163,22 @@ def _apply_min_tokens_penalty(\n start_idx += sampling_metadata.prompt_lens[i] - 1\n \n min_tokens = sampling_params.min_tokens\n- if min_tokens > 0:\n+ eos_token_id = sampling_params.eos_token_id\n+ stop_token_ids = sampling_params....
71b9342c4c07005e7fd119e8c055cc3488c26489
diff --git a/tests/samplers/test_sampler.py b/tests/samplers/test_sampler.py index 6f2145f8cdcf..7859f0b21812 100644 --- a/tests/samplers/test_sampler.py +++ b/tests/samplers/test_sampler.py @@ -207,7 +207,7 @@ def test_sampler_min_tokens_penalty(seed: int, device: str): def create_sampling_params(min_tokens, ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-4271@88d1524
Textualize/textual
Python
4,271
improved eta
Improved ETA for progress bar - Reduces refreshes of the ProgressBar. Previously the widget would repaint every time `update` was called. Even if the output remained the same. - Improved calculation of ETA based on recent samples. ETA is extrapolated based on this speed. - Added a `Clock` object to return relative...
2024-03-07T16:33:51Z
Revised progress bar ETA The ProgressBar "ETA" is quite naive. I *think* it assumes a constant speed, which is rarely the case for things you would want a progress bar for. We need a smarter way of calculating the ETA which emphasizes more recent data points. There are a few ways of doing this. You could see the Ric...
While making a start on this I ran into some confusing results and ended up uncovering #4096; so I think this will result in a revamp of how `ProgressBar` does the calculations even in the most simplistic of situations. Some form of "please reset this `ProgressBar` for reuse" method might also be a good idea. WiP on...
[ { "body": "The ProgressBar \"ETA\" is quite naive. I *think* it assumes a constant speed, which is rarely the case for things you would want a progress bar for.\r\n\r\nWe need a smarter way of calculating the ETA which emphasizes more recent data points. There are a few ways of doing this. You could see the Ric...
7122baa036c23d7b399719b60986df32fb79c818
{ "head_commit": "88d15244bdfa9165d0e0214365389064a3428f72", "head_commit_message": "watch progress", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 14b45d4618..963f4eb491 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](http:...
[ { "diff_hunk": "@@ -0,0 +1,126 @@\n+from __future__ import annotations\n+\n+import bisect\n+from math import ceil\n+from time import monotonic\n+\n+import rich.repr\n+\n+\n+@rich.repr.auto(angular=True)\n+class ETA:\n+ \"\"\"Calculate speed and estimate time to arrival.\"\"\"\n+\n+ def __init__(\n+ ...
1c7c1c2e2e487176a673431196b865e1a943b9c2
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f1ea7c205..14aaabb386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Changed `Tabs` - Changed `TextArea` - Changed `Tree` +- Improved ETA calculation for ProgressBar https://...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
vllm-project__vllm-3982@e1ede1c
vllm-project/vllm
Python
3,982
[Bugfix] handle hf_config with architectures == None
`hf_config` is of type `PretrainedConfig` which has the field `architectures` that is an optional list. When not specified the attribute is given the value `None` ([REF](https://github.com/huggingface/transformers/blob/09f9f566de83eef1f13ee83b5a1bbeebde5c80c1/src/transformers/configuration_utils.py#L293)). So `getattr(...
2024-04-10T21:34:17Z
'NoneType' object is not iterable error when I try to load the llama-2-7b-chat model. I downloaded the llama-2-7b-chat model straight from meta and I'm trying to load it through vLLM, after taking 5-10 mins loading the tokenizer, it gives me the following error: -> for arch in architectures: 'NoneType' object is n...
Fixed: added an architecture entry in the config.json file as it was missing "architectures": ["LlamaForCausalLM"]
[ { "body": "I downloaded the llama-2-7b-chat model straight from meta and I'm trying to load it through vLLM, after taking 5-10 mins loading the tokenizer, it gives me the following error:\r\n\r\n-> for arch in architectures: \r\n'NoneType' object is not iterable\r\n\r\nAny way to resolve this issue?\r\n", "...
92cd2e2f21e8ec65b2cb635a9f15de38157a1359
{ "head_commit": "e1ede1ce4129ad94c0dee06a497d0100c8f68354", "head_commit_message": "[Bugfix] handle hf_config with architectures == None\n\nSigned-off-by: Travis Johnson <tsjohnso@us.ibm.com>", "patch_to_review": "diff --git a/vllm/config.py b/vllm/config.py\nindex 753fc33e9b71..89d6b2dd9bd7 100644\n--- a/vllm/c...
[ { "diff_hunk": "@@ -158,7 +158,8 @@ def _verify_load_format(self) -> None:\n \n # TODO: Remove this check once HF updates the pt weights of Mixtral.\n architectures = getattr(self.hf_config, \"architectures\", [])\n- if \"MixtralForCausalLM\" in architectures and load_format == \"pt\":\n+...
82fa5e35292090fe3b2045ac83c9cf39ec38a738
diff --git a/vllm/config.py b/vllm/config.py index 753fc33e9b71..bca250e92228 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -158,7 +158,9 @@ def _verify_load_format(self) -> None: # TODO: Remove this check once HF updates the pt weights of Mixtral. architectures = getattr(self.hf_config, "arch...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
vllm-project__vllm-3899@92466f6
vllm-project/vllm
Python
3,899
[Bugfix] Fix logits processor when prompt_logprobs is not None
This is a resubmission of #3023. This handles `prompt_logprobs` by skipping rows in logits added for the prompt tokens (prompt logprobs are not processed) Comparing to the previous one, this pr resolves the [comment](https://github.com/vllm-project/vllm/pull/3023#issuecomment-2040557561) of @tjohnson31415. Rel...
2024-04-07T15:30:29Z
[bug] AssertionError with prompt_logprobs and logits_processors both set version 0.3.0 with prompt_logprobs and logits_processors both set ``` def proc(token_ids, logits_row): return logits_row sampling_params = SamplingParams(temperature=0.8, top_p=0.95, prompt_logprobs=100, logits_processors=[proc]) ``` go...
In fact, I want a way to get logits (tensor, instead of those dicts of floats or so) of all tokens (including prompts) to calculate ppl outside vllm, tried these params and got the error Same issue. I think the author @noamgat @hongxiayang @simon-mo might know the answer. API added here: #1469 I believe this issue i...
[ { "body": "version 0.3.0\r\nwith prompt_logprobs and logits_processors both set\r\n```\r\ndef proc(token_ids, logits_row):\r\n return logits_row\r\nsampling_params = SamplingParams(temperature=0.8, top_p=0.95, prompt_logprobs=100, logits_processors=[proc])\r\n```\r\ngot error\r\n```\r\n File \"/opt/conda/li...
0ce0539d4750f9ebcd9b19d7085ca3b934b9ec67
{ "head_commit": "92466f66e237805a84a1a4c2f6c43b7f55d3adf3", "head_commit_message": "Add pytest", "patch_to_review": "diff --git a/tests/samplers/test_logits_processor.py b/tests/samplers/test_logits_processor.py\nnew file mode 100644\nindex 000000000000..4f8afd93c3f1\n--- /dev/null\n+++ b/tests/samplers/test_log...
[ { "diff_hunk": "@@ -86,11 +86,17 @@ def _apply_logits_processors(\n ) -> torch.Tensor:\n logits_row_idx = 0\n found_logits_processors = False\n- for seq_ids, sampling_params in sampling_metadata.seq_groups:\n+ for i, seq_group in enumerate(sampling_metadata.seq_groups):\n+ seq_ids, sampling...
df769b09399eb55adc88480f16266e412ebc88da
diff --git a/tests/samplers/test_logits_processor.py b/tests/samplers/test_logits_processor.py new file mode 100644 index 000000000000..3788e9e9752f --- /dev/null +++ b/tests/samplers/test_logits_processor.py @@ -0,0 +1,62 @@ +import pytest +import torch + +from vllm import SamplingParams + +MODELS = ["facebook/opt-125...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-4192@c18fff1
Textualize/textual
Python
4,192
Map ANSI colours
**Please review the following checklist.** - [x] Docstrings on all new or modified functions / classes - [ ] Updated documentation - [x] Updated CHANGELOG.md (where appropriate)
2024-02-20T14:06:09Z
Expose ANSI themes In Textual we convert ANSI themes into truecolor themes. We always assume `DIMMED_MONOKAI`. We should expose that to the dev, and provide 2 terminal themes for light and dark mode. Suggestions for interface: Two reactives on App that take a Rich `TerminalTheme` instance: `dark_terminal_theme` and `l...
I'm not 100% sure I'm following what this is. What is the ANSI theme and how does it relate to the terminal theme/the colours from the design system? I'm actually wondering if a developer explicitly specifies ANSI "red" in their code, should we really be modifying that? I actually think it would be astonishing, and a l...
[ { "body": "In Textual we convert ANSI themes into truecolor themes. We always assume `DIMMED_MONOKAI`. We should expose that to the dev, and provide 2 terminal themes for light and dark mode.\n\nSuggestions for interface: Two reactives on App that take a Rich `TerminalTheme` instance: `dark_terminal_theme` and ...
aa6cc5b9db9b46df530c4639486834f5561d689b
{ "head_commit": "c18fff12fb4b7544d67da891c76db24e89171f75", "head_commit_message": "Fix snapshot tests", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 61689b4643..7f473f541a 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -5,6 +5,12 @@ All notable changes to this project will be document...
[ { "diff_hunk": "@@ -0,0 +1,53 @@\n+from rich.terminal_theme import TerminalTheme\n+\n+MONOKAI_DARK = TerminalTheme(", "line": null, "original_line": 3, "original_start_line": null, "path": "src/textual/_ansi_theme.py", "start_line": null, "text": "@user1:\nIs this theme called \"Monokai ...
cc3e8329cc2fd7a8ad6e80f52bc691d94581d345
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3acf68510d..30dc481d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Added + +- Mapping of ANSI colors to hex codes configurable via `App.ansi_theme_dark` and `Ap...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
vllm-project__vllm-3868@13d792d
vllm-project/vllm
Python
3,868
LM Format Enforcer Guided Decoding Support
FIX #3713 This PR implements the issue raised by simon-mo to add LMFE decoding support to the OpenAI server via a command line argument. It introduces a new command line arg `--guided-decoding-backend` which defaults to outlines (current implementation) but also support lm-format-enforcer. Example curl command ...
2024-04-05T07:05:05Z
[Feature]: Integrate with lm-format-enforcer ### 🚀 The feature, motivation and pitch While existing Outline state machine provide great state of the art performance, it is trading off a one-off compile time when working with the schema. For endpoint products running model as a service with customers supplying many di...
I think I'll be able to execute this integration rather quickly, if we agree on the way the user chooses which decoding backend to use. Are you OK with the flag that you suggested (guided-decoding-backend)? Yes the flag sounds natural to me. A more complicate change here will be while outlines fsm is compiling, use lmf...
[ { "body": "### 🚀 The feature, motivation and pitch\n\nWhile existing Outline state machine provide great state of the art performance, it is trading off a one-off compile time when working with the schema. For endpoint products running model as a service with customers supplying many different schemas, the cos...
37e84a403d6d11b670a42e84153204cd8b76b849
{ "head_commit": "13d792dbede05d7c8a5dc821695ccd6156975801", "head_commit_message": "Merge branch 'main' into lmfe-generation\n\n# Conflicts:\n#\trequirements-common.txt", "patch_to_review": "diff --git a/requirements-common.txt b/requirements-common.txt\nindex ff053388a23e..5cef36bdefb0 100644\n--- a/requirement...
[ { "diff_hunk": "@@ -1000,6 +998,20 @@ def _get_and_verify_max_len(\n return int(max_model_len)\n \n \n+@dataclass\n+class DecodingConfig:\n+ \"\"\"Dataclass which contains the decoding strategy of the engine\"\"\"\n+ guided_decoding_backend: str = 'outlines'\n+ \"\"\"Which guided decoding algo to u...
79f060a8a598a763cae4e67f2f3e08ebe7d82d3a
diff --git a/requirements-common.txt b/requirements-common.txt index 90a3bc8abc1d..c1614d2537b2 100644 --- a/requirements-common.txt +++ b/requirements-common.txt @@ -11,6 +11,7 @@ uvicorn[standard] pydantic >= 2.0 # Required for OpenAI server. prometheus_client >= 0.18.0 tiktoken == 0.6.0 # Required for DBRX toke...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-4183@ef45e72
Textualize/textual
Python
4,183
Adds a `Widget.batch` async context manager
The `Widget.batch` context manager locks the widget and batches app updates too. This fixes #4133. This PR depends on #4139 and shouldn't be merged while #4139 doesn't get the OK to be merged.
2024-02-19T14:50:01Z
Add `remove` attribute to `mount` and `mount_all` It's common to remove some widgets and add some other widgets. To make this easier, I think we should add a `remove` attribute to the mount methods which accepts a selector and removes those widgets prior to mounting. The remove + mount should be atomic, to avoid flick...
I think of the method `mount` as a method that “builds”, “adds”, “constructs”. Adding a kwd argument that goes in the opposite direction feels a bit clunky. Wouldn't it make more sense to grow a method `replace(selector, new_widget)`? The thing is that it is not replacing. It's not like we can guarantee the widgets wi...
[ { "body": "It's common to remove some widgets and add some other widgets. To make this easier, I think we should add a `remove` attribute to the mount methods which accepts a selector and removes those widgets prior to mounting.\n\nThe remove + mount should be atomic, to avoid flicker (might need to be wrapped ...
ba17dfb56f16a3f517a16904c7765d08a0df8561
{ "head_commit": "ef45e725204e39186b6088f7f012665dad0bdb65", "head_commit_message": "Merge branch 'main' into batch-async-context-manager", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 204fcb5f42..1aac44edff 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -11,6 +11,9 @@ and this project ...
[ { "diff_hunk": "@@ -3283,15 +3294,42 @@ def remove(self) -> AwaitRemove:\n await_remove = self.app._remove_nodes([self], self.parent)\n return await_remove\n \n- def remove_children(self) -> AwaitRemove:\n- \"\"\"Remove all children of this Widget from the DOM.\n+ def remove_childre...
9f5e6530619896313724726e106f60c5cfaf558c
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e02eb239b..409cd5e670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Add attribute `App.animation_level` to control whether animations on that app run or not https://github.com/Textu...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
vllm-project__vllm-3239@a879230
vllm-project/vllm
Python
3,239
Fix auto prefix bug
Resolves #3193 Fixes a bug that occurs when the entire prompt has already been computed. If the entire prompt is marked as computed, the model runner will attempt to create zero-sized tensors for non-computed prompt tokens. This throws an exception in torch.arrange. This fix is somewhat of a band-aid because it j...
2024-03-06T16:52:54Z
Automatic Prefix Caching Bug If I enable automatic prefix caching, it occasionally crashes. ``` Future exception was never retrieved future: <Future finished exception=RuntimeError('step must be nonzero')> Traceback (most recent call last): File "/root/vllm/vllm/engine/async_llm_engine.py", line 29, in _raise_ex...
Can confirm similar issues happened to me as well when automatic prefix caching is enabled. ``` Exception in callback functools.partial(<function _raise_exception_on_finish at 0x7f19b986c0d0>, request_tracker=<vllm.engine.async_llm_engine.RequestTracker object at 0x7f19af5db4f0>) handle: <Handle functools.partial(<f...
[ { "body": "If I enable automatic prefix caching, it occasionally crashes.\r\n\r\n```\r\nFuture exception was never retrieved\r\nfuture: <Future finished exception=RuntimeError('step must be nonzero')>\r\nTraceback (most recent call last):\r\nFile \"/root/vllm/vllm/engine/async_llm_engine.py\", line 29, in _rais...
a33ce60c6629e8c22aaf002ae8478a685e726e3e
{ "head_commit": "a8792309adeff0e0ec5d2f8640360d067e94da71", "head_commit_message": "format", "patch_to_review": "diff --git a/tests/engine/test_computed_prefix_blocks.py b/tests/engine/test_computed_prefix_blocks.py\nnew file mode 100644\nindex 000000000000..ed35212cc3f1\n--- /dev/null\n+++ b/tests/engine/test_c...
[ { "diff_hunk": "@@ -426,23 +426,29 @@ def access_all_blocks_in_seq(\n for block in block_table:\n block.last_accessed = access_time\n \n- def compute_last_full_block_in_seq(self, seq: Sequence):\n+ def compute_full_blocks_in_seq(self, seq: Sequence):\n if seq.seq_id not in self...
22cc77889ea541b8662b841eb8601b33adc0a4f0
diff --git a/tests/engine/test_computed_prefix_blocks.py b/tests/engine/test_computed_prefix_blocks.py new file mode 100644 index 000000000000..ed35212cc3f1 --- /dev/null +++ b/tests/engine/test_computed_prefix_blocks.py @@ -0,0 +1,34 @@ +import pytest + +from vllm.engine.arg_utils import EngineArgs +from vllm.engine.l...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
vllm-project__vllm-2992@3925602
vllm-project/vllm
Python
2,992
Fix the openai benchmarking requests to work with latest OpenAI apis
Resolve #2940 To test the OpenAI benchmarking script, you can run: ``` python benchmark_serving.py --backend openai --base-url https://api.openai.com --endpoint /v1/chat/completions --num-prompts 1 --model gpt-3.5-turbo --tokenizer openai-community/gpt2 --dataset ShareGPT_V3_unfiltered_cleaned_split.json ``` ...
2024-02-22T17:02:45Z
Benchmarking script for openai chat completion api are not supported When running vllm with openai chat apis, the benchmarking script will fail as it asserts the backend API of `assert api_url.endswith("v1/completions")`. ``` python benchmark_serving.py --backend openai --model mistralai/Mistral-7B-v0.1 --dataset S...
[ { "body": "When running vllm with openai chat apis, the benchmarking script will fail as it asserts the backend API of `assert api_url.endswith(\"v1/completions\")`.\r\n\r\n```\r\npython benchmark_serving.py --backend openai --model mistralai/Mistral-7B-v0.1 --dataset ShareGPT_V3_unfiltered_cleaned_split.json -...
703e42ee4b3efed3c71e7ae7d15f0f96e05722d4
{ "head_commit": "39256022214ee29d3d68d9f3815ccc860b97135c", "head_commit_message": "fix issue #2940\n\nkeep the openai backend url as /v1/completions and add openai-chat backend url as /v1/chat/completions\n\nyapf format\n\nadd newline", "patch_to_review": "diff --git a/benchmarks/backend_request_func.py b/bench...
[ { "diff_hunk": "@@ -275,10 +275,80 @@ async def async_request_openai_completions(\n return output\n \n \n+async def async_request_openai_chat_completions(\n+ request_func_input: RequestFuncInput,\n+ pbar: Optional[tqdm] = None,\n+) -> RequestFuncOutput:\n+ api_url = request_func_input.api_url\n+ ...
8b6ae439fd1c02bef750f15bbf95214ff3c643bc
diff --git a/benchmarks/backend_request_func.py b/benchmarks/backend_request_func.py index e7f74e2feaf8..d7cac22ce7a9 100644 --- a/benchmarks/backend_request_func.py +++ b/benchmarks/backend_request_func.py @@ -275,10 +275,80 @@ async def async_request_openai_completions( return output +async def async_request...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
vllm-project__vllm-2517@30151a7
vllm-project/vllm
Python
2,517
Prefix Caching- fix t4 triton error
Fix #2513, need a smaller block size for Turing GPUs
2024-01-20T09:20:32Z
prefix caching error with baichuan model ## Machine Info - Ubuntu - cuda driver 12.1 - T4 GPU x4 ## Reproduce Step Only change llm line in `examples/offline_inference_with_prefix.py` with ``` llm = LLM(model="baichuan-inc/Baichuan2-13B-Chat", tensor_parallel_size=4, enforce_eager=True, dtype="half", trust_re...
[ { "body": "## Machine Info\r\n- Ubuntu\r\n- cuda driver 12.1\r\n- T4 GPU x4\r\n\r\n## Reproduce Step\r\n\r\nOnly change llm line in `examples/offline_inference_with_prefix.py` with\r\n```\r\nllm = LLM(model=\"baichuan-inc/Baichuan2-13B-Chat\", tensor_parallel_size=4, enforce_eager=True, dtype=\"half\", trust_re...
5f036d2bcc5244ca431212167c94700e5ae7a8e0
{ "head_commit": "30151a7af1eb365d90ae339afbde07aa5392ba64", "head_commit_message": "minor", "patch_to_review": "diff --git a/vllm/model_executor/layers/triton_kernel/prefix_prefill.py b/vllm/model_executor/layers/triton_kernel/prefix_prefill.py\nindex 8fa70054f02c..10e5f2c76d89 100644\n--- a/vllm/model_executor/...
[ { "diff_hunk": "@@ -5,6 +5,8 @@\n import triton\n import triton.language as tl\n \n+TESLA = 'Tesla' in torch.cuda.get_device_name(0)", "line": null, "original_line": 8, "original_start_line": null, "path": "vllm/model_executor/layers/triton_kernel/prefix_prefill.py", "start_line": null, ...
1824cdb981700de111f27fdf2778565a954b5a4c
diff --git a/vllm/model_executor/layers/triton_kernel/prefix_prefill.py b/vllm/model_executor/layers/triton_kernel/prefix_prefill.py index 8fa70054f02c..ba40d42307fa 100644 --- a/vllm/model_executor/layers/triton_kernel/prefix_prefill.py +++ b/vllm/model_executor/layers/triton_kernel/prefix_prefill.py @@ -618,7 +618,9 ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
vllm-project__vllm-2529@d04fd49
vllm-project/vllm
Python
2,529
Support Batch Completion in Server
OpenAI completion protocol support inputs for `prompt` to be `a string, array of strings, array of tokens, or array of token arrays.`. This PR adds support for that. Closes #2441 Closes #2396
2024-01-21T21:56:21Z
batching and streaming Hi! If i correctly understood code . Any type of entrypoints api with stream doesn't support batching . But LLMEngine has step() method for processing batch of requests and i can implement streaming with batch using step() or there any pitfalls here? For example how handle these multiple respon...
I have the same question, and strongly expecting someone can help me. > I have the same question, and strongly expecting someone can help me. u can use engine.step() method to synchronous executing batch of requests but probably without streaming Any comments on this??? +1 +
[ { "body": "Hi!\r\nIf i correctly understood code . Any type of entrypoints api with stream doesn't support batching . But LLMEngine has step() method for processing batch of requests and i can implement streaming with batch using step() or there any pitfalls here? For example how handle these multiple response...
d75c40734a96a10b30c7b2652d49f2a70030855b
{ "head_commit": "d04fd49c2bc9540237d3d11b6d1de26bbc35d232", "head_commit_message": "Support Batch Completion in Server", "patch_to_review": "diff --git a/tests/entrypoints/test_openai_server.py b/tests/entrypoints/test_openai_server.py\nindex 3cef6bfd2253..54522f0a99fa 100644\n--- a/tests/entrypoints/test_openai...
[ { "diff_hunk": "@@ -20,46 +21,55 @@\n \n \n async def completion_stream_generator(\n- request: CompletionRequest,\n- result_generator: AsyncIterator[RequestOutput],\n- echo_without_generation, create_logprobs_fn, request_id, created_time,\n- model_name) -> AsyncGenerator[str, None]:\...
a3a405c6a2b2f259671c5034c9a14e28187e97ac
diff --git a/tests/entrypoints/test_openai_server.py b/tests/entrypoints/test_openai_server.py index 3cef6bfd2253..54522f0a99fa 100644 --- a/tests/entrypoints/test_openai_server.py +++ b/tests/entrypoints/test_openai_server.py @@ -1,5 +1,6 @@ -import time +import os import subprocess +import time import sys import...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-4064@d033407
Textualize/textual
Python
4,064
Application suspension
# Introduction This PR adds two related features to Textual applications: - An `App.suspend` context manager that allows the dev to temporarily stop application mode to run some other code; a classic example would be shelling out to an external editor. - An action (`App.action_suspend_process`) that, where appro...
2024-01-23T14:50:43Z
Add support for suspend and resume. Textual swallows ctrl+Z which would normally allow the user to suspend the app. We should restore this behaviour. There many be another issue for this somewhere, and some initial work. This may require a little work on the driver code. Bear in mind there are several concrete im...
Previous issue is #1582 and related PR is #1655 which, at the time, was working but stalled when it came to testing via the pilot. While the bulk of this is now in place, I have run into one problem when it comes to `SIGTSTP` background of the app. With this PR in place, if you <kbd>Ctrl</kbd>+</kbd>Z</kbd> the app the...
[ { "body": "Textual swallows ctrl+Z which would normally allow the user to suspend the app. We should restore this behaviour.\r\n\r\nThere many be another issue for this somewhere, and some initial work.\r\n\r\nThis may require a little work on the driver code. Bear in mind there are several concrete implementat...
f017604cfcc1265f4713808ac6f073d1296a15c9
{ "head_commit": "d033407db43d169eb1ce2ddaac8ce7e99729a1e8", "head_commit_message": "Fix a typo\n\nCo-authored-by: Darren Burns <darrenburns@users.noreply.github.com>", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 705eb5dd3e..6f39fa2a91 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -12...
[ { "diff_hunk": "@@ -240,6 +240,66 @@ if __name__ == \"__main__\"\n sys.exit(app.return_code or 0)\n ```\n \n+## Suspending\n+\n+A Textual app can be suspended; this means that app input and output will be paused and the terminal display will be returned to its previous state.\n+When the app is resumed the d...
df73e71bff7d848f9bd98bf998dfa0e6f67313d0
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1844edd8e2..e1f7abeffd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added `Query.blur` and `Query.focus` https://github.com/Textualize/textual/pull/4012 - Added `MessagePump.messag...
{ "difficulty": "high", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-4062@350d53b
Textualize/textual
Python
4,062
Add support for env variable TEXTUAL_ANIMATIONS
Adds support for the environment variable `TEXTUAL_ANIMATIONS`, which dictates which animations take place in Textual apps. (Kind of like a log level but for animations.) Fixes #3992.
2024-01-23T13:57:15Z
Env var to modify animation Add an environment variable to set animation behaviour. `TEXTUAL_ANIMATION` should be one of the following values: `NONE` for no animation at all. `BASIC` for scrolling animation and other animation that doesn't delay content appearing (such as the tab underline). `FULL` for all anim...
This looks like it'll take a couple of days because I need to figure out a way for the animations code to determine whether or not an animation is “basic”. (If it were just `NONE` vs `FULL`, it'd be simpler.) Looks like we don't want `TEXTUAL_ANIMATIONS` to interfere with the parameter `delay` that is set on some anim...
[ { "body": "Add an environment variable to set animation behaviour.\r\n\r\n`TEXTUAL_ANIMATION` should be one of the following values:\r\n\r\n`NONE` for no animation at all.\r\n`BASIC` for scrolling animation and other animation that doesn't delay content appearing (such as the tab underline).\r\n`FULL` for all a...
2b3c71c8f53a31b26e359fd3b94c8b9d7fa2fed3
{ "head_commit": "350d53b313e7c1bf61e415bf4cc553eb50f5a120", "head_commit_message": "Fix tests for 0.48.0", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 7c1d499d41..943e1a7db2 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -35,6 +35,8 @@ and this project adheres to [Semantic Versioning]...
[ { "diff_hunk": "@@ -4,6 +4,7 @@\n \n from .._animator import Animation, EasingFunction\n from .._types import CallbackType\n+from ..constants import AnimationLevel", "line": null, "original_line": 7, "original_start_line": null, "path": "src/textual/css/scalar_animation.py", "start_line": nu...
5cb2471bdb102cc6a9612323a968b94fcfd05327
diff --git a/CHANGELOG.md b/CHANGELOG.md index c793d5f578..204fcb5f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versionin...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-4040@86d4245
Textualize/textual
Python
4,040
Allow lists of nested selectors and allow styles after nested CSS blocks
Fixes #3969 and fixes #3999. Changes the tokenizer to accept lists of selectors in a nested context and also to accept styles after nested scopes. While working on the above, we opened #4039 because the tokenizer isn't yet clever enough to distinguish a selector with a pseudo-class from a rule with a value in a n...
2024-01-17T17:19:57Z
Nesting selectors in a selector list causes a stylesheet error If you have a stylesheet like this: ```python from textual.app import App, ComposeResult from textual.widgets import Label class NestedCSSTokenErrorApp(App[None]): CSS = """ Label { &.foo, &.bar { border: solid red;...
To whomever picks this up, talk to @willmcgugan if you need pointers on this. @willmcgugan if you had to guess would you say this will involve modifying the tokenizer state machine? Yes, I think so. If I were to guess, the comma token causes the tokenizer to switch to an `Expect` that doesn't include the nesting operat...
[ { "body": "If you have a stylesheet like this:\r\n\r\n```python\r\nfrom textual.app import App, ComposeResult\r\nfrom textual.widgets import Label\r\n\r\nclass NestedCSSTokenErrorApp(App[None]):\r\n\r\n CSS = \"\"\"\r\n Label {\r\n &.foo, &.bar {\r\n border: solid red;\r\n }\r\n ...
b13a215372d0b4aef605e1162faa0581615a09ad
{ "head_commit": "86d4245e3956d5762e115d3c2a654fc63829ed30", "head_commit_message": "Merge branch 'main' into improve-nested-tcss", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 2bb816e2ab..c975d2f84b 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -18,6 +18,11 @@ and this project adheres...
[ { "diff_hunk": "@@ -44,6 +44,54 @@ async def test_nest_app():\n assert app.query_one(\"#foo .paul\").styles.background == Color.parse(\"blue\")\n \n \n+class ListOfNestedSelectorsApp(App[None]):\n+ CSS = \"\"\"\n+ Label {\n+ &.foo, &.bar {\n+ background: red;\n+ }\n+ }\...
159a54e109c2ae271db878eca43727597578d855
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bb816e2ab..c975d2f84b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Renamed `TextArea.tab_behaviour` to `TextArea.tab_behavior` https://github.com/Textualize/textual/pull/4124 ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
vllm-project__vllm-1239@cd25a26
vllm-project/vllm
Python
1,239
Fix error message on `TORCH_CUDA_ARCH_LIST`
Fixes #1225 This PR fixes the error message when the `TORCH_CUDA_ARCH_LIST` includes an unsupported CUDA architecture.
2023-10-01T04:54:38Z
Installation Error When I install vLLM, I have pull the docker as the tutorial and install from source. But there are an error encountered, how can I fix this: `ValueError: Unsupported CUDA arch (5.2). Valid CUDA arch strings are: ['7.0', '7.5', '8.0', '8.6', '8.9', '9.0', '7.0+PTX', '7.5+PTX', '8.0+PTX', '8.6+PTX', '...
I managed to get it working by setting `ENV TORCH_CUDA_ARCH_LIST="8.0;8.6;8.9"` (depends on your GPU) but I think an `ENV TORCH_CUDA_ARCH_LIST=""` could also work. I believe the check [here](https://github.com/vllm-project/vllm/blob/v0.2.0/setup.py#L59-L63) should be a > if none of the architectures in `arch_list` ...
[ { "body": "When I install vLLM, I have pull the docker as the tutorial and install from source. But there are an error encountered, how can I fix this:\r\n`ValueError: Unsupported CUDA arch (5.2). Valid CUDA arch strings are: ['7.0', '7.5', '8.0', '8.6', '8.9', '9.0', '7.0+PTX', '7.5+PTX', '8.0+PTX', '8.6+PTX',...
b5a10eb0ef68f45c7dbdef2917e02bebca780d1a
{ "head_commit": "cd25a2692207992bff04350d549c1b30c68d8d1c", "head_commit_message": "Fix error msg", "patch_to_review": "diff --git a/setup.py b/setup.py\nindex 8b2ad97dd540..815d7834cf93 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -50,16 +50,17 @@ def get_torch_arch_list() -> Set[str]:\n # not give the best p...
[ { "diff_hunk": "@@ -50,16 +50,17 @@ def get_torch_arch_list() -> Set[str]:\n # not give the best performance on the newer architectures, it provides\n # forward compatibility.\n valid_arch_strs = SUPPORTED_ARCHS + [s + \"+PTX\" for s in SUPPORTED_ARCHS]\n- arch_list = os.environ.get(\"TORCH_CUDA_...
03e2f9ee5261c5491fae1cf2f82c5cbd2718d878
diff --git a/setup.py b/setup.py index 8b2ad97dd540..6ffc03c25386 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ ROOT_DIR = os.path.dirname(__file__) # Supported NVIDIA GPU architectures. -SUPPORTED_ARCHS = ["7.0", "7.5", "8.0", "8.6", "8.9", "9.0"] +SUPPORTED_ARCHS = {"7.0", "7.5", "8.0", "8.6", "8.9", "9....
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Dependency Updates & Env Compatibility" }
vllm-project__vllm-1096@42a37d9
vllm-project/vllm
Python
1,096
rope_theta and max_position_embeddings from config
This PR lets `rope_theta` and `max_position_embeddings` to be read from model configs instead of hardcoding them. Notably, this allows codellama to work without issues with longer contexts. Fixes https://github.com/vllm-project/vllm/issues/904
2023-09-19T04:47:13Z
stuck at llm_engine.py:196 ``` 100%|████████████████████████████████████| 54584/54584 [00:06<00:00, 8619.58it/s] INFO 08-29 20:48:52 llm_engine.py:70] Initializing an LLM engine with config: model='llama2-MultiTQ-20230829-01', tokenizer='llama2-MultiTQ-20230829-01', tokenizer_mode=auto, trust_remote_code=False, dtype...
Hi @cosmicexotic, thanks for trying out vLLM and reporting the error. could you share your environment? E.g., which GPU(s) are you using? How much CPU memory do you have? Are you running vLLM in a container? Also, could you try vLLM with a small number of prompts (say 10) and see if it still hangs? > Hi @cosmicexoti...
[ { "body": "```\r\n100%|████████████████████████████████████| 54584/54584 [00:06<00:00, 8619.58it/s]\r\nINFO 08-29 20:48:52 llm_engine.py:70] Initializing an LLM engine with config: model='llama2-MultiTQ-20230829-01', tokenizer='llama2-MultiTQ-20230829-01', tokenizer_mode=auto, trust_remote_code=False, dtype=tor...
c1026311b59446d1ada5f950ddbdbe0bb21943b0
{ "head_commit": "42a37d9d15d10156b68e4af874b6a85a4fc8b5ad", "head_commit_message": "Fix", "patch_to_review": "diff --git a/vllm/config.py b/vllm/config.py\nindex dd92fbccd899..4ebff0633f3a 100644\n--- a/vllm/config.py\n+++ b/vllm/config.py\n@@ -1,4 +1,4 @@\n-from typing import Optional\n+from typing import Optio...
[ { "diff_hunk": "@@ -167,9 +171,11 @@ def get_num_heads(self, parallel_config: \"ParallelConfig\") -> int:\n total_num_attention_heads = self.hf_config.num_attention_heads\n return total_num_attention_heads // parallel_config.tensor_parallel_size\n \n- def get_max_model_len(self) -> int:\n- ...
fccb43f43c38e1c186386653fd491785711d824c
diff --git a/vllm/config.py b/vllm/config.py index dd92fbccd899..f3e204af1b59 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -57,7 +57,7 @@ def __init__( load_format: str, dtype: str, seed: int, - revision: Optional[str], + revision: Optional[str] = None, max_model...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Performance Optimizations" }
Textualize__textual-3896@4079437
Textualize/textual
Python
3,896
Move child acts as noop if trying to move before/after itself
This fixes #1743 for good.
2023-12-18T16:33:54Z
Make moving a child before or after itself, a no-op If we try to use `move_child` to move a widget to after/before itself, should we get an error or is that a no-op? (Add tests to tests/test_widget_child_moving.py accordingly.) Context: this arose from writing some functionality in a TODO app that sorts TODO items ...
The more I think about it, the more I think I'm inclined to agree with you that it makes sense to have it be a no-op. "Move child to where it is" seems like it shouldn't error even if it's a weird thing to ask, as it's not the same as calling `move_child` and not providing anywhere, or providing somewhere out of bounds...
[ { "body": "If we try to use `move_child` to move a widget to after/before itself, should we get an error or is that a no-op?\r\n(Add tests to tests/test_widget_child_moving.py accordingly.)\r\n\r\nContext: this arose from writing some functionality in a TODO app that sorts TODO items according to their due date...
1c8dc5d74e4e791f746cdc8a10c0272c9e1dff97
{ "head_commit": "40794371094602ecbe109f8529311d1b9e87b6ff", "head_commit_message": "Link to PR in changelog.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5303ec554f..1772024442 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -5,6 +5,16 @@ All notable changes to this project will be do...
[ { "diff_hunk": "@@ -36,28 +36,66 @@ async def test_move_child_not_our_child() -> None:\n async def test_move_child_to_outside() -> None:\n \"\"\"Test attempting to move relative to a widget that isn't a child.\"\"\"\n async with App().run_test() as pilot:\n- child = Widget(Widget())\n+ chi...
e03de2765e2e495eddfaf1834e674863c3a27200
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5303ec554f..1772024442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versionin...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-4032@0db8e6d
Textualize/textual
Python
4,032
Validate ids
Fix #3954. There was already a check taking place but the regex used was too lenient.
2024-01-16T17:31:17Z
It is possible to give a widget an ID that can't be queried back It is possible to give a widget an ID that can't then be queried back; for example: ```python from textual.app import App, ComposeResult from textual.widgets import Label class BadIDApp(App[None]): def compose(self) -> ComposeResult: ...
We do this with class names, so it would be sensible to do it for IDs as well.
[ { "body": "It is possible to give a widget an ID that can't then be queried back; for example:\r\n\r\n```python\r\nfrom textual.app import App, ComposeResult\r\nfrom textual.widgets import Label\r\n\r\nclass BadIDApp(App[None]):\r\n\r\n def compose(self) -> ComposeResult:\r\n yield Label(\"Hello, Worl...
2983d6140a3cd15c08359f529c460c9e9f72f715
{ "head_commit": "0db8e6d6c06a88f4d523f14ff83b776969513b3e", "head_commit_message": "Fix regular expression check for identifiers.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex d3f838be7d..42dcff82e1 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -26,6 +26,7 @@ and this project adheres...
[ { "diff_hunk": "@@ -62,7 +62,7 @@\n \n from typing_extensions import Literal\n \n-_re_identifier = re.compile(IDENTIFIER)\n+_re_identifier = re.compile(f\"^{IDENTIFIER}$\")", "line": null, "original_line": 65, "original_start_line": null, "path": "src/textual/dom.py", "start_line": null, ...
f6fdc26ae3543dd78b11725fb384ad79949aab4d
diff --git a/CHANGELOG.md b/CHANGELOG.md index 44a95d744f..bc2657ad15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `SelectionList` option IDs are usable as soon as the widget is instantiated https://github.com/Textualize/textual...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
vllm-project__vllm-936@a435b23
vllm-project/vllm
Python
936
[BugFix] Fix NaN errors in paged attention kernel
Fixes #641 This PR fixes the paged attention kernel. Currently, the kernel computes `attn_weight * value` for all tokens in a value block, even if some of them are not included in the context. It is generally acceptable since the `attn_weight` for those tokens is 0, but this causes errors when the tokens contain NaNs...
2023-09-03T03:23:38Z
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0 Hello everyone, I always got this error for Baichuan and LLaMA models. And I found it's caused by the **single_query_cached_kv_attention** method in vllm\model_executor\layers\\**attention.py**. After calling of this method, the hidden output ...
Same problem, in the end I find that KVCache is construst with torch.empty filling with uninitialized values, for some reason the uninitialized values are involved in computing. Here in [vllm](https://github.com/vllm-project/vllm/tree/main)/[vllm](https://github.com/vllm-project/vllm/tree/main/vllm)/[worker](https://g...
[ { "body": "Hello everyone, I always got this error for Baichuan and LLaMA models. And I found it's caused by the **single_query_cached_kv_attention** method in vllm\\model_executor\\layers\\\\**attention.py**. After calling of this method, the hidden output has some **rows of \"nan\"**. How can I fix this? Than...
8ce9c50d4034de3c557b520935fac1d6dac585a0
{ "head_commit": "a435b239fd0e045b42e98951002963607373d89e", "head_commit_message": "Minor", "patch_to_review": "diff --git a/csrc/attention/attention_kernels.cu b/csrc/attention/attention_kernels.cu\nindex 568d1fb1ad24..7a656bb9cd8a 100644\n--- a/csrc/attention/attention_kernels.cu\n+++ b/csrc/attention/attentio...
[ { "diff_hunk": "@@ -261,6 +263,14 @@ __global__ void single_query_cached_kv_attention_kernel(\n if (row_idx < HEAD_SIZE) {\n const int offset = row_idx * BLOCK_SIZE + physical_block_offset;\n V_vec v_vec = *reinterpret_cast<const V_vec*>(v_ptr + offset);\n+ // NOTE(woosuk): When v_v...
ea6782a16dc96a2cc0d02a89d80b886470969ea9
diff --git a/csrc/attention/attention_kernels.cu b/csrc/attention/attention_kernels.cu index 568d1fb1ad24..d603f8e401fb 100644 --- a/csrc/attention/attention_kernels.cu +++ b/csrc/attention/attention_kernels.cu @@ -246,6 +246,8 @@ __global__ void single_query_cached_kv_attention_kernel( accs[i] = 0.f; } + sc...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-3830@ed46ddb
Textualize/textual
Python
3,830
feat(collapsible): make title a reactive attribute
Closes #3829 **Please review the following checklist.** - [ ] Docstrings on all new or modified functions / classes - [x] Updated documentation - [x] Updated CHANGELOG.md (where appropriate)
2023-12-07T22:13:47Z
Make Title of a Collapsible Widget Editable Can not update title property of the Collapsible widget , looking at CollapsibleTitle class it seems to only set at init Looks like this was an intentional choice ? But I think it would be helpful to make the title property editable , Eg: changing content in the collapsed ...
Thank you for your issue. Give us a little time to review it. PS. You might want to check the [FAQ](https://textual.textualize.io/FAQ/) if you haven't done so already. This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory) Not intentionally really. I can't think of a reason it shou...
[ { "body": "Can not update title property of the Collapsible widget , looking at CollapsibleTitle class it seems to only set at init\r\nLooks like this was an intentional choice ?\r\nBut I think it would be helpful to make the title property editable ,\r\nEg: changing content in the collapsed state and don't wan...
c6aef4b8b951e7ba4c78433b47a47d8f925c4730
{ "head_commit": "ed46ddbe225b3d836af736946f227448c197fb18", "head_commit_message": "change collapsible title to static", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 625a57b202..a8ec8fe016 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -34,6 +34,7 @@ and this project adheres to [Semant...
[ { "diff_hunk": "@@ -214,3 +224,8 @@ def compose_add_child(self, widget: Widget) -> None:\n widget: A Widget to add.\n \"\"\"\n self._contents_list.append(widget)\n+\n+ def _watch_title(self, title: str) -> None:\n+ if not self.is_mounted:", "line": null, "original_l...
18a2572c895b22a949837b11a6721fcc7b999d62
diff --git a/CHANGELOG.md b/CHANGELOG.md index 625a57b202..a8ec8fe016 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added `get_loading_widget` to Widget and App customize the loading widget. https://github.com/Textualize/textua...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
vllm-project__vllm-576@b0ad867
vllm-project/vllm
Python
576
[Fix] Add chat completion Example and simplify dependencies
Fix #545 #537 Make fastchat an optional dependency giving the huge dependency list of fastchat and many complaints on installation.
2023-07-25T21:25:36Z
Slow installation: install all versions of one package. I follow the document and it will install all versions of one package. ``` Downloading fonttools-4.24.0-py3-none-any.whl (853 kB) |████████████████████████████████| 853 kB 22.8 MB/s Downloading fonttools-4.23.1-py3-none-any.whl (853 kB) |██████...
Same here. I am running `pip install vllm` from the docker container created with `docker run --gpus all -it --rm --shm-size=8g nvcr.io/nvidia/pytorch:22.12-py3` (and after running `pip uninstall torch`) ``` INFO: pip is looking at multiple versions of contourpy to determine which version is compatible with oth...
[ { "body": "I follow the document and it will install all versions of one package.\r\n```\r\n Downloading fonttools-4.24.0-py3-none-any.whl (853 kB)\r\n |████████████████████████████████| 853 kB 22.8 MB/s\r\n Downloading fonttools-4.23.1-py3-none-any.whl (853 kB)\r\n |████████████████████████████████| ...
2d867b55fa17840b50709fa12106e9fd6b2f527d
{ "head_commit": "b0ad86788eb1a3d8f597c9c418c529a3c4e719de", "head_commit_message": "fix", "patch_to_review": "diff --git a/examples/openai_client.py b/examples/openai_client.py\nindex cf7223d4c143..bcc41065bd86 100644\n--- a/examples/openai_client.py\n+++ b/examples/openai_client.py\n@@ -3,26 +3,48 @@\n # Modify...
[ { "diff_hunk": "@@ -63,6 +67,9 @@ async def check_model(request) -> Optional[JSONResponse]:\n \n \n async def get_gen_prompt(request) -> str:\n+ assert _fastchat_available, (", "line": null, "original_line": 70, "original_start_line": null, "path": "vllm/entrypoints/openai/api_server.py", ...
5ec2f08337b4828c064194227566053d37d6596c
diff --git a/examples/openai_chatcompletion_client.py b/examples/openai_chatcompletion_client.py new file mode 100644 index 000000000000..af2a690ce5c1 --- /dev/null +++ b/examples/openai_chatcompletion_client.py @@ -0,0 +1,33 @@ +import openai + +# Modify OpenAI's API key and API base to use vLLM's API server. +openai....
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Performance Optimizations" }
Textualize__textual-3697@36ad1bd
Textualize/textual
Python
3,697
Escape markup in markdown headings.
The markup would already be 'escaped' (ignored, really) in the markdown document itself, but it would be processed when building the table of contents because of the way the widget 'Tree' internally processes labels. This was changed, so that we create our own 'Text' instances for the labels, which means we get to avoi...
2023-11-17T12:04:42Z
Markdown Widget crashes on close tag in heading The Markdown Widget crashes if there is a closing rich tag in a heading. I.e., if there is a string like `[/some_text]` in a markdown heading. This can become problematic when using Markdown extensions to WikiLinks and having something linke `[[/test.md]]` in a heading. ...
> Note in regular text this issue does not seem to be present. I have only seen this for headings. Just to clarify, it looks like it isn't the `Markdown` widget itself that's crashing, but rather the `Tree` used for the table of contents, which is why this issues only occurs with headings. Hey @GuutBoy thanks for th...
[ { "body": "The Markdown Widget crashes if there is a closing rich tag in a heading. I.e., if there is a string like `[/some_text]` in a markdown heading. This can become problematic when using Markdown extensions to WikiLinks and having something linke `[[/test.md]]` in a heading.\r\n\r\nNote in regular text th...
a3768db34d8071713501e66516309eb34a0595e5
{ "head_commit": "36ad1bd1e2e833c0c4c05a8eb9514cf1889fad67", "head_commit_message": "Escape markup in markdown headings.\n\nThe markup would already be 'escaped' (ignored, really) in the markdown document itself, but it would be processed when building the table of contents because of the way the widget 'Tree' inte...
[ { "diff_hunk": "@@ -937,7 +937,8 @@ def set_table_of_contents(self, table_of_contents: TableOfContentsType) -> None:\n node.allow_expand = True\n else:\n node = node.add(NUMERALS[level], expand=True)\n- node.add_leaf(f\"[dim]{NUMERALS[level]}[/]...
84df9ac38ef622cfdafdae39b30dbe551b48d6dd
diff --git a/CHANGELOG.md b/CHANGELOG.md index bdf9208f36..233b08a933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - inline CSS error reporting will report widget/class variable where the CSS was read from https://github.com/Textu...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
vllm-project__vllm-312@bf2758d
vllm-project/vllm
Python
312
[Fix] Do not pin memory when in WSL
Fix #188
2023-06-29T15:10:01Z
CUDA error: out of memory I successfully installed vLLM in WSL2, when I was trying to run the sample code, I got error info like this: ``` from vllm import LLM, SamplingParams prompts = [ "Hello, my name is", "The president of the United States is", "The capital of France is", "The future of ...
The OPT-125M is very small and this cannot happen. While I cannot reproduce the exact error on my side, when you initialize the LLM class, can you try to add the following argument: `gpu_memory_utilization=0.80` or set the utilization to an even lower number? The default utilization upper bound is 0.90. Additionally...
[ { "body": "I successfully installed vLLM in WSL2, when I was trying to run the sample code, I got error info like this:\r\n\r\n```\r\nfrom vllm import LLM, SamplingParams\r\n\r\nprompts = [\r\n \"Hello, my name is\",\r\n \"The president of the United States is\",\r\n \"The capital of France is\",\r\n ...
9d27b09d12767de775a92d765e177a61f8477189
{ "head_commit": "bf2758da077bf54f7cf8452a432ca383e9fe4ae7", "head_commit_message": "[Fix] Do not pin memory when in WSL", "patch_to_review": "diff --git a/vllm/utils.py b/vllm/utils.py\nindex 85fe18778244..868bb9b30c0c 100644\n--- a/vllm/utils.py\n+++ b/vllm/utils.py\n@@ -1,4 +1,5 @@\n import enum\n+from platfor...
[ { "diff_hunk": "@@ -85,16 +89,21 @@ def allocate_cpu_cache(self) -> List[KVCache]:\n cpu_cache: List[KVCache] = []\n key_block_shape = self.get_key_block_shape()\n value_block_shape = self.get_value_block_shape()\n+ pin_memory = not in_wsl()\n+ if not pin_memory:\n+ ...
3f78ab03581840b46bb7429aaf0c31a80ba42911
diff --git a/vllm/utils.py b/vllm/utils.py index 85fe18778244..eb686b64eafb 100644 --- a/vllm/utils.py +++ b/vllm/utils.py @@ -1,4 +1,5 @@ import enum +from platform import uname import uuid import psutil @@ -36,3 +37,7 @@ def get_cpu_memory() -> int: def random_uuid() -> str: return str(uuid.uuid4().hex) ...
{ "difficulty": "low", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
vllm-project__vllm-145@6accbfd
vllm-project/vllm
Python
145
Add script for benchmarking serving throughput
This PR implements a script to benchmark the online & offline serving throughput. It uses Poisson process to synthesize the request arrival times and simulates the serving process with the simple FastAPI frontend. I think this closes #45
2023-06-10T20:05:41Z
Turn shareGPT data into a standard benchmark 1. Extract out the lengths of the conversation rounds, and maybe have that data directly available from github. 2. The current L-shape evaluation with binary search for throughput is hard to run and not scalable. We should find an easier way to benchmark the performance.
[ { "body": "1. Extract out the lengths of the conversation rounds, and maybe have that data directly available from github.\r\n2. The current L-shape evaluation with binary search for throughput is hard to run and not scalable. We should find an easier way to benchmark the performance.", "number": 45, "t...
da5ddcd544ac5ce6bc4f522af9cbdc315f94620e
{ "head_commit": "6accbfdfe2fa6e3bbe375591bf8a9df9ee4581f1", "head_commit_message": "Minor", "patch_to_review": "diff --git a/benchmarks/benchmark_async_llm_server.py b/benchmarks/benchmark_async_llm_server.py\nindex 4c6ed709c46c..3fbd832251a7 100644\n--- a/benchmarks/benchmark_async_llm_server.py\n+++ b/benchmar...
[ { "diff_hunk": "@@ -0,0 +1,238 @@\n+\"\"\"Benchmark online serving throughput.\n+\n+On the server side, run one of the following commands:\n+ (CacheFlow backend)\n+ python -m cacheflow.entrypoints.simple_fastapi_frontend \\\n+ --disable-log-requests --model <your_model>\n+\n+ (TGI backend)\n+ ...
5c1b852576bc068bc5c0f157438ea05e80de2d3e
diff --git a/benchmarks/benchmark_async_llm_server.py b/benchmarks/benchmark_async_llm_server.py index 4c6ed709c46c..3fbd832251a7 100644 --- a/benchmarks/benchmark_async_llm_server.py +++ b/benchmarks/benchmark_async_llm_server.py @@ -10,6 +10,7 @@ def main(args: argparse.Namespace): prompts = [f"Tell me a story w...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-3657@ef6ba21
Textualize/textual
Python
3,657
input restriction
Adds parameters to Input to limit input. `restrict` is a regex which must match the entire value. `type` is a semantic type. At the moment there is "text", "integer", and "number", but I would expect this to grow in the future. `max_length` restricts the maximum length. There was an unused `max_size` reactive tha...
2023-11-09T14:57:49Z
Limit Input characters We need a way for Inputs to limit the characters they allow. A classic use would be to have an Input that only allowed entering numbers. Have a look at the browser input and see how its done there. Please propose a solution here before attempting.
My two cents: HTML form inputs have a number of attributes that can be set. But this approach seems to be like the HTML version of *the one ring to rule them all*. I can just imagine the spaghetti code trying to implement all of the logic for that. In order to keep some concerns separate, I'd propose a number of high...
[ { "body": "We need a way for Inputs to limit the characters they allow.\n\nA classic use would be to have an Input that only allowed entering numbers.\n\nHave a look at the browser input and see how its done there. Please propose a solution here before attempting.", "number": 3508, "title": "Limit Input...
65bf94a54d24d38ab8afffc1f459fd07f07f56b6
{ "head_commit": "ef6ba212119bd8532644b2c114cc9d5bd19300d3", "head_commit_message": "add valid empty", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex f82cf3a40f..542e589eae 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http...
[ { "diff_hunk": "@@ -494,15 +556,51 @@ def insert_text_at_cursor(self, text: str) -> None:\n Args:\n text: New text to insert.\n \"\"\"\n+\n+ def check_allowed_character(value: str) -> bool:", "line": null, "original_line": 560, "original_start_line": null, "pat...
4ae679a45178b31d4257b01c02cf21a0e98886cd
diff --git a/CHANGELOG.md b/CHANGELOG.md index f82cf3a40f..542e589eae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - CSS error reporting will no longer provide links to the files in question https://github.com/Textualize/textual...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-3498@65c97c8
Textualize/textual
Python
3,498
Test flakiness investigation and attempted fixes ❄
Here are my theories and the corresponding changes for each of the flaky tests identified by Rodrigo here: https://github.com/Textualize/textual/issues/3484#issuecomment-1752739081. Work-in-progress, but feel free to comment/discuss the theories. ✅ = I think I've fixed it ### `test_schedule_reverse_animations`...
2023-10-10T13:08:48Z
Revisit flaky tests We have some flaky tests. It seems to be a handful that are particularly sensitive to timing. I suspect that the issue lies in the tests themselves, and there is some genuine issue there. Let's look at those tests and see if we can make them stable. `Tabs` still has active tab after cleared The doc...
Here's a survey of flaky tests on the 80-90 most recent CI failures, up to two months ago: - [ ] tests/test_animation.py::test_schedule_reverse_animations, line 160 [Example failing workflow](https://github.com/Textualize/textual/actions/runs/6186848599/job/16795390751) ``` FAILED tests/test_animation.py::test_s...
[ { "body": "We have some flaky tests. It seems to be a handful that are particularly sensitive to timing. I suspect that the issue lies in the tests themselves, and there is some genuine issue there. Let's look at those tests and see if we can make them stable.", "number": 3484, "title": "Revisit flaky t...
0104385fc1608deb649869ace4274d389970c3ad
{ "head_commit": "65c97c80eaef0575d23a96a44d3bdd4c895ec7f4", "head_commit_message": "Update src/textual/widgets/_tabs.py\n\nCo-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex ab2f483ff5..4bccd605b9 100644...
[ { "diff_hunk": "@@ -0,0 +1,66 @@\n+from __future__ import annotations\n+\n+from asyncio import Future, gather, wait\n+from typing import Any, Coroutine, Generator, Generic, TypeVar\n+\n+ReturnType = TypeVar(\"ReturnType\")\n+\n+\n+class AwaitComplete(Generic[ReturnType]):\n+ \"\"\"An 'optionally-awaitable' o...
c238dac5778bfbf757a5e07bc7b6ba45cbb33320
diff --git a/CHANGELOG.md b/CHANGELOG.md index ab2f483ff5..11d7609502 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +- Fixed `Input.cursor_blink` reactive not changing blink state after `Input` was mounted https://git...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Test Suite / CI Enhancements" }
Textualize__textual-3443@ab4da8e
Textualize/textual
Python
3,443
Data table cell padding
**Please review the following checklist.** - [x] Docstrings on all new or modified functions / classes - [x] Updated documentation - [x] Updated CHANGELOG.md (where appropriate) This fixes #3435.
2023-10-02T15:59:01Z
Add ability to remove cell padding I haven't been able to modify the style of a DataTable so that there is zero space between the columns. This in contrast to the rows, which are stacked with zero space between the cells. I've tried setting `margin`, `grid-gutter` and `padding` to zero in the TCSS file, with no suc...
We found the following entries in the [FAQ](https://textual.textualize.io/FAQ/) which you may find helpful: - [How do I center a widget in a screen?](https://textual.textualize.io/FAQ/#how-do-i-center-a-widget-in-a-screen) - [Why doesn't Textual look good on macOS?](https://textual.textualize.io/FAQ/#why-doesn't-text...
[ { "body": "I haven't been able to modify the style of a DataTable so that there is zero space between the columns. This in contrast to the rows, which are stacked with zero space between the cells. \r\n\r\nI've tried setting `margin`, `grid-gutter` and `padding` to zero in the TCSS file, with no success: \r\n\r...
efd00ded117396d5c5f680728516a3db70381962
{ "head_commit": "ab4da8e546c70c3fbb6c7b8480b04bd2e2075f6d", "head_commit_message": "Remove magical constant from tests.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b63f1ca8a7..785164b4ae 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -16,6 +16,7 @@ and this project adheres to [Seman...
[ { "diff_hunk": "@@ -170,14 +171,18 @@ class Column:\n content_width: int = 0\n auto_width: bool = False\n \n- @property\n- def render_width(self) -> int:\n- \"\"\"Width in cells, required to render a column.\"\"\"\n- # +2 is to account for space padding either side of the cell\n- ...
1936f100910bdbeed8017259c46621df3e8667a8
diff --git a/CHANGELOG.md b/CHANGELOG.md index b63f1ca8a7..785164b4ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - `OutOfBounds` exception to be raised by `Pilot` https://github.com/Textualize/textual/pull/3360 +- R...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-3213@c3904e5
Textualize/textual
Python
3,213
DataTable new rows can have auto height.
Fixes #3122. Adds `auto_height` to `Row` to try and keep `Row` and `Column` as similar as possible, as per a conversation with @darrenburns. Temporarily sets the row height to 0 to signal the row height hasn't been computed yet (we can't set to `None` because we really need an `int` there for computations that run ...
2023-08-31T13:04:46Z
Auto expanding height You can set a height when you add a row to the DataTable, but there is currently no way to make it expand to fit the content. I think that `add_row` should grow an option to automatically calculate the optimal height of a row. If we make this the default, we should be able to explicitly over...
+1 this would be great to have. Rich's `Table` currently supports this behavior. This does actually work. These is a edge case with an auto height table, in an auto height container. The max height of the table is set to 100% which prevents the table from expanding. We need a workaround for that/
[ { "body": "You can set a height when you add a row to the DataTable, but there is currently no way to make it expand to fit the content.\r\n\r\nI think that `add_row` should grow an option to automatically calculate the optimal height of a row.\r\n\r\nIf we make this the default, we should be able to explicitly...
c63d8e05facfe94b404ec160ebe73f2c922400f4
{ "head_commit": "c3904e5c693cab73d759c6dbb1323d1a513aa3fc", "head_commit_message": "Test auto height computation in DataTable.add_row", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex c3c5ce003f..8939ba7d70 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -17,6 +17,7 @@ and this project adh...
[ { "diff_hunk": "@@ -1215,6 +1225,22 @@ def _update_dimensions(self, new_rows: Iterable[RowKey]) -> None:\n content_width = measure(console, renderable, 1)\n column.content_width = max(column.content_width, content_width)\n \n+ if row.auto_height:\n+ auto...
2524af4abd23bad1bcc0b6b47dd9db7666e89f7b
diff --git a/CHANGELOG.md b/CHANGELOG.md index 71c7d20a46..c5bd154128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Callbacks scheduled with `call_next` will now have the same prevented messages as when the callback was scheduled...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-3743@4fe0ecf
Textualize/textual
Python
3,743
Add Select.from_values class method for initializing with iterator
Added class method that can be used to create a Select control using an iterator. Method takes the same inputs as the constructor and has been tested to work with and without specifying parameters. Snapshot tests have been updated for this method, and all other tests passed. Fixes #3691. **Please review the ...
2023-11-23T19:40:19Z
Alternative method to initialise `Select` I propose we extend `Select.__init__` or create a classmethod `Select.from_values` to accept an iterable of `SelectType` and automatically build the labels by converting them to strings. I find that often we just want labels that are string representations of the values we w...
Can I work on this? I have done a quick prototype solution following the class method approach you suggested. Before I go forward with formalizing the prototype, I wanted to ask: is this preferrable to overloading the constructor? Hey @azinneck0485 thanks for your interest! I don't see any particular reason why yo...
[ { "body": "I propose we extend `Select.__init__` or create a classmethod `Select.from_values` to accept an iterable of `SelectType` and automatically build the labels by converting them to strings.\r\n\r\nI find that often we just want labels that are string representations of the values we want to select:\r\n\...
d04c8387ee0f09551288be0c46388a40e7960b2e
{ "head_commit": "4fe0ecf41621f57423686a35bcad1e5cc33ccf2c", "head_commit_message": "update changelog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 57123114f3..2969bc4ff3 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](htt...
[ { "diff_hunk": "@@ -278,6 +278,44 @@ def __init__(\n self._value: SelectType | None = value\n self._options = options\n \n+ @classmethod\n+ def from_values(\n+ cls,\n+ opts: [SelectType],", "line": null, "original_line": 284, "original_start_line": null, "path...
5a75777cbea34a60da026e7232b4b2a0dd2c6945
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b4c2ef6ca..a080ae1928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added support for Ctrl+Fn and Ctrl+Shift+Fn keys in urxvt https://github.com/Textualize/textual/pull/3737 - Fr...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "New Feature Additions" }
Textualize__textual-3202@f8250dd
Textualize/textual
Python
3,202
Add app return codes.
Fixes #3189. - [x] Docstrings on all new or modified functions / classes - [x] Updated documentation - [x] Updated CHANGELOG.md (where appropriate)
2023-08-29T13:50:17Z
Revise error codes We need a way for a Textual app to generate a return code that would be used as the process return code. - `App.return_code` should be 0 by default - `App.exit` should accept an optional return code which will set `App.return_code` - A fatal error should set a return code of 1. Textual apps ...
[ { "body": "We need a way for a Textual app to generate a return code that would be used as the process return code.\r\n\r\n- `App.return_code` should be 0 by default\r\n- `App.exit` should accept an optional return code which will set `App.return_code`\r\n- A fatal error should set a return code of 1. \r\n\r\nT...
c133152f58daa6872964ab9cceae77478cececb5
{ "head_commit": "f8250dd428a7cad7dc9f18a9e39579afbe92618d", "head_commit_message": "Add tests for app return code.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5c463bd7c8..9acc6bd380 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -10,6 +10,7 @@ and this project adheres to [Semantic V...
[ { "diff_hunk": "@@ -529,6 +532,25 @@ def return_value(self) -> ReturnType | None:\n \"\"\"\n return self._return_value\n \n+ @property\n+ def return_code(self) -> int:", "line": null, "original_line": 536, "original_start_line": null, "path": "src/textual/app.py", "star...
ecd7c93a0370270afd55ca398dbe791a8d6471cf
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c463bd7c8..9acc6bd380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - TCSS styles `layer` and `layers` can be strings https://github.com/Textualize/textual/pull/3169 +- `...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-3360@8aab7c2
Textualize/textual
Python
3,360
Pilot.click/hover methods restricted to the visible area
This fixes #3349. The two methods now raise an `OutOfBounds` error if the click/hover offset target is outside of the visible screen and it returns a Boolean that determines whether the click/hover hit the correct widget or not.
2023-09-20T16:42:54Z
Restrict Pilot.click to visible area I suspect that `Pilot.click` will allow clicking of widgets that may not be in the visible area of the screen. Since we are simulating a real user operating the mouse, we should make that not work. Probably by throwing an exception. It also looks like it is possible to supply an `...
(Not sure why it shows my face in the first comment; that was written by Will.) `Pilot.click` already has a note saying that the click _may_ not land on the widget if it is not visible or covered by other widget(s). Same thing for `Pilot.hover`. The app below shows an example of a click that doesn't land on the wid...
[ { "body": "I suspect that `Pilot.click` will allow clicking of widgets that may not be in the visible area of the screen.\n\nSince we are simulating a real user operating the mouse, we should make that not work. Probably by throwing an exception.\n\nIt also looks like it is possible to supply an `offset` that w...
819880124242e88019e59668b6bb84ffe97f3694
{ "head_commit": "8aab7c2520d01c25304b55238b6f4c9bbb61d67d", "head_commit_message": "Speed up tests a bit.\n\nTurning off the animation will make the scrolling slightly snappier.", "patch_to_review": "diff --git a/src/textual/pilot.py b/src/textual/pilot.py\nindex c3c64d2e9a..75949343ac 100644\n--- a/src/textual/...
[ { "diff_hunk": "@@ -104,21 +112,41 @@ async def click(\n else:\n target_widget = screen\n \n+ if not target_widget.size.contains(*offset):\n+ raise OutOfBounds(\n+ f\"Target size is {target_widget.size}, click offset is {offset}.\"\n+ )\n+\n ...
7d1142269761f3a41813b46b2d9421c81167c549
diff --git a/CHANGELOG.md b/CHANGELOG.md index c401104de1..330dac5bf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `Pilot.click`/`Pilot.hover` can't use `Screen` as a selector https://github.com/Textualize/textual/issues/3395...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-3152@a62302c
Textualize/textual
Python
3,152
Allow enabling/disabling tab via tab pane.
This fixes #3149.
2023-08-23T11:12:29Z
The `disabled` parameter for a `TabPane` should disable a tab Consider this code: ```python from textual.app import App, ComposeResult from textual.widgets import TabbedContent, TabPane, Label class DisableTabApp(App[None]): def compose(self) -> ComposeResult: with TabbedContent(id="top-level"):...
[ { "body": "Consider this code:\r\n\r\n```python\r\nfrom textual.app import App, ComposeResult\r\nfrom textual.widgets import TabbedContent, TabPane, Label\r\n\r\nclass DisableTabApp(App[None]):\r\n\r\n def compose(self) -> ComposeResult:\r\n with TabbedContent(id=\"top-level\"):\r\n with Ta...
695e59bd3a08e901e5ad2c63ce09cd9c5307f6fc
{ "head_commit": "a62302cf86e07524164aef52816a867763b2d6f9", "head_commit_message": "Tests/changelog.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 2b2517c9de..e422433b21 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -5,6 +5,12 @@ All notable changes to this project will be documented...
[ { "diff_hunk": "@@ -49,6 +51,38 @@ class TabPane(Widget):\n }\n \"\"\"\n \n+ @dataclass\n+ class Disabled(Message):\n+ \"\"\"Sent when a tab pane is disabled via its reactive `disabled`.\"\"\"\n+\n+ tab_pane: TabPane\n+ \"\"\"The `TabPane` that was disabled.\"\"\"\n+\n+ ...
9ef644cd77444fe88454d01dafd6fe203071ad0e
diff --git a/CHANGELOG.md b/CHANGELOG.md index f30d0dc336..6626a0b4cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Added + +- Ability to enable/disable tabs via the reactive `disabled` in tab panes https://git...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-3150@32007d7
Textualize/textual
Python
3,150
Allow modifying tabs in nested contexts
This fixes #3145 as far as not being able to manipulate tabs in nested contexts goes.
2023-08-23T09:59:05Z
TooManyMatches error with nested TabbedContent I'm running 0.34 - was actually really looking forward to the ability to hide and show tabs programmatically, fortuitous timing for the thing I'm working on. However, I've run into a number of issues that I think are all inter-related, potentially due to some nested ele...
Good spot. The code that is enabling/disabling and showing/hiding the tabs is using `query_one` when it should be using `get_child_by_type` or `get_child_by_id`. Hey @klott, sorry for the mess. I distinctly remember thinking about the need to handle nested tabs but looks like I didn't do it... Let me fix this for you. ...
[ { "body": "I'm running 0.34 - was actually really looking forward to the ability to hide and show tabs programmatically, fortuitous timing for the thing I'm working on.\r\n\r\nHowever, I've run into a number of issues that I think are all inter-related, potentially due to some nested elements on the DOM having ...
f3c24db18de2cf3572c5ce17cf30dcb1ac4f5958
{ "head_commit": "32007d78a2c1603d865b27f6a2c10f6a2e8a9f21", "head_commit_message": "Changelog.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 2b2517c9de..f30d0dc336 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -5,6 +5,12 @@ All notable changes to this project will be documented in th...
[ { "diff_hunk": "@@ -696,3 +696,63 @@ def compose(self) -> ComposeResult:\n tabbed_content.show_tab(tab_id)\n await pilot.pause()\n assert tabbed_content.active == tab_id\n+\n+\n+async def test_disabling_nested_tabs():\n+ \"\"\"Regression test for https://github.com/Textualize/textual/...
22b63f671755cec06fd7b49288688a4c9301a6d7
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b2517c9de..f30d0dc336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versionin...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-3199@c63072f
Textualize/textual
Python
3,199
Add title and sub-title to screens.
Mimicking 'App', we provide class variables TITLE and SUB_TITLE for the screen defaults and those can then be changed via the title and sub_title reactive attributes. Related issue: #3195
2023-08-29T11:05:25Z
Screens should have a title and subtitle When implementing a multi-screen application that has Header widgets in the screens the title and subtitle displayed in the Header should be stored in the Screen as overrides instead of only using the global values from the application. This would simplify displaying titles i...
Should be easy to implement. Screen would have `title` and `subtitle`, which would override the App attributes if not None. We would need to manage titles when the active screen changes.
[ { "body": "When implementing a multi-screen application that has Header widgets in the screens the title and subtitle displayed in the Header should be stored in the Screen as overrides instead of only using the global values from the application.\r\n\r\nThis would simplify displaying titles in screens properly...
60d5005a6830ae0c3f2046171f3489a3a7ddcb2d
{ "head_commit": "c63072f5bd364550a93e4dade9b0c3e272102a2b", "head_commit_message": "Link App (sub-)title to Screen respectives.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5c463bd7c8..31ef2bbd57 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -10,6 +10,11 @@ and this project adheres ...
[ { "diff_hunk": "@@ -161,11 +161,19 @@ def _on_click(self):\n self.toggle_class(\"-tall\")\n \n def _on_mount(self, _: Mount) -> None:\n- def set_title(title: str) -> None:\n+ def set_title() -> None:\n+ screen_title = self.screen.title", "line": null, "original_line"...
5a15e9c8aafa1e510170e173590ae335fba40549
diff --git a/CHANGELOG.md b/CHANGELOG.md index e824df982c..2fc2e57483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Added + +- Screen-specific (sub-)title attributes https://github.com/Textualize/textual/pull/...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-3193@b427a8a
Textualize/textual
Python
3,193
Customisable input validation (& validation on blur events)
Fixes #3100.
2023-08-28T14:49:35Z
Validation on blur Currently validation is done on input change and submit. I think we also need to do it on blur. Consider a password check. I find it super irritating when validation shows an error before I'm done typing. It should probably also be configrable. So the dev can decide when the validation happens.
[ { "body": "Currently validation is done on input change and submit. I think we also need to do it on blur.\n\nConsider a password check. I find it super irritating when validation shows an error before I'm done typing.\n\nIt should probably also be configrable. So the dev can decide when the validation happens....
7d4a47b2535f4836d1251e9d06aed23cb3fd05b9
{ "head_commit": "b427a8a41a60030c76bf97eb1714555fcdfa79a3", "head_commit_message": "Update CHANGELOG.md", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex dcf85b86bd..a1169c0914 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](...
[ { "diff_hunk": "@@ -221,6 +221,7 @@ def __init__(\n *,\n suggester: Suggester | None = None,\n validators: Validator | Iterable[Validator] | None = None,\n+ prevent_validation_on: Iterable[type[Message]] | None = None,", "line": null, "original_line": 224, "original_st...
d39c0c3a89edd6f4b2495add086793d319bfb67d
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8666691fde..35e4c63efa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added +- `Input` is now validated when focus moves out of it https://github.com/Textualize/textual/pull/3193 ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-3112@d5d8e81
Textualize/textual
Python
3,112
Tab hide disable
This fixes #3088. Adds API to enable/disable/show/hide tabs. - A `Tab` widget can be disabled directly via the reactive `.disabled`, which then fires a `Tab.Disabled` message, which is turned into a `Tabs.Disabled` message. - Preferably, and in line with the show/hide API, one can use the methods on `Tabs` or `T...
2023-08-17T15:36:36Z
Add the ability to hide and disable tabs This one comes up from time to time and we should probably add it. This will affect both `Tabs` and `TabbedContent`. The ability to either: - Disable a tab (so it's still visible but the tab shows disabled and, if you can select it at all, the content (in the case of `TabbedC...
[ { "body": "This one comes up from time to time and we should probably add it. This will affect both `Tabs` and `TabbedContent`. The ability to either:\r\n\r\n- Disable a tab (so it's still visible but the tab shows disabled and, if you can select it at all, the content (in the case of `TabbedContent`) of the pa...
eccb6e53f93424ab0503720d5522384f852f8d87
{ "head_commit": "d5d8e812077e32c3e225208fca372e49553f3377", "head_commit_message": "Add more tests for tab enabling/disabling/showing/hiding.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 4911c22c1c..cdd4b7f829 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -7,6 +7,15 @@ and this proj...
[ { "diff_hunk": "@@ -104,17 +105,35 @@ class Tab(Static):\n Tab.-active:hover {\n color: $text;\n }\n+ Tab:disabled {\n+ color: $text-disabled;\n+ text-opacity: 50%;\n+ }\n+ Tab.-hidden {\n+ display: none;\n+ }\n \"\"\"\n \n+ @dataclass\n class Clicked(...
fa8f893a967ccc21f99b0343e894c3b0e052007b
diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b3e225c8..0856eca6c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased -- Fixed `page_up` and `page_down` bug in `DataTable` when `show_header = False` https://github.co...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
wagtail__wagtail-12141@0e6fdad
wagtail/wagtail
Python
12,141
Retain fields parameter when redirecting from find_view of API
Fixes #6577 I know there must be prettier ways to accomplish this but I'm not entirely familiar with what tools there are in Wagtail to construct URLs so here's a starting point.
2024-07-19T13:16:44Z
Keep queries other than html_path in /api/v2/pages/find/ ### Is your proposal related to a problem? In wagtail API, I often just want the specific field of the found page by `/pages/find/`. but `/pages/find/?html_path=/&fields=_,id` will unfortunately redirect to `/pages/:id/` and fields query disappeared. ### De...
[ { "body": "### Is your proposal related to a problem?\r\n\r\nIn wagtail API, I often just want the specific field of the found page by `/pages/find/`. but `/pages/find/?html_path=/&fields=_,id` will unfortunately redirect to `/pages/:id/` and fields query disappeared.\r\n\r\n### Describe the solution you'd like...
555e2e4e800d01200d95d59ebe5dd96b0f43ffa2
{ "head_commit": "0e6fdad480faebe1ebacc6ba528538638a082dc3", "head_commit_message": "Retain fields parameter when redirecting from find_view of API", "patch_to_review": "diff --git a/wagtail/api/v2/tests/test_pages.py b/wagtail/api/v2/tests/test_pages.py\nindex 06a4e1bcdeb6..5a803a72bcd3 100644\n--- a/wagtail/api...
[ { "diff_hunk": "@@ -113,6 +113,9 @@ def find_view(self, request):\n )\n )\n \n+ if \"fields\" in request.GET:\n+ url = url + \"?fields=\" + request.GET[\"fields\"]", "line": null, "original_line": 117, "original_start_line": 116, "path": "wagtail/api...
0982c9745bf44b466056f30218b8b3e8e481b624
diff --git a/wagtail/api/v2/tests/test_pages.py b/wagtail/api/v2/tests/test_pages.py index 06a4e1bcdeb6..91c3008a7991 100644 --- a/wagtail/api/v2/tests/test_pages.py +++ b/wagtail/api/v2/tests/test_pages.py @@ -1781,6 +1781,19 @@ def test_find_by_html_path_with_start_and_end_slashes_removed(self): fetch_re...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-2971@528d0c8
Textualize/textual
Python
2,971
capture print
Fixes https://github.com/Textualize/textual/issues/2952 Implements a mechanism to capture prints (or writes to stdout / stderr).
2023-07-19T10:41:21Z
Capture prints At the moment we capture the output of any `print` statements, so as not to write over the Textual app. Anything printed will go to the dev tools if enabled, or dev/null if not. This is a sensible default, but sometimes devs want to be able to capture that content and write it to a widget (for example)...
[ { "body": "At the moment we capture the output of any `print` statements, so as not to write over the Textual app. Anything printed will go to the dev tools if enabled, or dev/null if not.\n\nThis is a sensible default, but sometimes devs want to be able to capture that content and write it to a widget (for exa...
2f055f6234928a37207759bc48876965905dc966
{ "head_commit": "528d0c82eebec583995ac57d0fbfab58d2812392", "head_commit_message": "docstring", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex abec9fa6d4..db92053027 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -5,6 +5,12 @@ All notable changes to this project will be documented in thi...
[ { "diff_hunk": "@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.\n The format is based on [Keep a Changelog](http://keepachangelog.com/)\n and this project adheres to [Semantic Versioning](http://semver.org/).\n \n+## Unreleased\n+\n+### Added\n+\n+- Added App.capture_print,...
4a6581c706d2f09d55cc64a39357a85a33d1fa92
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d9b2b2171..0651ef98b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioni...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-2758@6f31380
Textualize/textual
Python
2,758
Fix win sleep bug
Fixes #2711
2023-06-09T13:46:25Z
On Windows `set_interval` blocks a full exit of the application until the next interval fires Take this code as an example: ```python from textual.app import App, ComposeResult from textual.containers import Center from textual.reactive import var from textual.widgets import Label class WindowsInt...
We need to implement a cancelable timer on Windows. Talk to @willmcgugan before attempting this.
[ { "body": "Take this code as an example:\r\n\r\n```python\r\nfrom textual.app import App, ComposeResult\r\nfrom textual.containers import Center\r\nfrom textual.reactive import var\r\nfrom textual.widgets import Label\r\n\r\nclass WindowsIntervalBugApp( App[ None ] ):\r\n\r\n CSS = \"\"\"\r\n ...
6deb97af9ee73899d5ff4e545ec3f1680bcce55c
{ "head_commit": "6f31380bd92905b141740dc3746ad4bf3e7542eb", "head_commit_message": "Implement cancellable Windows sleep.\n\nRelated issues: #2711.", "patch_to_review": "diff --git a/src/textual/_time.py b/src/textual/_time.py\nindex 7e24cef109..985744f2ff 100644\n--- a/src/textual/_time.py\n+++ b/src/textual/_ti...
[ { "diff_hunk": "@@ -37,32 +49,62 @@ def sleep(secs: float) -> None:\n sleep_for = max(0, secs - 0.001)\n if sleep_for < 0.0005:\n # Less than 0.5ms and its not worth doing the sleep\n- return\n+ return time_sleep_coro(0)", "line": null, "original_line": ...
d47a126847919ee41a4ef29c431fc05eb00350fe
diff --git a/src/textual/_time.py b/src/textual/_time.py index 7e24cef109..fea8a569ed 100644 --- a/src/textual/_time.py +++ b/src/textual/_time.py @@ -1,5 +1,5 @@ +import asyncio import platform -from asyncio import get_running_loop from asyncio import sleep as asyncio_sleep from time import monotonic, perf_counter ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
Textualize__textual-2746@a50d3a8
Textualize/textual
Python
2,746
on super class
@on decorator now matches base classes. Solution is much the same as https://github.com/Textualize/textual/pull/2691 with optimizations.
2023-06-06T14:09:09Z
Consider the idea of having the `@on` message handler capture and fire on base messages Noting this as a reminder about a conversation for later consideration. Right now the `@on` decorator only fires on a specific message type. So imagine having this sort of message hierarchy: ```python class PersonChanged(Mess...
Contrary to what I said recently, I think it probably should work this way. Reminder to self that #2453 is the place to look for the original implementation PR. My current thinking on how this would work would be something [like this](https://github.com/davep/textual/commit/283a8b65299e47d92e417047dde5fb8e9e543e29?diff...
[ { "body": "Noting this as a reminder about a conversation for later consideration.\r\n\r\nRight now the `@on` decorator only fires on a specific message type. So imagine having this sort of message hierarchy:\r\n\r\n```python\r\nclass PersonChanged(Message):\r\n ...\r\n\r\nclass PersonAdded(PersonChanged):\r...
755da5e969b750fe046ffda243b594ee6495e16d
{ "head_commit": "a50d3a860dfb89648bc997b158508c77e1fad9b7", "head_commit_message": "changelog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 2ec3b84329..be0a64cd1d 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](http://se...
[ { "diff_hunk": "@@ -143,3 +147,215 @@ def two(self) -> None:\n await pilot.press(\"tab\", \"right\", \"right\")\n \n assert log == [\"one\", \"two\"]\n+\n+\n+class MessageSender(Widget):\n+ @dataclass\n+ class Parent(Message):\n+ sender: MessageSender\n+\n+ @property\n+ de...
df1056e274aeab2ac25c8f6b9865954e8df0188a
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ec3b84329..be0a64cd1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed setting `TreeNode.label` on an existing `Tree` node not immediately https://github.com/Textualize/textual/...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-3002@00b0a63
Textualize/textual
Python
3,002
Fix a crash when setting `DirectoryTree.show_root` before DOM is ready
Fixes #2363. Because labels can sometimes be needed by the tree before the DOM is ready, this changes `DirectoryTree.render_label` so that it only attempts to *style* the labels if the DOM is up and running.
2023-07-24T13:15:10Z
Setting `show_root` to `True` raises a `KeyError` ```py def compose(self): dir_tree = DirectoryTree("./src/routes") dir_tree.show_root = True yield Header() with Horizontal(): yield Logo() with TabbedContent("Config", "Routes", "Server"): ...
To narrow it down a wee but, this only happens if `show_root` is changed before the DOM is fully-loaded (for example, doing the same in `on_mount` is fine). Looks like `watch_show_root` is a bit too eager.
[ { "body": "```py\r\n def compose(self):\r\n dir_tree = DirectoryTree(\"./src/routes\")\r\n dir_tree.show_root = True\r\n yield Header()\r\n with Horizontal():\r\n yield Logo()\r\n with TabbedContent(\"Config\", \"Routes\", \"Server\"):\r\n yiel...
baee05a4392ad4e78935222d9f0d2a24192b1b6b
{ "head_commit": "00b0a631b4d79c730d2f4eb8340e4e9a15f3b8e7", "head_commit_message": "Update PR.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 3e1da5c856..a21ba6316d 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://se...
[ { "diff_hunk": "@@ -297,25 +297,29 @@ def render_label(\n \n if node._allow_expand:\n prefix = (\"📂 \" if node.is_expanded else \"📁 \", base_style + TOGGLE_STYLE)\n- node_label.stylize_before(\n- self.get_component_rich_style(\"directory-tree--folder\", partial=Tr...
2a3edb10c3ed82b73d821fd9a07bcc545f335e14
diff --git a/CHANGELOG.md b/CHANGELOG.md index 50dc3f19e5..3a6040bb62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Parameter `animate` from `DataTable.move_cursor` was being ignored https://github.com/Textualize/tex...
{ "difficulty": "medium", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
Textualize__textual-2751@146b1b8
Textualize/textual
Python
2,751
Update `TabbedContent` with methods to add, remove and clear tabs/panes
This PR extends `TabbedContent` with some new methods, and also adds a new message. The new methods are: - `add_pane` to add a new `TabPane` to the widget - `remove_pane` to remove an existing `TabPane` from the widget - `clear_panes` to remove all existing panes from the widget - `tab_count` (okay, actually a pr...
2023-06-07T11:46:19Z
Add the ability to add tabs to TabbedContent This has come up multiple times now. There should probably be a way to change the tabs in TabbedContent after it has been mounted. The ability to add more tabs has been a common request. Removal would make sense too.
[ { "body": "This has come up multiple times now. There should probably be a way to change the tabs in TabbedContent after it has been mounted. \n\nThe ability to add more tabs has been a common request. Removal would make sense too.", "number": 2710, "title": "Add the ability to add tabs to TabbedContent...
78bfb5a685da38e04695e981dc13c66d4160b016
{ "head_commit": "146b1b8e4ce694b8fed97ef8ba51c4f6c086cb61", "head_commit_message": "Update the ChangeLog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 2604e7c19c..bb0e50471e 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning...
[ { "diff_hunk": "@@ -70,6 +73,26 @@ def __init__(\n )\n \n \n+class AwaitTabbedContent:\n+ \"\"\"An awaitable return by [`TabbedContent`][textual.widgets.TabbedContent] methods that modify the tabs.\"\"\"\n+\n+ def __init__(self, *awaitables: AwaitMount | AwaitRemove) -> None:\n+ \"\"\"Initi...
832208ba838f7f9b1140f4610f4ccf96dbd37087
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2604e7c19c..bb0e50471e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Class variable `CSS` to screens https://github.com/Textualize/textual/issues/2137 - Class variable `CSS_PATH` t...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
wagtail__wagtail-8221@aa2bdef
wagtail/wagtail
Python
8,221
Adds type attributes for some buttons.
Fixes #8213 adding `type=button` to buttons that were previously missing it. I didn't see a reason for `submit` on any of them.
2022-03-26T17:24:54Z
Missing type attribute for <button> elements ### Issue Summary This is a report from experimental automated tests which I have only partly confirmed. There are a number of `<button>` elements in our templates which are missing a `type` attribute to indicate the button’s type – either `button` or `submit`. This at...
@0saurabh0 sorry, this is already being worked on by @jessemenn 😕.
[ { "body": "### Issue Summary\r\n\r\nThis is a report from experimental automated tests which I have only partly confirmed.\r\n\r\nThere are a number of `<button>` elements in our templates which are missing a `type` attribute to indicate the button’s type – either `button` or `submit`. This attribute is optiona...
e726c5004fb7003641ac8b76ba9713a1cc82fb2a
{ "head_commit": "aa2bdefc0ec2044f6e82101607968916c19da0d8", "head_commit_message": "Adds type attributes for some buttons.", "patch_to_review": "diff --git a/wagtail/admin/templates/wagtailadmin/account/settings_panels/avatar.html b/wagtail/admin/templates/wagtailadmin/account/settings_panels/avatar.html\nindex ...
[ { "diff_hunk": "@@ -97,7 +97,7 @@ <h1>\n {% include \"wagtailadmin/shared/field_as_li.html\" with field=field field_classes=\"field-small\" li_classes=\"col4\" %}\n {% endfor %}\n <li class=\"submit col2\">\n- ...
980c51192d507ce1459ca6d54e8f2ab6d8aaa10b
diff --git a/wagtail/admin/templates/wagtailadmin/account/settings_panels/avatar.html b/wagtail/admin/templates/wagtailadmin/account/settings_panels/avatar.html index 15f4a85c5f78..30fb5367a64e 100644 --- a/wagtail/admin/templates/wagtailadmin/account/settings_panels/avatar.html +++ b/wagtail/admin/templates/wagtailadm...
{ "difficulty": "low", "estimated_review_effort": 1, "problem_domain": "Code Refactoring / Architectural Improvement" }
Textualize__textual-2988@5a9e339
Textualize/textual
Python
2,988
method for reloading single node of DirectoryTree
**Please review the following checklist.** - [x] Docstrings on all new or modified functions / classes - [ ] Updated documentation - [x] Updated CHANGELOG.md (where appropriate) New method `DirectoryTree.reload_node` allows reloading the content of a single directory. fixes #2757
2023-07-22T14:45:25Z
Add a method to `DirectoryTree` that allows for reloading an individual node The question cropped up on Discord and seems like a useful thing to have: the ability to say "clear out and reload this specific node" when using `DirectoryTree` -- a developer may know that a specific directory has been modified and they want...
(This issue is reserved for the [EuroPython 2023 sprint](https://ep2023.europython.eu/sprints). If you are not participating in the sprint, please refrain from working on this issue. Thanks!) The [`DirectoryTree` widget](https://textual.textualize.io/widgets/directory_tree/) loads its directory upon instantiation an...
[ { "body": "The question cropped up on Discord and seems like a useful thing to have: the ability to say \"clear out and reload this specific node\" when using `DirectoryTree` -- a developer may know that a specific directory has been modified and they want to refresh the content.", "number": 2757, "titl...
be2ec1daaf1d5c7ce0c8dc3bebcee664ab62bc15
{ "head_commit": "5a9e3396c98553ba03775a68a305495894fcd6f9", "head_commit_message": "method for reloading single node of DirectoryTree", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex ec1c24b51b..c31d93afde 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -12,6 +12,7 @@ and this project adh...
[ { "diff_hunk": "", "line": null, "original_line": null, "original_start_line": null, "path": "tests/tree/test_directory_tree_reload_node.py", "start_line": null, "text": "@user1:\nThis test looks great!\r\n\r\nI'm just going to ask if we can avoid writing inside the files after creating ...
9a343a6bd7ea7b38c5e5c8c72ffdcd2d52fdfed4
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5535d3101c..b9078861cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added an interface for replacing prompt of an individual option in an `OptionList` https://github.co...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-2652@6d82d7a
Textualize/textual
Python
2,652
Add `SelectionList`
The `SelectionList` is a child of `OptionList`, combining the look and feel of `CheckBox`, but done as a single widget. It is, in effect, to `CheckBox` what `RadioSet` is to `RadioButton`, but done in a way that is as lightweight as possible. Here it is in action: https://github.com/Textualize/textual/assets/28237/2...
2023-05-25T09:17:00Z
Create a RadioSet-like interface for checkbox groups When using checkboxes in forms, they often appear in groups. I want to be able to say, “given this CheckboxSet, which options are currently active?” Right now, to find this out, we'd have to do some DOM querying and it doesn't feel very ergonomic to work with. Radi...
On further discussion, it may not even be a CheckboxSet we need. The problem is: we need a way of selecting multiple items from a list. The solution: 🤷 An extension to OptionList feels like it would cover that use case. See also #2518. I have a widget like that...but it's based on RadioSet rather than OptionList (and...
[ { "body": "When using checkboxes in forms, they often appear in groups. I want to be able to say, “given this CheckboxSet, which options are currently active?”\n\nRight now, to find this out, we'd have to do some DOM querying and it doesn't feel very ergonomic to work with.\n\nRadioSet has a nice interface, whe...
20d19d977df18d3e9b85221c4dabf6f670389074
{ "head_commit": "6d82d7a1db52652ebea25b05ef27dfcd0506157c", "head_commit_message": "Fix a typo\n\nCo-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex f43453c25e..99a46540b3 100644\n--- a/CHANGELOG.md\n+++...
[ { "diff_hunk": "@@ -0,0 +1,171 @@\n+# SelectionList\n+\n+!!! tip \"Added in version 0.27.0\"\n+\n+A widget for showing a vertical list of selectable options.\n+\n+- [x] Focusable\n+- [ ] Container\n+\n+## Typing\n+\n+The `SelectionList` control is a\n+[`Generic`](https://docs.python.org/3/library/typing.html#ty...
400043dda19bb9962f3c870c94e573d9cb10a9da
diff --git a/CHANGELOG.md b/CHANGELOG.md index c467e55012..0676b51aa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - `work` decorator accepts `description` parameter to add debug string https://github.com/Textualize/t...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
wagtail__wagtail-7023@ed32b34
wagtail/wagtail
Python
7,023
Wagtail API pages endpoint to respond with a 400 error (instead of 500 error) when entering an invalid value to a filter
Hello, I think Wagtail API pages endpoint responds with a 500 error when entering an invalid value to a filter because no check is made on models.ForeignKey [here](https://github.com/wagtail/wagtail/blob/42ddd8ad554f02e9761f1a36f45e162d3edfa7c1/wagtail/api/v2/filters.py#L37). I added models.ForeignKey and it seems t...
2021-04-18T13:53:26Z
Wagtail API pages endpoint responds with a 500 error when entering an invalid value to a filter ### Issue Summary When querying the Wagtail API and using filters, invalid filter values cause the server to respond with a 500 error. Given a `BlogPage` with an `author` ForeignKey. e.g. `/api/v2/pages/?type=blog.B...
[ { "body": "### Issue Summary\r\n\r\nWhen querying the Wagtail API and using filters, invalid filter values cause the server to respond with a 500 error.\r\n\r\nGiven a `BlogPage` with an `author` ForeignKey.\r\n\r\ne.g. `/api/v2/pages/?type=blog.BlogPage&author=a`\r\n\r\nThis returns a 500 error.\r\n\r\n### Ste...
b48c6dab58460d04684ce4f2934f851fe4b98ac5
{ "head_commit": "ed32b340b5b7ded50300d2afdc9709e644db8d34", "head_commit_message": "Remove extra whitespaces to comply with styleguide", "patch_to_review": "diff --git a/wagtail/api/v2/filters.py b/wagtail/api/v2/filters.py\nindex 996e486943dc..d4b361ec35bb 100644\n--- a/wagtail/api/v2/filters.py\n+++ b/wagtail/...
[ { "diff_hunk": "@@ -34,7 +34,7 @@ def filter_queryset(self, request, queryset, view):\n try:\n if isinstance(field, (models.BooleanField, models.NullBooleanField)):\n value = parse_boolean(value)\n- elif isinstance(field, (models.Int...
7680a87faf6bc39f4533a1c40207cf673a78b4f7
diff --git a/wagtail/api/v2/filters.py b/wagtail/api/v2/filters.py index 996e486943dc..61aeb8204e91 100644 --- a/wagtail/api/v2/filters.py +++ b/wagtail/api/v2/filters.py @@ -36,6 +36,8 @@ def filter_queryset(self, request, queryset, view): value = parse_boolean(value) elif...
{ "difficulty": "medium", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
wagtail__wagtail-7069@efc4639
wagtail/wagtail
Python
7,069
Redirect to parent page when a child page is deleted from its listing view
Fixes #6527 Do the tests still pass? Yes Does the code comply with the style guide? Yes For Python changes: Have you added tests to cover the new/fixed behaviour? No, I'm not really sure how to test it since it involves the frontend.
2021-04-21T20:56:13Z
Delete page in admin and get 404 ### Issue Summary When I delete the root page (a new project) I get a 404 in admin as after a delete Wagtail tries to go back to that page. ### Steps to Reproduce 1. start wagtail project 2. delete homepage that is made 3. get 404 page I would expect to back to the three...
Thanks for the report @onno-timmerman! I can confirm that I'm seeing the same when I initiate the deletion from http://localhost:8000/admin/pages/3/ (but not http://localhost:8000/admin/pages/). I think that this happens for all type of pages as long as we initiate the deletion from `/admin/pages/<page_id>/`. It's due ...
[ { "body": "### Issue Summary\r\nWhen I delete the root page (a new project) I get a 404 in admin as after a delete Wagtail tries to go back to that page.\r\n\r\n\r\n\r\n### Steps to Reproduce\r\n\r\n1. start wagtail project\r\n2. delete homepage that is made\r\n3. get 404 page\r\n\r\nI would expect to back to t...
06be13fda03bc062cceac2fe724a26237ed7ff8f
{ "head_commit": "efc4639fdfcd7217d5648026c7f089893cd34003", "head_commit_message": "Rename button to delete_button", "patch_to_review": "diff --git a/wagtail/admin/tests/pages/test_delete_page.py b/wagtail/admin/tests/pages/test_delete_page.py\nindex fc624b809ccd..2a7f5430cdc5 100644\n--- a/wagtail/admin/tests/p...
[ { "diff_hunk": "@@ -210,7 +210,9 @@ def page_listing_more_buttons(page, page_perms, is_parent=False, next_url=None):\n )\n if page_perms.can_delete():\n url = reverse('wagtailadmin_pages:delete', args=[page.id])\n- if next_url:\n+\n+ # After deleting the page, it is impossible ...
01a8c8ad27255afa2f777039c6d4f940d274549c
diff --git a/wagtail/admin/tests/test_buttons_hooks.py b/wagtail/admin/tests/test_buttons_hooks.py index e3c4f759204e..9c7421f65108 100644 --- a/wagtail/admin/tests/test_buttons_hooks.py +++ b/wagtail/admin/tests/test_buttons_hooks.py @@ -1,12 +1,31 @@ from django.test import TestCase from django.urls import reverse ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-2571@14be180
Textualize/textual
Python
2,571
Avoid docks when scrolling
Fixes https://github.com/Textualize/textual/issues/2525 When a widget had both scrolling content and docked widgets, two issues could occur. 1. You couldn't scroll to the end 2. scroll_to_region would scroll something to behind a dock This fixed both.
2023-05-15T14:34:29Z
Docking and scrolling interaction bug? Run the sample app below and tab through the checkboxes repeatedly until you get to the bottom. The focused checkbox will be hidden behind the footer. In fact, viewing the final checkbox at all appears to be impossible. It's obscured by the docked footer and cannot be scrolled in...
On reflection this is the desired behaviour. The very nature of `dock` is that it floats over things. Ultimately it is the parent which defines the scrollable area. If the Footer and checkboxes share the same parent then the footer will float over the docked area. Look what happens if I style the footer to have ...
[ { "body": "Run the sample app below and tab through the checkboxes repeatedly until you get to the bottom. The focused checkbox will be hidden behind the footer.\n\nIn fact, viewing the final checkbox at all appears to be impossible. It's obscured by the docked footer and cannot be scrolled into view.\n\nMy und...
6147c28dbf86c0d09a75b179b68fae1aeae1b26c
{ "head_commit": "14be180f88b6c34731330cd0cc63e9384e1c4636", "head_commit_message": "ofx docstring", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5991f818d6..a0d644982b 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -21,10 +21,12 @@ and this project adheres to [Semantic Versioning](http...
[ { "diff_hunk": "@@ -1095,3 +1095,9 @@ def grow_maximum(self, other: Spacing) -> Spacing:\n \n NULL_OFFSET: Final = Offset(0, 0)\n \"\"\"An [offset][textual.geometry.Offset] constant for (0, 0).\"\"\"\n+\n+NULL_REGION: Final = Region(0, 0, 0, 0)\n+\"\"\"A [Region][textual.geometryRegion] constant for a null regi...
1bc46cd2acb061e972ffa544dda9e649db967dd2
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5991f818d6..9b6b512b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,10 +21,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed `TreeNode.toggle` and `TreeNode.toggle_all` not posting a `Tree.NodeExpanded` or `Tree.NodeCollapsed` mes...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-2604@75606c8
Textualize/textual
Python
2,604
Input completion suggestions
Adds suggested completions to the `Input` - `Input` accepts a parameter `suggestions` with a list of suggestions that are shown while the user types. - `Input.suggestions` reactive can be used to change the possible suggestions for a given input. - `Input` has new component class `input--suggestion`. - Keybinding...
2023-05-18T12:42:29Z
Input auto-complete We need a way to suggest auto-complete for the Input widget. The auto-complete I'm thinking of is when you start typing and a the rest of the word or phrase appears in front of the cursor. Something like this: You hit `T` and the text `extualize` appears with a different style in front of the curs...
Usually with this kind of interface pressing the right arrow when the cursor is at the end accepts it. Pressing return won't work because it would be unclear whether the user is trying to submit input or accept the autocomplete. @darrenburns I do find that annoying. But return to accept the auto-complete seems to be co...
[ { "body": "We need a way to suggest auto-complete for the Input widget.\n\nThe auto-complete I'm thinking of is when you start typing and a the rest of the word or phrase appears in front of the cursor. Something like this:\n\nYou hit `T` and the text `extualize` appears with a different style in front of the c...
ea8c6039a9548c4a0d2968f0c4e9e587e1f82eff
{ "head_commit": "75606c8dfdec251e396f39ba70fca9b440892702", "head_commit_message": "Add explicit sleep.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 42bf44a47d..d702b2e246 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -6,6 +6,20 @@ The format is based on [Keep a Changelog](http://ke...
[ { "diff_hunk": "@@ -492,3 +531,23 @@ def action_delete_left_all(self) -> None:\n async def action_submit(self) -> None:\n \"\"\"Handle a submit action (normally the user hitting Enter in the input).\"\"\"\n self.post_message(self.Submitted(self, self.value))\n+\n+ def validate_suggestions...
baa1f712d8b335ed00ba2a22c79bb3803b268645
diff --git a/.coveragerc b/.coveragerc index 087a1674f7..11b69dc731 100644 --- a/.coveragerc +++ b/.coveragerc @@ -8,3 +8,4 @@ exclude_lines = if __name__ == "__main__": @overload __rich_repr__ + @abstractmethod diff --git a/CHANGELOG.md b/CHANGELOG.md index 0676b51aa4..90525c9ca4 100644 --- a/CHANGEL...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-2581@4b22234
Textualize/textual
Python
2,581
AUTO_FOCUS targets first focusable widget.
Fixes #2578.
2023-05-16T10:28:13Z
AUTO_FOCUS has no effect in most cases Testing with modal02.py in /docs/examples/guide/screens AUTO_FOCUS doesn't appear to work. Looking at the code, there doesn't appear to be any check that the thing being auto focused is actually focusable. Suspect it is trying to focus some unrelated widget.
@rodrigogiraoserrao one for you I think So we should go over the query results and focus the first thing that is matched by the query and that is focusable, right? That would be the idea? Exactly. AH _This_ was why `AUTO_FOCUS` didn't break tests before. Yeah, makes sense now. We could take the easy route of makin...
[ { "body": "Testing with modal02.py in /docs/examples/guide/screens AUTO_FOCUS doesn't appear to work.\n\nLooking at the code, there doesn't appear to be any check that the thing being auto focused is actually focusable. Suspect it is trying to focus some unrelated widget.", "number": 2578, "title": "AUT...
c12fa0e4da15b8005b504d71b73bb5d5cc716566
{ "head_commit": "4b22234b24fa7e4a0a069ac8e7e2ac6731b23306", "head_commit_message": "Merge branch 'main' into auto-focus-improv", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex bce29efdac..957c586e80 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -22,6 +22,7 @@ and this project adheres to...
[ { "diff_hunk": "@@ -666,15 +666,18 @@ def _on_screen_resume(self) -> None:\n \"\"\"Screen has resumed.\"\"\"\n self.stack_updates += 1\n size = self.app.size\n+ self._refresh_layout(size, full=True)\n+ self.refresh()\n if self.AUTO_FOCUS is not None and self.focused...
38f9500642c7076497a99a8c8c42d279407bbec3
diff --git a/CHANGELOG.md b/CHANGELOG.md index c35703853c..327997b90d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed `TreeNode.toggle` and `TreeNode.toggle_all` not posting a `Tree.NodeExpanded` or `Tree.NodeCollapsed` messa...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-2498@813a91a
Textualize/textual
Python
2,498
Extend `@on` decorator to filter matchable attributes
The decorator `@on` now accepts keyword arguments to provide selectors for attributes that the message has whitelisted in `ON_MATCHABLE_ATTRIBUTES`. This will close #2484.
2023-05-05T14:43:54Z
Extend decorator `on` to specify non-`control` attributes to match. By default, the decorator `on` accepts a selector that applies to the attribute `control` of the message. We want `on` to grow `**kwargs` so that we can specify arbitrary selectors for arbitrary attributes of the messages we handle. E.g., to hand...
[ { "body": "By default, the decorator `on` accepts a selector that applies to the attribute `control` of the message.\r\n\r\nWe want `on` to grow `**kwargs` so that we can specify arbitrary selectors for arbitrary attributes of the messages we handle.\r\n\r\nE.g., to handle the message `Tabs.TabActivated`, we ma...
dd7e76888719110e9a0a635b382f4daa2f391f39
{ "head_commit": "813a91a66fede455ed7b29e0d44a2d02e00620c1", "head_commit_message": "Remove example code.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 9b035dd4f6..4680f8ac0b 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning]...
[ { "diff_hunk": "@@ -32,6 +32,11 @@ class Message:\n \"_prevent\",\n ]\n \n+ ON_MATCHABLE_ATTRIBUTES: ClassVar[set[str]] = set()", "line": null, "original_line": 35, "original_start_line": null, "path": "src/textual/message.py", "start_line": null, "text": "@user1:\nI know ...
84ca7846eecad1e82d95e8d4bd0eb22cc1af5ad0
diff --git a/CHANGELOG.md b/CHANGELOG.md index fc8b457d85..b776f49513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added `always_update` as an optional argument for `reactive.var` - Made Binding description default to empty str...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-2540@634789a
Textualize/textual
Python
2,540
Implements screen modes
As it stands, the modes "work" but the API feels a bit rough. Discussion in the related issue: #2327 The app below lets you play with modes. Press <kbd>1</kbd> and <kbd>2</kbd> to switch between modes 1 and 2. Press <kbd>P</kbd> to push random fruit modals into the screen. Press <kbd>O</kbd> to pop a screen fr...
2023-05-10T15:07:43Z
Implement mode concept The `switch_screen` method doesn't fit with the stack of screens concept. It was introduced to provide switchable modes in an app, but doesn't quite capture that. I think what we need is a concept of "modes" where each mode has it's own independant stack of screens. The app can switch between th...
#2540 adds a possible implementation that follows your instructions to the letter. However, I suspect you might be thinking of things that aren't clear from the description alone. - For example, is the point of `add_mode` _just_ to add a new mode to the set of modes available? - Does each custom mode get a defau...
[ { "body": "The `switch_screen` method doesn't fit with the stack of screens concept.\n\nIt was introduced to provide switchable modes in an app, but doesn't quite capture that. I think what we need is a concept of \"modes\" where each mode has it's own independant stack of screens. The app can switch between th...
49e10802796cd522c9f371071d67e02e875c98d8
{ "head_commit": "634789ae938d2eab4897832997b5e15d50724fcd", "head_commit_message": "Add tests to screen modes.", "patch_to_review": "diff --git a/src/textual/app.py b/src/textual/app.py\nindex 12f66cf04f..8d162ef19e 100644\n--- a/src/textual/app.py\n+++ b/src/textual/app.py\n@@ -159,6 +159,22 @@ class ScreenStac...
[ { "diff_hunk": "@@ -1398,11 +1531,14 @@ def _replace_screen(self, screen: Screen) -> Screen:\n Returns:\n The screen that was replaced.\n \"\"\"\n- if self._screen_stack:\n+ if self._screen_stacks[self._current_mode]:\n self.screen.refresh()\n screen...
c64111bcb585b8c40eabf376be130fdeca984cdb
diff --git a/src/textual/app.py b/src/textual/app.py index d92c858dc1..6a44941f98 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -159,6 +159,38 @@ class ScreenStackError(ScreenError): """Raised when trying to manipulate the screen stack incorrectly.""" +class ModeError(Exception): + """Base cla...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-2329@bbde665
Textualize/textual
Python
2,329
Export types & doc improvements
This will close #2168 when it's done. I did a pass on the App API page and looked for types that are used in signatures and that aren't documented. This is the type of change I suggest. If everyone is ok with this type of changes, I will go over the remainder of the API pages. We still need to figure out how ...
2023-04-19T14:05:46Z
Document custom types used and actually show their definition I think we should document, perhaps in the API page, the custom types we use for things that are already documented. For example, `App.CSS_PATH` shows up in the docs and is typed as `CSSPathType`, and the type itself is pretty much all the documentation n...
I think the most straightforward solution would be to cover it in the docstrings. We do seem to be missing docstrings for `CSS_PATH`. So, to clarify, you are suggesting that the docstring for `CSS_PATH` mentions and links to `CSSPathType`, for example? Yeah, if we can't somehow expand the `CSSPathType` then we could ju...
[ { "body": "I think we should document, perhaps in the API page, the custom types we use for things that are already documented.\r\n\r\nFor example, `App.CSS_PATH` shows up in the docs and is typed as `CSSPathType`, and the type itself is pretty much all the documentation needed for `App.CSS_PATH`.\r\nHowever, `...
f1d70900cb41450df7f74328be1feb090ef96882
{ "head_commit": "bbde665452a510de84622bc98ecdd8b48839c232", "head_commit_message": "Export more linked types/errors/classes.", "patch_to_review": "diff --git a/docs/api/errors.md b/docs/api/errors.md\nnew file mode 100644\nindex 0000000000..5ee969dd88\n--- /dev/null\n+++ b/docs/api/errors.md\n@@ -0,0 +1 @@\n+:::...
[ { "diff_hunk": "@@ -399,33 +409,24 @@ def __init__(\n \n @property\n def workers(self) -> WorkerManager:\n- \"\"\"The [worker](guide/workers/) manager.\n-\n- Returns:\n- An object to manage workers.\n-\n- \"\"\"\n+ \"\"\"The [worker](guide/workers/) manager.\"\"\"\...
dd386a9ecb09b2e99ae9699a9ae01e2a19c77edd
diff --git a/docs/_templates/python/material/attribute.html b/docs/_templates/python/material/attribute.html deleted file mode 100644 index b4f6bcaf84..0000000000 --- a/docs/_templates/python/material/attribute.html +++ /dev/null @@ -1,67 +0,0 @@ -{{ log.debug("Rendering " + attribute.path) }} - -<div class="doc doc-ob...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Documentation Updates" }
Textualize__textual-2205@3d1d6b1
Textualize/textual
Python
2,205
Rework `RadioSet` so it no longer leans on the DOM for state
See #2202 and subsequently #2203. While unable to reproduce locally, it does look like there are some environments where it was possible for a `RadioSet` to briefly appear to have two buttons pressed, which in turn would result in `pressed_button` evaluating to `None`. This PR changes the internals of `RadioSet` so ...
2023-04-03T10:57:34Z
RadioSet should not query the DOM to get its state. With the current implementation, there is a brief window where there can be two radio buttons checked. This can lead to the `pressed_button` property returning None. We should not use the DOM in this instance. Better to keep track of the pressed button in an attribut...
See https://github.com/Textualize/textual/discussions/2202
[ { "body": "With the current implementation, there is a brief window where there can be two radio buttons checked. This can lead to the `pressed_button` property returning None.\n\nWe should not use the DOM in this instance. Better to keep track of the pressed button in an attribute.", "number": 2203, "t...
815ff86c1f3606955091500ad18afe44beb47ef8
{ "head_commit": "3d1d6b1d9843a272f50521187152c543fa8c80c2", "head_commit_message": "Update the ChangeLog", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 91ac354e51..b5ada56dc6 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -5,6 +5,12 @@ All notable changes to this project will be docume...
[ { "diff_hunk": "@@ -87,62 +92,68 @@ def __init__(\n disabled=disabled,\n )\n \n- @property\n- def _buttons(self) -> DOMQuery[RadioButton]:\n- \"\"\"The buttons within the set.\"\"\"\n- return self.query(RadioButton)\n-\n def on_mount(self) -> None:\n \"\"\"Per...
c74aaa4112c46ac47391bf1171d82b36a15631e4
diff --git a/CHANGELOG.md b/CHANGELOG.md index 91ac354e51..b5ada56dc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versionin...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-2258@d175688
Textualize/textual
Python
2,258
Add --port option to textual console.
**Please review the following checklist.** - [x] Docstrings on all new or modified functions / classes - [x] Updated documentation - [x] Updated CHANGELOG.md (where appropriate) This will close #2014
2023-04-11T15:12:04Z
Allow command-line option to change development port I couldn't use `textual run --dev` because the server I was on had AV software listening on port 8081. Luckily a quick `git grep` was able to fix it, but it would be nice to have that as a command-line option.
Thank you for your issue. Give us a little time to review it. PS. You might want to check the [FAQ](https://github.com/textualize/textual/blob/main/FAQ.md) if you haven't done so already. This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory) Thanks for your suggestion! As soon as ...
[ { "body": "I couldn't use `textual run --dev` because the server I was on had AV software listening on port 8081.\r\n\r\nLuckily a quick `git grep` was able to fix it, but it would be nice to have that as a command-line option.", "number": 2014, "title": "Allow command-line option to change development ...
e32cdbb39071e6222aa984c1b217c79f808f9a80
{ "head_commit": "d17568876cdbe180452a8409b8536c33163e5815", "head_commit_message": "Mark unpredictable test as xfail.\n\nThis test gets an xfail mark until #2254 is open.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 6dbacc28a0..03fe0b1ac6 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@...
[ { "diff_hunk": "@@ -25,10 +28,18 @@ def get_environ_bool(name: str) -> bool:\n Returns:\n `True` if the env var is \"1\", otherwise `False`.\n \"\"\"\n- has_environ = os.environ.get(name) == \"1\"\n+ has_environ = get_environ(name) == \"1\"\n return has_environ\n \n \n+def get_port_for...
bf7798bbc7cadcce8c99b46993757c716febea12
diff --git a/CHANGELOG.md b/CHANGELOG.md index aa2529ba84..8e43b090c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,14 +16,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added `DataTable.remove_row` method https://github.com/Textualize/textual/pull/2253 +- option `--p...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-2160@08182c6
Textualize/textual
Python
2,160
Set classes
Adds the ability to change / clear classes. - Adds a setter for classes, which may be intuitive to some. - Also adds explicit `set_classes` Fixes https://github.com/Textualize/textual/issues/1081
2023-03-28T14:06:33Z
Add a method of either setting classes to a specific collection, or clearing all classes I've run into one situation where I wanted to be able to clear all of the classes on a `Widget` and set them to a very specific selection -- no toggle or the like. Perhaps it's worth considering adding a mechanism for doing this? E...
By way of comparison, jQuery's `removeClass` function has (among other signatures) a zero-argument signature that will remove all classes present on matched elements. However: I can see one potential downside, in terms of the code ecosystem that could build around a feature like this: when every method call to add/r...
[ { "body": "I've run into one situation where I wanted to be able to clear all of the classes on a `Widget` and set them to a very specific selection -- no toggle or the like. Perhaps it's worth considering adding a mechanism for doing this? Either \"set to this very specific collection\", or \"clear all classes...
17c6f3fc2a362efad8dd2a5d4f51d07e930e8199
{ "head_commit": "08182c694c0e4336d3684df1f54f4d74f2d1769e", "head_commit_message": "test bad identifiers", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 10de689901..55845259e1 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning]...
[ { "diff_hunk": "@@ -888,6 +905,15 @@ def set_class(self, add: bool, *class_names: str) -> None:\n else:\n self.remove_class(*class_names)\n \n+ def set_classes(self, classes: str | Iterable[str]) -> None:", "line": null, "original_line": 908, "original_start_line": null, "...
408acf37eb292d7ba4e8a0b6641c066f8db49b07
diff --git a/CHANGELOG.md b/CHANGELOG.md index 10de689901..f3577ed494 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added Screen.ModalScreen which prevents App from handling bindings. https://github.com/Textualize/textual/pull/21...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-2527@8d3f69a
Textualize/textual
Python
2,527
Add `auto_focus` to screens
This will close #2457. I've added a docstring but I haven't added documentation elsewhere. Should I?
2023-05-09T14:01:18Z
Add option to auto focus the first thing on a screen. I'm thinking that screen could grow a `auto_focus` parameter which takes a selector. It would then focus the first matching node, if there is one. This would need to be done when the screen is first made active, and when it is resumed. i.e. if a screen is popped of...
For the case where there's a stack with 2+ screens, when we pop a screen and we go back to a previous screen, I think we should preserve the widget that was already focused previously.
[ { "body": "I'm thinking that screen could grow a `auto_focus` parameter which takes a selector. It would then focus the first matching node, if there is one.\n\nThis would need to be done when the screen is first made active, and when it is resumed. i.e. if a screen is popped off the stack, the new one should f...
4db54eac4bbdbc773f54e5dc9cecbea4773abd82
{ "head_commit": "8d3f69a04d49d1e4e83db1c573d1232f7201aede", "head_commit_message": "Add auto_focus attribute to screens.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex aa2923fac6..d5f95b549c 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -5,6 +5,13 @@ All notable changes to this projec...
[ { "diff_hunk": "@@ -101,6 +101,12 @@ class Screen(Generic[ScreenResultType], Widget):\n }\n \"\"\"\n \n+ auto_focus: str | None = \"*\"", "line": null, "original_line": 104, "original_start_line": null, "path": "src/textual/screen.py", "start_line": null, "text": "@user1:\nLet...
0b6e3b30404e964bd8c8ba2d32dbd216ddb0d9f2
diff --git a/CHANGELOG.md b/CHANGELOG.md index aeaaf466ae..1e7cdebf4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed `TreeNode.toggle` and `TreeNode.toggle_all` not posting a `Tree.NodeExpanded` or `Tree.NodeCollapsed` mess...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "New Feature Additions" }
statsmodels__statsmodels-9471@27c4000
statsmodels/statsmodels
Python
9,471
Fix formula eval depth in select models
- [X] closes #9047 - [X] closes #9037 - [X] tests added / passed. - [X] code/documentation is well formatted. - [X] properly formatted commit message. See [NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-message). <details> **Notes*...
2025-01-07T11:36:24Z
BUG: Cox Model from formula doesn't grab the correct environment #### Describe the bug Constructing a proportional hazard model from a formula with `smf.phreg` (aka `PHReg.from_formula`) doesn't use the proper environment. Specifically, `PHReg` overrides the `from_formula` class method but doesn't adjust or set t...
[ { "body": "#### Describe the bug\r\n\r\nConstructing a proportional hazard model from a formula with `smf.phreg` (aka `PHReg.from_formula`) doesn't use the proper environment.\r\n\r\nSpecifically, `PHReg` overrides the `from_formula` class method but doesn't adjust or set the `eval_env` keyword. It calls `Model...
91d84c294de2b507d6a5778b6bf2e77ad9b574ed
{ "head_commit": "27c40008fc6c44535692084ed92d3d2012bfac34", "head_commit_message": "TST: Add tests for eval depth", "patch_to_review": "diff --git a/statsmodels/genmod/tests/test_gee.py b/statsmodels/genmod/tests/test_gee.py\nindex 1965335879c..8ddc9151590 100644\n--- a/statsmodels/genmod/tests/test_gee.py\n+++ ...
[ { "diff_hunk": "@@ -74,6 +74,12 @@\n model = \"I(food/income) ~ income + persons\"\n cls.income_fit = BetaModel.from_formula(model, income).fit()\n \n+ def times_two(x):", "line": 77, "original_line": 77, "original_start_line": null, "path": "statsmodels/othermod/tests/tes...
4e64b9627ea97e564d93f9c0ff993a972c6a81a1
diff --git a/statsmodels/discrete/conditional_models.py b/statsmodels/discrete/conditional_models.py index 99c6ea49366..7171742ba9f 100644 --- a/statsmodels/discrete/conditional_models.py +++ b/statsmodels/discrete/conditional_models.py @@ -2,15 +2,20 @@ Conditional logistic, Poisson, and multinomial logit regression ...
{ "difficulty": "medium", "estimated_review_effort": 2, "problem_domain": "Bug Fixes" }
statsmodels__statsmodels-8339@6c2c917
statsmodels/statsmodels
Python
8,339
BUG: Fix auto lag selection in acorr_ljungbox #8338
- [x] closes #8338 - [x] tests added / passed. - [x] code/documentation is well formatted. - [x] properly formatted commit message. See [NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-message). Corrected the implementation of optimal lag...
2022-07-07T01:40:51Z
auto_lag selection in acorr_ljungbox fails when there is no autocorrelation #### Describe the bug The `acorr_ljungbox` function has an `auto_lag` flag which determines the optimal lag for performing the Ljung-Box autocorrelations test. When there is no autocorrelation in the data, however, the function fails and ret...
[ { "body": "#### Describe the bug\r\n\r\nThe `acorr_ljungbox` function has an `auto_lag` flag which determines the optimal lag for performing the Ljung-Box autocorrelations test. When there is no autocorrelation in the data, however, the function fails and returns a \"ValueError: zero-size array to reduction ope...
35b803767bd7803ca5f9fc35d4546aa8cb7be844
{ "head_commit": "6c2c917c9e93376cdc4afb2c198fe593ae70e44a", "head_commit_message": "Update test_diagnostic.py with TODO marker", "patch_to_review": "diff --git a/statsmodels/stats/diagnostic.py b/statsmodels/stats/diagnostic.py\nindex 126cf36402d..fc3d706d009 100644\n--- a/statsmodels/stats/diagnostic.py\n+++ b/...
[ { "diff_hunk": "@@ -1705,13 +1705,23 @@ def test_ljungbox_auto_lag_selection():\n data = sunspots.load_pandas().data[\"SUNACTIVITY\"]\n res = AutoReg(data, 4, old_names=False).fit()\n resid = res.resid\n- res1 = smsdia.acorr_ljungbox(resid)\n- res2 = smsdia.acorr_ljungbox(resid, model_df=4)\n+...
0dd88024badd563190f8000f06ec003506215df2
diff --git a/statsmodels/stats/diagnostic.py b/statsmodels/stats/diagnostic.py index 126cf36402d..db3973bd6cf 100644 --- a/statsmodels/stats/diagnostic.py +++ b/statsmodels/stats/diagnostic.py @@ -399,23 +399,6 @@ def acorr_ljungbox(x, lags=None, boxpierce=False, model_df=0, period=None, lb_stat lb_pval...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
statsmodels__statsmodels-7721@fdb61a8
statsmodels/statsmodels
Python
7,721
ENH: Added fft to ccovf and ccf
- [x] closes #5199 - [x] tests added / passed. - [x] code/documentation is well formatted. - [x] properly formatted commit message. See [NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-message). I have changed `ccovf` to use `scipy.sign...
2021-09-12T19:07:42Z
Speed up the cross-correlation function Dears, I noticed that the computation of the cross corrlation function is extremely slower than the autocorrelation function. It seems to me that this is because of two reasons, but I am not an expert in the field: * acf function lets fix the nlags parameter and ccf does ...
It's possible to add all the same methods as in adf to ccf. I guess, without looking, that acf and ccf could share most of the code
[ { "body": "Dears,\r\n\r\nI noticed that the computation of the cross corrlation function is extremely slower than the autocorrelation function.\r\n\r\nIt seems to me that this is because of two reasons, but I am not an expert in the field: \r\n* acf function lets fix the nlags parameter and ccf does not, the la...
ba72432abcf2b36664588511a1512ed79ff01fd4
{ "head_commit": "fdb61a828fdd510767b6a33378e594444942daa6", "head_commit_message": "Fix linting", "patch_to_review": "diff --git a/statsmodels/tools/validation/validation.py b/statsmodels/tools/validation/validation.py\nindex 27727d34323..afbb5580e86 100644\n--- a/statsmodels/tools/validation/validation.py\n+++ ...
[ { "diff_hunk": "@@ -990,6 +991,30 @@ def test_acovf_fft_vs_convolution(demean, adjusted):\n assert_almost_equal(F1, F2, decimal=7)\n \n \n+@pytest.mark.parametrize(\"demean\", [True, False])\n+@pytest.mark.parametrize(\"adjusted\", [True, False])\n+def test_ccovf_fft_vs_convolution(demean, adjusted):\n+ ...
80ac695607f3f2a7e009944b7cd159fd2c2fccc8
diff --git a/statsmodels/tools/validation/validation.py b/statsmodels/tools/validation/validation.py index 27727d34323..afbb5580e86 100644 --- a/statsmodels/tools/validation/validation.py +++ b/statsmodels/tools/validation/validation.py @@ -59,7 +59,7 @@ def array_like( of obj (if present) or uses NumPy to aut...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Performance Optimizations" }
statsmodels__statsmodels-7497@64d250d
statsmodels/statsmodels
Python
7,497
ENH: Add fixed_params to Hannan Rissanen (GH7202)
- [x] closes #7202 - [x] xref #6159 - [x] tests added / passed. - [x] code/documentation is well formatted. - [x] properly formatted commit message. See [NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-message). <details> **Notes**: ...
2021-06-13T05:16:22Z
ENH: Fixed parameters in Hannan-Rissanen #### Is your feature request related to a problem? Please describe A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] #### Describe the solution you'd like A clear and concise description of what you want to happen. #### Describe...
Assigning the enhancement to myself. Thanks for opening this issue. How are things going? For reference, here is the note about this PR from a previous issue, #6159: >> Hi Chad, >I would like to pick up the "Support for fixed parameters". would you please share some more details on this enhancement? > >That would...
[ { "body": "#### Is your feature request related to a problem? Please describe\r\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\r\n\r\n#### Describe the solution you'd like\r\nA clear and concise description of what you want to happen.\r\n\r\n#### Describe alternati...
c2d87b6ece0c3f121306a861983ade1073e93aeb
{ "head_commit": "64d250d1fac2d42d3330119fd05c67f54a3c8927", "head_commit_message": "ENH: Add fixed_params to Hannan Rissanen (GH7202)", "patch_to_review": "diff --git a/statsmodels/tsa/arima/estimators/hannan_rissanen.py b/statsmodels/tsa/arima/estimators/hannan_rissanen.py\nindex 77eff642373..ce02b51cd2e 100644...
[ { "diff_hunk": "@@ -133,22 +164,57 @@ def hannan_rissanen(endog, ar_order=0, ma_order=0, demean=True,\n resid = y - X.dot(initial_ar_params)\n \n # Get lagged residuals for `exog` in least-squares regression\n- ma_ix = np.array(spec.ma_lags, dtype=int) - 1\n- lagged_resid = lagmat(...
7e1d2981016954863e94a97fa5ad254954812217
diff --git a/docs/source/release/version0.13.rst b/docs/source/release/version0.13.rst new file mode 100644 index 00000000000..29a8f6b63a1 --- /dev/null +++ b/docs/source/release/version0.13.rst @@ -0,0 +1,58 @@ +:orphan: + +============== +Release 0.13.0 +============== + +Release summary +=============== + +statsmode...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
statsmodels__statsmodels-6915@e082999
statsmodels/statsmodels
Python
6,915
BUG: Fixed BSplines to match existing docs
The docstring for `BSplines` appears to have been copied from that of `UnivariateCubicCyclicSplines`, as it specified the `df` and `degree` parameters to be integers, but in fact required them to be lists (raising a `TypeError: 'int' object is not subscriptable` if either was an integer) - Fixed docstring to specify ...
2020-07-24T08:40:45Z
BUG: Passing BSplines arguments `degree` or `df` as integers raises TypeError #### Passing BSplines parameters `degree` or `df` as integers raises TypeError The BSplines docstring specifies that the `degree` and `df` parameters should be integers, but if either is an integer then a TypeError is raised #### Code S...
[ { "body": "#### Passing BSplines parameters `degree` or `df` as integers raises TypeError\r\n\r\nThe BSplines docstring specifies that the `degree` and `df` parameters should be integers, but if either is an integer then a TypeError is raised\r\n\r\n#### Code Sample\r\n\r\n```python\r\nimport numpy as np\r\nfro...
c8dcd233d870c6f96d55b6d06e94bb53b4de46ee
{ "head_commit": "e082999eeefa01cd34c87f40181a7bbc32c477dd", "head_commit_message": "Fixed BSplines to match existing docs\n\n- The docstring for `BSplines` appears to have been copied from that of\n `UnivariateCubicCyclicSplines`, as it specified the `df` and `degree`\n args to be integers, but in fact required ...
[ { "diff_hunk": "@@ -792,6 +792,9 @@ def transform(self, x_new):\n basis : ndarray\n design matrix for the spline basis for given ``x_new``.\n \"\"\"\n+ x_new = np.asarray(x_new)", "line": null, "original_line": 795, "original_start_line": null, "path": "statsmo...
6b07b79fbdd0ccbba1f2799b0be26beebbfda775
diff --git a/statsmodels/gam/smooth_basis.py b/statsmodels/gam/smooth_basis.py index 15338c29b79..c07a3a32ad5 100644 --- a/statsmodels/gam/smooth_basis.py +++ b/statsmodels/gam/smooth_basis.py @@ -616,7 +616,7 @@ class UnivariateCubicCyclicSplines(UnivariateGamSmoother): x : ndarray, 1-D underlying explan...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
statsmodels__statsmodels-6654@1c2c11e
statsmodels/statsmodels
Python
6,654
ENH: Handle pathlib.Path objects
- [ ] closes #6652 - [ ] tests added / passed.
2020-04-21T23:44:14Z
Handle pathlib paths with `get_file_obj` #### Is your feature request related to a problem? Please describe I'm trying to read a statsmodels.tsa.statespace.sarimax.SARIMAXResults pickle file I've saved. I'd like to pass a pathlib.Path object as I find it easier to handle (I work with different machines, Mac and Window...
A PR would be welcome for this enhancement. On Tue, Apr 21, 2020, 21:09 Giulio Beseghi <notifications@github.com> wrote: > Is your feature request related to a problem? Please describe > > I'm trying to read a statsmodels.tsa.statespace.sarimax.SARIMAXResults > pickle file I've saved. I'd like to pass a pathlib.Path ...
[ { "body": "#### Is your feature request related to a problem? Please describe\r\nI'm trying to read a statsmodels.tsa.statespace.sarimax.SARIMAXResults pickle file I've saved. I'd like to pass a pathlib.Path object as I find it easier to handle (I work with different machines, Mac and Windows).\r\n\r\n#### Desc...
1ccd5cdba4f9949c5c27ac4d44718893e17d7184
{ "head_commit": "1c2c11ea1e18ac5f48b3aa969b4b36f9c98bfa67", "head_commit_message": "Handle pathlib.Path objects", "patch_to_review": "diff --git a/statsmodels/iolib/openfile.py b/statsmodels/iolib/openfile.py\nindex 01e4b4edd17..17acf977286 100644\n--- a/statsmodels/iolib/openfile.py\n+++ b/statsmodels/iolib/ope...
[ { "diff_hunk": "@@ -8,16 +9,26 @@\n \n \n def test_pickle():\n- tmpdir = tempfile.mkdtemp(prefix='pickle')\n+ tmpdir = tempfile.mkdtemp(prefix=\"pickle\")\n a = lrange(10)\n- save_pickle(a, tmpdir+'/res.pkl')\n- b = load_pickle(tmpdir+'/res.pkl')\n+\n+ # test with str\n+ path_str = tmpdir ...
7df74f8e9bed4d2d42094165a7518b94f2357320
diff --git a/statsmodels/iolib/openfile.py b/statsmodels/iolib/openfile.py index 01e4b4edd17..22778c8aa07 100644 --- a/statsmodels/iolib/openfile.py +++ b/statsmodels/iolib/openfile.py @@ -34,13 +34,14 @@ def _open(fname, mode, encoding): def get_file_obj(fname, mode='r', encoding=None): """ - Light wrapper ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
statsmodels__statsmodels-6556@14ac690
statsmodels/statsmodels
Python
6,556
BUG: fixes #6553, sliced predicted values according to predicted index
- [x] closes #6553 - [x] tests added / passed. - [x] code/documentation is well formatted. - [x] properly formatted commit message. See [NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-message). Could you point me to the tests that I shou...
2020-02-27T09:23:26Z
AutoReg predict start point bug #### Describe the bug AugoReg predict does not work in some cases. Seems to be related to start point. Works if I move start point to end of endog sample (i.e. in the example below, `start=100`) but not if the start is further ahead. #### Code Sample, a copy-pastable example if poss...
[ { "body": "#### Describe the bug\r\nAugoReg predict does not work in some cases. Seems to be related to start point. Works if I move start point to end of endog sample (i.e. in the example below, `start=100`) but not if the start is further ahead. \r\n\r\n#### Code Sample, a copy-pastable example if possible\r\...
4c0488c5a0fc0b27f85f0fccf25a92a7fb93dc18
{ "head_commit": "14ac690aacba6c737d60f63418979d7b520670c6", "head_commit_message": "BUG: fixes #6553, sliced predicted values according to predicted index", "patch_to_review": "diff --git a/statsmodels/tsa/ar_model.py b/statsmodels/tsa/ar_model.py\nindex 3a6379e2cac..5d3a2305d28 100644\n--- a/statsmodels/tsa/ar_...
[ { "diff_hunk": "@@ -478,6 +476,9 @@ def _wrap_prediction(self, prediction, start, end):\n else:\n index = pd.RangeIndex(end)\n index = index[start:end]\n+ prediction = prediction[-len(index):]\n+ if not isinstance(self.data.orig_endog, (pd.Series, pd.DataFrame))...
311de64185ed374b2be708679b9820fccee23be6
diff --git a/statsmodels/tsa/ar_model.py b/statsmodels/tsa/ar_model.py index 3a6379e2cac..b0905b0353b 100644 --- a/statsmodels/tsa/ar_model.py +++ b/statsmodels/tsa/ar_model.py @@ -468,8 +468,9 @@ def _setup_oos_forecast(self, add_forecasts, exog_oos): return x def _wrap_prediction(self, prediction, sta...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-2127@7cd2e7a
Textualize/textual
Python
2,127
Text log scroll end
Adds options to influence scrolling behaviour in TextLog Fixes https://github.com/Textualize/textual/issues/2105
2023-03-23T16:34:47Z
`TextLog.write`: optional auto scroll Hi, `TextLog.write` always scrolls to the end. I use ```python class TextLog(textual.widgets.TextLog): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._auto_scroll = True self._writing = False def watch_scr...
Thank you for your issue. Give us a little time to review it. PS. You might want to check the [FAQ](https://github.com/textualize/textual/blob/main/FAQ.md) if you haven't done so already. This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory) We could add an argument to `write` to ...
[ { "body": "Hi,\r\n\r\n`TextLog.write` always scrolls to the end. I use\r\n\r\n```python\r\nclass TextLog(textual.widgets.TextLog):\r\n def __init__(self, *args, **kwargs):\r\n super().__init__(*args, **kwargs)\r\n\r\n self._auto_scroll = True\r\n self._writing = False\r\n\r\n def watc...
8fd3ccb32cbf7c3fd530f70d2122dd04cd685a72
{ "head_commit": "7cd2e7a6db593928c83bc3d6573b0b776638039e", "head_commit_message": "tweak docstrings", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 9c94515f78..3d24d506a3 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -27,6 +27,10 @@ and this project adheres to [Semantic Versioning](ht...
[ { "diff_hunk": "@@ -92,19 +97,26 @@ def write(\n width: int | None = None,\n expand: bool = False,\n shrink: bool = True,\n+ scroll_end: bool | None = None,\n ) -> Self:\n \"\"\"Write text or a rich renderable.\n \n Args:\n content: Rich renderable ...
e52ae8d975c21f117f411ba76554a3dad2bf6566
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c94515f78..3d24d506a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `TreeNode`: `expand`, `expand_all`, `collapse`, `collapse_all`, `toggle`, `toggle_all` - `Tree`: `clear`, `...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
statsmodels__statsmodels-6892@6726f86
statsmodels/statsmodels
Python
6,892
ENH: added diagnostics test to ETS model
- [ ] closes #6889 - [ ] tests added / passed. - [ ] code/documentation is well formatted. - [ ] properly formatted commit message. See [NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-message). I added the diagnostic test methods to the ...
2020-07-19T08:28:53Z
ENH: Remove NaNs from ETS summary When fitting the AAdA model to the austourists data there's still some NaNs showing up in the summary frame. - The final section is all NaNs, because I didn't implement these yet for ETS. - The error of `damping_trend` is NaN, because it is directly on the fitting bounds - The err...
[ { "body": "When fitting the AAdA model to the austourists data there's still some NaNs showing up in the summary frame.\r\n\r\n- The final section is all NaNs, because I didn't implement these yet for ETS.\r\n- The error of `damping_trend` is NaN, because it is directly on the fitting bounds\r\n- The error of `...
0c2cda3e344476f77978007763f21462e180498f
{ "head_commit": "6726f86f0213b3ba97680642d8c70f38d9982850", "head_commit_message": "fix merge", "patch_to_review": "diff --git a/statsmodels/tsa/exponential_smoothing/base.py b/statsmodels/tsa/exponential_smoothing/base.py\nindex 7c7e64b076e..3ac4c5c6bb1 100644\n--- a/statsmodels/tsa/exponential_smoothing/base.p...
[ { "diff_hunk": "@@ -719,6 +719,20 @@ def test_results_vs_statespace(statespace_comparison):\n statespace_results.fittedvalues.values\n )\n \n+ # compare diagnostics\n+ assert_almost_equal(", "line": null, "original_line": 723, "original_start_line": null, "path": "statsmodels/t...
fcf8446289c85ed23cecee68c2ed77c2d32e31d2
diff --git a/statsmodels/tsa/exponential_smoothing/base.py b/statsmodels/tsa/exponential_smoothing/base.py index 7c7e64b076e..3ac4c5c6bb1 100644 --- a/statsmodels/tsa/exponential_smoothing/base.py +++ b/statsmodels/tsa/exponential_smoothing/base.py @@ -347,10 +347,6 @@ def __init__(self, model, params, scale=1.0): ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Code Refactoring / Architectural Improvement" }
statsmodels__statsmodels-6884@f81828c
statsmodels/statsmodels
Python
6,884
TST: ets: test for simple exponential smoothing convergence
- [ ] closes #6883 - [ ] tests added / passed. - [ ] code/documentation is well formatted. - [ ] properly formatted commit message. See [NumPy's guide](https://docs.scipy.org/doc/numpy-1.15.1/dev/gitwash/development_workflow.html#writing-the-commit-message). I added a test for the example in #6883. I...
2020-07-13T20:28:19Z
BUG: ETS_Model fails to converge for basic model. #### Describe the bug ETS_Model fails to converge -- or even move off starting value, in a simple model. #### Code Sample, a copy-pastable example if possible ```python from statsmodels.tsa.exponential_smoothing.ets import ETSModel from statsmodels.tsa.stat...
@s-scherrer any idea why it fails here? I just tried running this on my machine, here it converges and the value of alpha is similar to the one obtained with `ExponentialSmoothing` (0.8049 vs 0.8050). <details> ``` In [1]: from statsmodels.tsa.exponential_smoothing.ets import ETSModel ...: from statsmodels....
[ { "body": "#### Describe the bug\r\n\r\nETS_Model fails to converge -- or even move off starting value, in a simple model.\r\n\r\n#### Code Sample, a copy-pastable example if possible\r\n\r\n\r\n```python\r\nfrom statsmodels.tsa.exponential_smoothing.ets import ETSModel\r\nfrom statsmodels.tsa.statespace.expone...
f3f89ad777b22e6db565897397ece24d41af5700
{ "head_commit": "f81828cc5893b4589bdcdda9a5ee233949609ced", "head_commit_message": "remove fixed parameters before fitting", "patch_to_review": "diff --git a/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx b/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx\nindex ebc77599a65..5a92c94638a 100644\n--- a...
[ { "diff_hunk": "@@ -17,16 +17,30 @@ ctypedef fused numeric:\n cpdef _initialize_ets_smooth(\n numeric [:] params,\n numeric[:,:] xhat,\n+ np.uint8_t [:] is_fixed,", "line": null, "original_line": 20, "original_start_line": null, "path": "statsmodels/tsa/exponential_smoothing/_ets_smoo...
54eb40fd411cc21202bee6f6f0b9be5094b4c830
diff --git a/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx b/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx index ebc77599a65..e769c0f4019 100644 --- a/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx +++ b/statsmodels/tsa/exponential_smoothing/_ets_smooth.pyx @@ -17,16 +17,30 @@ ctypedef fused nume...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
Textualize__textual-2095@2d70172
Textualize/textual
Python
2,095
Allow paths when creating 'DirectoryTree'.
This will close #1438. This felt like a no-brainer given that we can support `pathlib.Path` (which makes _a lot_ of sense) without needing to modify the inner workings by letting everything stay a string. It would've taken longer to ask if it made sense to implement this than to just wait for this PR to get accepte...
2023-03-21T14:20:26Z
Consider updating `DirectoryTree` so that it takes `Path` as well as a `str` as the path to browse Some people tend to favour using `Path` over `str` for paths and the like, so I feel it would be an idea to accept a `Path` as the path.
Thank you for your issue. Give us a little time to review it. PS. You might want to check the [FAQ](https://github.com/textualize/textual/blob/main/FAQ.md) if you haven't done so already. This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory)
[ { "body": "Some people tend to favour using `Path` over `str` for paths and the like, so I feel it would be an idea to accept a `Path` as the path.", "number": 1438, "title": "Consider updating `DirectoryTree` so that it takes `Path` as well as a `str` as the path to browse" } ]
5cd1263875f414f6ec2888a4cdd7eff251dde508
{ "head_commit": "2d70172b8e68932164918d133c45499a5b552651", "head_commit_message": "Allow paths when creating 'DirectoryTree'.\n\nRelated issues: #1438.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex f2a362f93b..f45fb94d63 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -16,6 +16,7 @@ a...
[ { "diff_hunk": "@@ -83,13 +83,14 @@ def __init__(self, path: str) -> None:\n \n def __init__(\n self,\n- path: str,\n+ path: str | Path,\n *,\n name: str | None = None,\n id: str | None = None,\n classes: str | None = None,\n disabled: bool = Fal...
f92c939511c139537ca24c68735b34d9f1cf8198
diff --git a/CHANGELOG.md b/CHANGELOG.md index f2a362f93b..f45fb94d63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Tabs widget now sends Tabs.Cleared when there is no active tab. - Breaking change: changed default behaviour of ...
{ "difficulty": "low", "estimated_review_effort": 2, "problem_domain": "New Feature Additions" }
Textualize__textual-2154@eaa5b05
Textualize/textual
Python
2,154
Add `OptionList` widget
Adds an `OptionList` widget, which can form the basis of traditional bounce-bar menus, and also can provide a low-cost item list, etc. Initially started to implement the requirement outlined in #2053 but turned into something more foundational. Key features include: - Just a single widget, so ideally allowing ...
2023-03-28T12:37:05Z
Menu Line API widget We need a `Menu` widget which displays a list of items that may be navigated and selected. Similar to ListView but using the Line API. The menu should accept a list of renderables (not just str and Text), which will be presented in a vertically stacked list. It should display a cursor that may be...
[ { "body": "We need a `Menu` widget which displays a list of items that may be navigated and selected.\n\nSimilar to ListView but using the Line API.\n\nThe menu should accept a list of renderables (not just str and Text), which will be presented in a vertically stacked list. It should display a cursor that may ...
ab0de0139c43fe4a8d11ddc5566a22b4ca855e4a
{ "head_commit": "eaa5b05d0eee4f4075230d0f24527bac9631d4dd", "head_commit_message": "Tweak the OptionList hover tests some more", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex dae30d7d3d..c6ac7ca1bc 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -43,6 +43,7 @@ and this project adheres to...
[ { "diff_hunk": "@@ -0,0 +1,904 @@\n+\"\"\"Provides the core of a classic vertical bounce-bar option list.\n+\n+Useful as a lightweight list view (not to be confused with ListView, which\n+is much richer but uses widgets for the items) and as the base for various\n+forms of bounce-bar menu.\n+\"\"\"\n+\n+from __...
ebcd5f3d472c4e624dceef311bbf73d7dec82de8
diff --git a/CHANGELOG.md b/CHANGELOG.md index dae30d7d3d..c6ac7ca1bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added TEXTUAL_LOG env var which should be a path that Textual will write verbose logs to (textual devtools is gen...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
statsmodels__statsmodels-5146@bb4e021
statsmodels/statsmodels
Python
5,146
Clean up the smf namespace
Removes unused classes from the smf namespace, closes #4947 and #833.
2018-09-08T02:25:15Z
Confusion regarding the smf module This code works fine as expected: ```python import numpy as np import pandas as pd import statsmodels.formula.api as smf n = 100 data = pd.DataFrame({"y": np.random.poisson(lam=1, size=n), "x": np.random.randn(n)}) result = smf.poisson("y ~ x", data...
this got lost #833 we just need `del xxx` to remove the original classes from the namespace @josef-pkt I created a pull request for this. I think it went through, although I'm seeing some git weirdness locally. No need for del. Just use `__all__` which is the standard method to limit namespace. `__all__` still leave...
[ { "body": "This code works fine as expected:\r\n\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\nimport statsmodels.formula.api as smf\r\n\r\nn = 100\r\ndata = pd.DataFrame({\"y\": np.random.poisson(lam=1, size=n), \r\n \"x\": np.random.randn(n)})\r\n\r\nresult = smf.poisson(\"y...
25ebae98c408f07c99754a3ef943982e56fc22ea
{ "head_commit": "bb4e021e4ca4b81f22f3d4f9d7540442a0f87660", "head_commit_message": "clean up smf namespace", "patch_to_review": "diff --git a/statsmodels/formula/api.py b/statsmodels/formula/api.py\nindex b75a0119b27..3d7d951310c 100644\n--- a/statsmodels/formula/api.py\n+++ b/statsmodels/formula/api.py\n@@ -1,3...
[ { "diff_hunk": "@@ -1,33 +1,28 @@\n-from statsmodels.regression.linear_model import GLS\n-gls = GLS.from_formula\n-from statsmodels.regression.linear_model import WLS\n-wls = WLS.from_formula\n-from statsmodels.regression.linear_model import OLS\n-ols = OLS.from_formula\n-from statsmodels.regression.linear_mode...
779c837bf4c3897907a5228ac1fb86d29b6b3e66
diff --git a/statsmodels/formula/api.py b/statsmodels/formula/api.py index b75a0119b27..2d78da4f116 100644 --- a/statsmodels/formula/api.py +++ b/statsmodels/formula/api.py @@ -1,33 +1,28 @@ -from statsmodels.regression.linear_model import GLS -gls = GLS.from_formula -from statsmodels.regression.linear_model import WLS...
{ "difficulty": "low", "estimated_review_effort": 3, "problem_domain": "Code Refactoring / Architectural Improvement" }
Textualize__textual-2042@f09eb78
Textualize/textual
Python
2,042
Get rid of `_Clock` and move utility time-related functions to `_time.py`.
This will close #1961.
2023-03-13T17:06:46Z
Remove clock concept clock.py was indented to be a virtual clock to driver Textual apps. The ideas was that in testing we could create a mocked clock that would make the event system predictable. That never happened, and I suspect the abstraction in clock.py is superfluous. Suggest we ditch it in favour of simple modu...
[ { "body": "clock.py was indented to be a virtual clock to driver Textual apps. The ideas was that in testing we could create a mocked clock that would make the event system predictable.\n\nThat never happened, and I suspect the abstraction in clock.py is superfluous. Suggest we ditch it in favour of simple modu...
53a56da31733528cdb26c7461bece9a6d8f1f7e4
{ "head_commit": "f09eb78cc850132bacb5cfcbb9b178f15843bc86", "head_commit_message": "Remove async version of _time.py::get_time.\n\nWe started by removing '_time.py::get_time' because that was the async one and then I renamed 'get_time_no_wait' to 'get_time'.", "patch_to_review": "diff --git a/src/textual/_animat...
[ { "diff_hunk": "@@ -42,3 +42,13 @@ async def sleep(secs: float) -> None:\n sleep_for = secs - 0.0005\n if sleep_for > 0:\n await asyncio_sleep(sleep_for)\n+\n+\n+def get_time() -> float:", "line": null, "original_line": 47, "original_start_line": null, "path": "src/te...
03a40fd4e33e5ea2c6b0d5f5ac8e5396e5140b54
diff --git a/src/textual/_animator.py b/src/textual/_animator.py index 564f87da87..060da0c984 100644 --- a/src/textual/_animator.py +++ b/src/textual/_animator.py @@ -8,7 +8,7 @@ from typing_extensions import Protocol, runtime_checkable -from . import _clock +from . import _time from ._callback import invoke fro...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Code Refactoring / Architectural Improvement" }
Textualize__textual-1778@6f1abe8
Textualize/textual
Python
1,778
implements screens view
Fixes https://github.com/Textualize/textual/issues/1775 Fixes https://github.com/Textualize/textual/issues/1776 Fixes https://github.com/Textualize/textual/issues/1777 This update is mainly for the following: - Prevents `install_screen` from also mounting the screen. - Restricts app CSS to a single (current)...
2023-02-13T11:16:46Z
install_screen shouldn't add screen to the DOM Calling `install_screen` should add the screen to `_install_screens` but it should not add it to the DOM. Screens should only be added to the DOM explicitly with `push_screen` or `switch_screen` App children should only contain the current screen Currently the DOM will c...
[ { "body": "Calling `install_screen` should add the screen to `_install_screens` but it should not add it to the DOM.\n\nScreens should only be added to the DOM explicitly with `push_screen` or `switch_screen`", "number": 1775, "title": "install_screen shouldn't add screen to the DOM" }, { "body"...
555cf8e6ee9932c15996a0d127e4b775079f922b
{ "head_commit": "6f1abe849f7694f68e8726493e41fa9ed11d94da", "head_commit_message": "fix reference", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 974e5ee860..6df3da39e6 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,13 +19,20 @@ and this project adheres to [Semantic Versioning](http...
[ { "diff_hunk": "@@ -499,6 +505,30 @@ def visible(self, new_value: bool) -> None:\n def tree(self) -> Tree:\n \"\"\"Get a Rich tree object which will recursively render the structure of the node tree.\n \n+ Returns:", "line": null, "original_line": 508, "original_start_line": null,...
2db2ae1b521a58b3f277aac2d81a7799c59641bc
diff --git a/CHANGELOG.md b/CHANGELOG.md index 974e5ee860..6df3da39e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,13 +19,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added Shift+scroll wheel and ctrl+scroll wheel to scroll horizontally - Added `Tree.action_toggle_node` to tog...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Code Refactoring / Architectural Improvement" }
Textualize__textual-1964@2047fda
Textualize/textual
Python
1,964
Add a post-run warning hook to `textual run`
Implements #1944 and in doing so adds a place to add more checks and warnings to a list. The idea here being that if a user is using `textual run`, on exit, problematic environments can be tested for and warnings displayed. Right now the only warning added is for using `terminal.app` under macOS. This also adds a...
2023-03-07T12:57:32Z
Warn users about macOS Terminal I'm thinking we might detect macOS terminal when running `textual run` and direct them to a better terminal, like iTerm. Otherwise, I suspect many people wouldn't realise it could look a lot better. On exit from `textual run`, we should print out a short message which a link to our sit...
[ { "body": "I'm thinking we might detect macOS terminal when running `textual run` and direct them to a better terminal, like iTerm.\n\nOtherwise, I suspect many people wouldn't realise it could look a lot better.\n\nOn exit from `textual run`, we should print out a short message which a link to our site somewhe...
85f26e22d00a38171cb95e10ad3ff093576c450a
{ "head_commit": "2047fda57d4d23ad22e7598dc8965b82af6b1589", "head_commit_message": "Rebuild the FAQ", "patch_to_review": "diff --git a/FAQ.md b/FAQ.md\nindex 239d53570c..29265366d9 100644\n--- a/FAQ.md\n+++ b/FAQ.md\n@@ -7,6 +7,7 @@\n - [How can I select and copy text in a Textual app?](#how-can-i-select-and-cop...
[ { "diff_hunk": "@@ -38,6 +38,38 @@ def console(verbose: bool, exclude: list[str]) -> None:\n console.show_cursor(True)\n \n \n+def _post_run_warnings() -> None:\n+ \"\"\"Look for and report any issues with the environment.\n+\n+ This is the right place to add code that looks at the terminal, or ot...
858d228da93745128e040426c864cd58bdf6a8f0
diff --git a/FAQ.md b/FAQ.md index 239d53570c..29265366d9 100644 --- a/FAQ.md +++ b/FAQ.md @@ -7,6 +7,7 @@ - [How can I select and copy text in a Textual app?](#how-can-i-select-and-copy-text-in-a-textual-app) - [How do I center a widget in a screen?](#how-do-i-center-a-widget-in-a-screen) - [How do I pass arguments...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-1954@b7f66fa
Textualize/textual
Python
1,954
Border colour percentage
Adds the ability to say something like: ```scss Widget { border: solid red 50%; } ``` See #1863.
2023-03-06T16:33:15Z
Add a percentage to the border definition to apply an alpha It's often a requirement to set a border that is muted a little, but there is no easy way of applying an alpha to a border if it is not already set. I think we should add an optional percentage to the border definition, to multiple the borders alpha. Somethin...
Just to make sure, you _can_ mute the border a little if you bake the alpha value into the colour itself, right? Yeah, you can set a color with alpha. But you apply new alpha to that color.
[ { "body": "It's often a requirement to set a border that is muted a little, but there is no easy way of applying an alpha to a border if it is not already set.\n\nI think we should add an optional percentage to the border definition, to multiple the borders alpha. Something like the following:\n\n```\nborder: s...
fcc16c0e59e39d394778dd00865f073adb8592bf
{ "head_commit": "b7f66fad064a79c1ce061e884351ab5d7baa53bc", "head_commit_message": "Add a CSS example for using border transparency", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 4296bb28c5..a7f4483342 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -24,6 +24,7 @@ and this project adher...
[ { "diff_hunk": "@@ -462,9 +463,18 @@ def border_value_error():\n except ColorParseError:\n border_value_error()\n \n+ elif token_name == \"scalar\":\n+ alpha_scalar = Scalar.parse(token.value)\n+ if alpha_scalar.unit != Unit.PERCENT:\n...
f4404d7e3e675472b7e0adb41064bebf21e6c17f
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4296bb28c5..f2fc8ec93c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added `radio_set` attribute to `RadioSet` events https://github.com/Textualize/textual/pull/1940 - Added `switch...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
statsmodels__statsmodels-4538@f315d55
statsmodels/statsmodels
Python
4,538
BUG/REF: fixing a few VAR problems
WIP trying to get a few fixes into 0.9 plot now return fig, rename test_whiteness methods closes #4537 (old test_whiteness is now plot_acorr) I'm still thinking about #4535
2018-04-23T19:11:09Z
BUG: VAR test_whiteness is a plot function but uses sample_acorr The results. plot produces by old VAR.test_whiteness doesn't make sense. In 7 years nobody complained. !? i.e. I'm estimating a VAR with three lags, but lag 1 and lag 2 are significant in the autocorrelation plot. ` acorrs = self.sample_acorr(nlags...
Actually, the doc string says sample (y) autocorrelation. So, it's just that the method name is misleading and indicates something different (whiteness of endog while I would have expected residual whiteness as diagnostic check on the model). Also, there is a separate plot_sample_acorr method
[ { "body": "The results. plot produces by old VAR.test_whiteness doesn't make sense.\r\nIn 7 years nobody complained. !?\r\n\r\ni.e. I'm estimating a VAR with three lags, but lag 1 and lag 2 are significant in the autocorrelation plot.\r\n\r\n` acorrs = self.sample_acorr(nlags)`", "number": 4537, "title"...
7cbaa2e9c8b996696bdcba08fc12fcf1b5253c49
{ "head_commit": "f315d5593cbe4e768ce8833888cc1dada0f6fd6b", "head_commit_message": "BUG/DOC fix exog in VARProcess.simulate_var, docstrings", "patch_to_review": "diff --git a/statsmodels/tsa/vector_ar/irf.py b/statsmodels/tsa/vector_ar/irf.py\nindex f9e0e1c5293..267b2243f19 100644\n--- a/statsmodels/tsa/vector_a...
[ { "diff_hunk": "@@ -586,6 +586,7 @@ def __init__(self, endog, endog_lagged, params, sigma_u, lag_order,\n else:\n trendorder = None\n self.k_trend = k_trend\n+ self.k_exog = k_trend # now required by VARProcess", "line": null, "original_line": 589, "original_start...
50c0235fa9857a0f5bd73d77388febf7d44041dc
diff --git a/statsmodels/tsa/vector_ar/irf.py b/statsmodels/tsa/vector_ar/irf.py index f9e0e1c5293..1fbed1c77cb 100644 --- a/statsmodels/tsa/vector_ar/irf.py +++ b/statsmodels/tsa/vector_ar/irf.py @@ -163,10 +163,12 @@ def plot(self, orth=False, impulse=None, response=None, s...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-1983@01c1d55
Textualize/textual
Python
1,983
Add `ContentSwitcher`
Implements the requirement outlined in #1945. Simply put: this PR adds a simple container widget (that inherits from `Container` and can be styled as desired) that hides all its immediate children, and expects them all to have a widget id. A `current` property is then set to switch between the different children. Essen...
2023-03-08T15:06:50Z
Switcher Widget We need a widget to switch between child widgets. Not sure what we would call it yet. Essentially a single child would be visible at one time. Setting a reactive attribute to an query selector would make a new pane visible and hide the others.
Carousel? Gallery? Kind of, but more fundamental than that. Think of it as the foundation of a tabbed widget.
[ { "body": "We need a widget to switch between child widgets. Not sure what we would call it yet.\n\nEssentially a single child would be visible at one time. Setting a reactive attribute to an query selector would make a new pane visible and hide the others.\n", "number": 1945, "title": "Switcher Widget"...
3a627e0881db1793312da846d98e1fcf2c04c39b
{ "head_commit": "01c1d558b81e26578e90006046e8e17e1c58ab26", "head_commit_message": "Learning my alphabet...", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex e9379b4f55..3e263246d3 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioni...
[ { "diff_hunk": "@@ -0,0 +1,54 @@\n+# ContentSwitcher\n+\n+A widget for containing and switching display between multiple child\n+widgets.\n+\n+- [ ] Focusable\n+- [X] Container\n+\n+## Example\n+\n+The example below uses a `ContentSwitcher` in combination with two `Button`s\n+to create a simple tabbed view. Not...
824724a6646d70155e647fe595bffb015827a4c8
diff --git a/CHANGELOG.md b/CHANGELOG.md index a008e826f7..2995b3fe1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Breaking change: Added `toggle_button` attribute to RadioButton and Checkbox events, replaces `input` https://git...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-2064@93dff81
Textualize/textual
Python
2,064
Implement border (sub)title.
This will close #1864.
2023-03-14T22:02:45Z
Add title to CSS borders We should add the ability to render a title (displayed in the top) and a subtitle (displayed in the bottom) to CSS borders. Something akin to Rich panels. Widget should grow `border_title` and `border_subtitle` attributes, which should accept a str or Text in the setter, and return a Text in t...
Yeah, this would be great. In one of my projects, I apply border to a container and use `Label` widget to display a title before the container. Having a `Panel` like experience would be better. Will there be a subtitle option as well? @learnbyexample Yeah, don't see why not. I have a couple of follow-up questions re...
[ { "body": "We should add the ability to render a title (displayed in the top) and a subtitle (displayed in the bottom) to CSS borders. Something akin to Rich panels.\n\nWidget should grow `border_title` and `border_subtitle` attributes, which should accept a str or Text in the setter, and return a Text in the g...
29692736d09f0f4682a9dad09e10dd8150f85381
{ "head_commit": "93dff8149c7638aa6e6244ffc12f9e636e6ca99e", "head_commit_message": "Update CHANGELOG.md", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex f2a362f93b..d536b7ca2f 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -32,6 +32,8 @@ and this project adheres to [Semantic Versioning](...
[ { "diff_hunk": "@@ -0,0 +1,38 @@\n+This example shows all border title and subtitle alignments, together with some examples of how (sub)titles can have custom markup.\n+Open the code tabs to see the details of the code examples.\n+\n+=== \"Output\"\n+\n+ ```{.textual path=\"docs/examples/styles/border_sub_ti...
0f66ef4909bf849a03bdae356f14a445cf77e540
diff --git a/CHANGELOG.md b/CHANGELOG.md index f45fb94d63..fd2533a91c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added `parser_factory` argument to `Markdown` and `MarkdownViewer` constructors https://github.com/Te...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
vega__altair-3533@d9e219b
vega/altair
Python
3,533
fix: Raise informative error message if a non-existent column name is passed
closes #3532
2024-08-12T09:17:25Z
regression: unclear error message when plotting non-existent column name ### What happened? I ran ```python import pandas as pd import altair as alt df = pd.DataFrame({'a':[1,2], 'b':[4,5]}) alt.Chart(df).mark_line().encode(x='a', y='c').to_json() ``` ✅ On Altair 5.3.0, I get ``` ValueError: Unable to det...
[ { "body": "### What happened?\n\nI ran\r\n```python\r\nimport pandas as pd\r\nimport altair as alt\r\n\r\ndf = pd.DataFrame({'a':[1,2], 'b':[4,5]})\r\nalt.Chart(df).mark_line().encode(x='a', y='c').to_json()\r\n```\r\n\r\n✅ On Altair 5.3.0, I get\r\n```\r\nValueError: Unable to determine data type for the field...
0062e6228134f176bb9fbaa944724039bb6b043a
{ "head_commit": "d9e219bc15d4155e3fb1a1d4dd8b27544a267f8f", "head_commit_message": "test: Confirm `(pd|pl)` parity in `test_non_existent_column_name`\n\nJust to be extra cautious, since the original message in https://github.com/vega/altair/issues/3532 referenced `pandas` directly", "patch_to_review": "diff --gi...
[ { "diff_hunk": "@@ -179,7 +179,7 @@ def to_dict(\n # We still parse it out of the shorthand, but drop it here.\n parsed.pop(\"type\", None)\n elif not (type_in_shorthand or type_defined_explicitly):\n- if _is_pandas_dataframe(context.get(\"data\", None)...
234f7ccd03eb4cd35614c79ff8f9811f45b0e221
diff --git a/altair/utils/core.py b/altair/utils/core.py index 8ab466a87..f5ef659b1 100644 --- a/altair/utils/core.py +++ b/altair/utils/core.py @@ -504,7 +504,7 @@ def to_eager_narwhals_dataframe(data: IntoDataFrame) -> nw.DataFrame[Any]: def parse_shorthand( # noqa: C901 shorthand: dict[str, Any] | str, - ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-2030@3518d38
Textualize/textual
Python
2,030
Add containers
**Please review the following checklist.** - [x] Docstrings on all new or modified functions / classes - [x] Updated documentation - [x] Updated CHANGELOG.md (where appropriate)
2023-03-13T11:38:55Z
Additional containers We need a few additions / modifications to containers.py - `Center` to horizontally align contents (width 100%, height auto) - `Middle` to vertically align contents. - `Horizontal` should have scrollbars disabled by default - `Vertical` should have scrollbars disabled by default - `HorizontalScro...
There's some text about whether `Horizontal` and `Vertical` have scrollbars enabled or not in the "Layout" page of the guide. We'll need to make sure we update that page if we change the behaviour. Trying to think as someone who just found Textual, a container called `Vertical` seems to be the simplest vertical contain...
[ { "body": "We need a few additions / modifications to containers.py\n\n- `Center` to horizontally align contents (width 100%, height auto)\n- `Middle` to vertically align contents.\n- `Horizontal` should have scrollbars disabled by default\n- `Vertical` should have scrollbars disabled by default\n- `HorizontalS...
85cce4a09e7e6e346a13020f3ea0d1685b1593a4
{ "head_commit": "3518d38d85afe98c586ea638c8c49b30acc5e4cb", "head_commit_message": "Update snapshot tests.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 0e7bd48788..d65d0199c4 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -7,14 +7,23 @@ and this project adheres to [Semantic Versionin...
[ { "diff_hunk": "@@ -14,45 +14,93 @@ class Container(Widget):\n \n \n class Vertical(Widget):\n- \"\"\"A container widget which aligns children vertically.\"\"\"\n+ \"\"\"A container which lays children vertically.\"\"\"", "line": null, "original_line": 17, "original_start_line": null, "pat...
285de4b0fa8b198989e978f755150dd7ae3f08cb
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d853dee45..b65b822607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,21 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## Unreleased + +### Changed + +- Breakin...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-1638@36a9214
Textualize/textual
Python
1,638
DataTable refactor - Adds cell updating and sorting functionality
Rows and columns in the DataTable have been decoupled from their current visual location. ## API Changes - A `sort` method was added to the `DataTable`, allowing you to supply one or more column keys. Rows will be re-ordered using the provided keys. - A new method `update_cell(row_key, column_key, value, update...
2023-01-23T13:03:25Z
The three `DataTable` `*Selected` methods report wrong selection location when caused by mouse selection This was first raised by a user on our Discord server, and in testing the issue some more with this code: ```python from textual.app import App, ComposeResult from textual.containers import Vertical fro...
I've got the fix for this in https://github.com/Textualize/textual/pull/1638.
[ { "body": "This was first raised by a user on our Discord server, and in testing the issue some more with this code:\r\n\r\n```python\r\nfrom textual.app import App, ComposeResult\r\nfrom textual.containers import Vertical\r\nfrom textual.widgets import Header, Footer, TextLog, DataTable\r\nfrom textu...
ea74ca77259bc1ffe31bf922b80e5c2f2ba0833c
{ "head_commit": "36a9214d7f66d4e7b70d867f56e9038b1a983ac4", "head_commit_message": "Update reactive names in DataTable reference docs", "patch_to_review": "diff --git a/.coveragerc b/.coveragerc\nindex d16dd221a0..087a1674f7 100644\n--- a/.coveragerc\n+++ b/.coveragerc\n@@ -7,3 +7,4 @@ exclude_lines =\n if T...
[ { "diff_hunk": "@@ -26,40 +29,125 @@\n from ..scroll_view import ScrollView\n from ..strip import Strip\n \n+CellCacheKey: TypeAlias = \"tuple[RowKey, ColumnKey, Style, bool, bool, int]\"\n+LineCacheKey: TypeAlias = (\n+ \"tuple[int, int, int, int, Coordinate, Coordinate, Style, CursorType, bool, int]\"\n+)\...
f28f9c4caee73e324ceeba810dc0cbc76e5e8c90
diff --git a/.coveragerc b/.coveragerc index d16dd221a0..087a1674f7 100644 --- a/.coveragerc +++ b/.coveragerc @@ -7,3 +7,4 @@ exclude_lines = if TYPE_CHECKING: if __name__ == "__main__": @overload + __rich_repr__ diff --git a/CHANGELOG.md b/CHANGELOG.md index 6df3da39e6..ba5c13e796 100644 --- a/CHANG...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
Textualize__textual-1551@4a893b5
Textualize/textual
Python
1,551
Raise clearer exception when `none` is in a space-separated list of text styles.
**Please review the following checklist.** - [x] Docstrings on all new or modified functions / classes - ~[ ] Updated documentation~ - [x] Updated CHANGELOG.md (where appropriate) **Note**: This PR should only be merged if we agree that the behaviour of [`rich.Style.parse`](https://github.com/Textualize/rich/b...
2023-01-12T11:05:31Z
Improve error message when value `none` is in a list of text styles When you provide an illegal value for the CSS rule `link-style`, you get a helpful message displaying all legal values, saying that `text-style` expects a space-separated list of those. If you set `text-style: bold italic reverse` it works fine. ...
We found the following entry in the [FAQ](https://github.com/textualize/textual/blob/main/FAQ.md) which you may find helpful: - [Does Textual support images?](https://github.com/textualize/textual/blob/main/FAQ.md#does-textual-support-images) Feel free to close this issue if you found an answer in the FAQ. Otherwise...
[ { "body": "When you provide an illegal value for the CSS rule `link-style`, you get a helpful message displaying all legal values, saying that `text-style` expects a space-separated list of those.\r\n\r\nIf you set `text-style: bold italic reverse` it works fine.\r\n\r\nIf you set `text-style: none bold italic ...
0762a6b8583ce62890bb5f216b2a4cb1724b1c7d
{ "head_commit": "4a893b5169092336a626d3bc21a3446a64bcce64", "head_commit_message": "Short-circuit text style parsing when unnecessary.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex af9c300121..9d61abc6a3 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -27,6 +27,7 @@ and this project ad...
[ { "diff_hunk": "@@ -891,6 +891,7 @@ def __set__(self, obj: StylesBase, style_flags: Style | str | None):\n Raises:\n StyleValueError: If the value is an invalid style flag\n \"\"\"\n+ print(repr(style_flags))", "line": null, "original_line": 894, "original_start_li...
b6c9eab332f41948372a7e1f6f3e23cddf11a975
diff --git a/CHANGELOG.md b/CHANGELOG.md index 402b8064cc..a3e84657f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fail-fast and print pretty tracebacks for Widget compose errors https://github.com/Textualize/textual/pull/1505 ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-1545@7f6cfdf
Textualize/textual
Python
1,545
Add a textual diagnose CLI command
This, in this early version anyway, emits a simple dump of GitHub-issue-friendly markdown text that lists all of the key information we may want to know when someone using having a problem with Textual. See #1542.
2023-01-11T13:22:40Z
Add 'textual diagnose' CLI command We need a textual diagnose command which writes out some basic diagnostic information. We can ask for this in issue templates. - Textual version - Python version - Path to Python executable - OS - Detect terminal, env vars TERM, COLORTERM, other terminal vars - Output of rich.console...
Thank you for your issue. Give us a little time to review it. PS. You might want to check the [FAQ](https://github.com/textualize/textual/blob/main/FAQ.md) if you haven't done so already. This is an automated reply, generated by [FAQtory](https://github.com/willmcgugan/faqtory)
[ { "body": "We need a textual diagnose command which writes out some basic diagnostic information. We can ask for this in issue templates.\n\n- Textual version\n- Python version\n- Path to Python executable\n- OS\n- Detect terminal, env vars TERM, COLORTERM, other terminal vars\n- Output of rich.console.Console....
1c4fe0c4fb49ad528af860070152deaf7bd97966
{ "head_commit": "7f6cfdf6f1d89d638ab301a31ef7d48597b12015", "head_commit_message": "DRY getting an environment variable representation", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 8cd10be6fb..5a19bc726b 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -14,6 +14,7 @@ and this project ad...
[ { "diff_hunk": "@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).\n - Added read-only public access to the children of a `TreeNode` via `TreeNode.children` https://github.com/Textualize/textual/issues/1398\n - Added `Tree.get_node_by_id` to allow getting a node by its ID h...
05931c448d0a943e117c40512168028dee7c75c4
diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cd10be6fb..af9c300121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added read-only public access to the children of a `TreeNode` via `TreeNode.children` https://github.com/Textuali...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-1116@20f20e3
Textualize/textual
Python
1,116
Let `textual run` run files that don't end in .py
It's not uncommon to create "standalone" commands in Python that don't end in a .py and which: `#!/usr/bin/env python` or a variation on that theme. This commit makes it so that `textual run` will treat a file that's named and set to run like that as if it were a file that ends in .py. See #1106.
2022-11-04T17:24:29Z
Enable `textual run` to run a command that doesn't have a `.py` extension Currently, if you have a Textual app that is in a file that doesn't have a `.py` extension -- something you may do if you're creating a command that uses `#!/usr/bin/env python` to do the expected thing -- `textual run` can't run the command.
[ { "body": "Currently, if you have a Textual app that is in a file that doesn't have a `.py` extension -- something you may do if you're creating a command that uses `#!/usr/bin/env python` to do the expected thing -- `textual run` can't run the command.", "number": 1106, "title": "Enable `textual run` t...
686f27eb3928dea2ab03c32e863cfab7ed1e7e71
{ "head_commit": "20f20e387575de7f11ddd0b96712553a898a3c3b", "head_commit_message": "Let `textual run` run files that don't end in .py\n\nIt's not uncommon to create \"standalone\" commands in Python that don't end\nin a .py and which:\n\n #!/usr/bin/ev python\n\nor a variation on that theme. This commit makes it ...
[ { "diff_hunk": "@@ -16,6 +16,23 @@ class AppFail(Exception):\n pass\n \n \n+def shebang_python(candidate: Path):\n+ \"\"\"Does the given file look like it's run with Python?\n+\n+ Args:\n+ candidate (Path): The candidate file to check.\n+\n+ Returns:\n+ bool: ``True`` if it looks to #...
76360204b57cae07952cdaeb87cc69f4542b079b
diff --git a/src/textual/_import_app.py b/src/textual/_import_app.py index fcd39f9a65..9425a79309 100644 --- a/src/textual/_import_app.py +++ b/src/textual/_import_app.py @@ -16,6 +16,23 @@ class AppFail(Exception): pass +def shebang_python(candidate: Path) -> bool: + """Does the given file look like it's r...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-1495@7779211
Textualize/textual
Python
1,495
Add read-only access to the children of a `TreeNode`
Adds a generic `ImmutableSequence` wrapper class (name and location totally up for debate, although the name of the class got the nod in a Slack chat so I suspect that's okay) and then goes on to use that to wrap the internal child list of a `TreeNode`, making it available in a non-destructive way. See #1398.
2023-01-05T21:28:14Z
[Tree] Make TreeNode an immutable Sequence to allow for walking the tree Especially to allow some initial "just so" setup of a `Tree`, but also to make it easy to write code to walk a `Tree`, it would be useful to have public access to the `children` of a `TreeNode`.
👍 I just needed this for writing code that "focuses" the tree on a specific node, collapsing all nodes other than one specific node. In my use-case I get only the *names* of the nodes (labels), not the nodes themselves, along them path; so have to traverse children. Making the list public invites a few problems. A dev...
[ { "body": "Especially to allow some initial \"just so\" setup of a `Tree`, but also to make it easy to write code to walk a `Tree`, it would be useful to have public access to the `children` of a `TreeNode`.", "number": 1398, "title": "[Tree] Make TreeNode an immutable Sequence to allow for walking the ...
83ce1204b96e9da6bb3415e37306a0af2699c3a6
{ "head_commit": "7779211dcf50449aafa57a556fe91da34b6eaded", "head_commit_message": "Add read-only access to the children of a TreeNode\n\nSee #1398.", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 876edeb4b6..f31ca177a0 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -7,6 +7,10 @@ and th...
[ { "diff_hunk": "@@ -0,0 +1,65 @@\n+\"\"\"Provides collection-based utility code.\"\"\"\n+\n+from __future__ import annotations\n+from typing import Generic, TypeVar, Iterator, overload, Iterable\n+\n+T = TypeVar(\"T\")\n+\n+\n+class ImmutableSequence(Generic[T]):\n+ \"\"\"Class to wrap a sequence of some sor...
02174623980ba1c72b9b01f4baf6d95b012c80c6
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7247eca7d6..6d80e2f628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Added public `TreeNode` label access via `TreeNode.label` https://github.com/Textualize/textual/issu...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
vega__altair-3426@b0d0e5c
vega/altair
Python
3,426
refactor: Remove `toolz` dependency
This PR is a proof-of-concept, entirely* removing the hard dependency on `toolz`. ~~*Excluding usage in tests and twice for a deprecation warning.~~ I've tried to provide reasoning on each commit, but generally, it seemed to me that the behaviour `altair` needs is easily replicated within `stdlib`. ### Addition...
2024-05-26T17:32:55Z
Opt in or opt out on vegafusion dependencies Opening this issue to discuss and collect insights. Currently we have an altair package that relies on a few hard dependencies: ```yaml dependencies = [ "typing_extensions>=4.0.1; python_version<\"3.11\"", "jinja2", "jsonschema>=3.0", "numpy", "pandas>=...
Cross reference https://github.com/altair-viz/altair/issues/2818. I think I would lean toward adding an extra_requires group for the optional dependencies, at least to start with as this would be a non-breaking change. Eventually, I think the altair-base approach is worth considering. But this would need to corresp...
[ { "body": "Opening this issue to discuss and collect insights.\n\nCurrently we have an altair package that relies on a few hard dependencies:\n\n```yaml\ndependencies = [\n \"typing_extensions>=4.0.1; python_version<\\\"3.11\\\"\",\n \"jinja2\",\n \"jsonschema>=3.0\",\n \"numpy\",\n \"pandas>=0.2...
9e2762c6ac9636fd9a3f9e919d33863cf0ce5a18
{ "head_commit": "b0d0e5c6607339db655ef1c5387910adce6a2c46", "head_commit_message": "refactor(typing): Replace single-use `NonLikeDataType` alias with `Union`\n\nSee [review](https://github.com/vega/altair/pull/3426#discussion_r1638030144)\nThe name was not descriptive, and upon further thought, was less helpful th...
[ { "diff_hunk": "@@ -135,12 +146,33 @@ def test_dict_to_csv():\n \"\"\"\n data = _create_data_with_values(10)\n try:\n- result1 = pipe(data, to_csv)\n- result2 = pipe(data, to_csv)\n+ result1 = _pipe(data, to_csv)\n+ result2 = _pipe(data, to_csv)\n filename = resul...
7a84764e9d5fe1bb49d905636a3361ee43c7c8df
diff --git a/altair/__init__.py b/altair/__init__.py index 55feb3cdb..2f9e4acad 100644 --- a/altair/__init__.py +++ b/altair/__init__.py @@ -572,7 +572,6 @@ "concat", "condition", "core", - "curry", "data", "data_transformers", "datum", @@ -591,7 +590,6 @@ "overload", "param",...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Dependency Updates & Env Compatibility" }
Textualize__textual-1546@6999d1a
Textualize/textual
Python
1,546
Make `COMPONENT_CLASSES` inheritable and add classvar to prevent inheritance.
**Please review the following checklist.** - [x] Docstrings on all new or modified functions / classes - ~[ ] Updated documentation~ Currently there's no documentation on `COMPONENT_CLASSES` and my suggestion would be to add it with #1532 - [x] Updated CHANGELOG.md (where appropriate) This fixes #1399
2023-01-11T15:17:47Z
Make `COMPONENT_CLASSES` inheritable Much like `DEFAULT_CSS` and similar things, look at the idea of making `COMPONENT_CLASSES` inheritable. At the moment, if you inherit from a widget that has a `COMPONENT_CLASSES`, and you set your own in your derived widget, you'll erase those of the parent. Right now the best optio...
We found the following entry in the [FAQ](https://github.com/textualize/textual/blob/main/FAQ.md) which you may find helpful: - [Does Textual support images?](https://github.com/textualize/textual/blob/main/FAQ.md#does-textual-support-images) Feel free to close this issue if you found an answer in the FAQ. Otherwise...
[ { "body": "Much like `DEFAULT_CSS` and similar things, look at the idea of making `COMPONENT_CLASSES` inheritable. At the moment, if you inherit from a widget that has a `COMPONENT_CLASSES`, and you set your own in your derived widget, you'll erase those of the parent. Right now the best option is to combine th...
2468a8ca83422194e52f6183e25f11455d8a19c7
{ "head_commit": "6999d1a023a013e5ef9939282db57e61325758a3", "head_commit_message": "Merge branch 'main' into fix-1399", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex af9c300121..1d1c1209ab 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -14,6 +14,7 @@ and this project adheres to [Semanti...
[ { "diff_hunk": "@@ -279,6 +282,25 @@ def get_path(base: Type[DOMNode]) -> str:\n \n return css_stack\n \n+ def get_component_classes(self) -> set[str]:", "line": null, "original_line": 285, "original_start_line": null, "path": "src/textual/dom.py", "start_line": null, "text": ...
974a0b8020f7ec6829d8b9d7507768cc146910e7
diff --git a/CHANGELOG.md b/CHANGELOG.md index 954f3b7d05..53dabe8160 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added read-only public access to the children of a `TreeNode` via `TreeNode.children` https://github.com/Textuali...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-1550@5dbecdd
Textualize/textual
Python
1,550
Allow by-code scrolling even when by-input scrolling would be denied
See #1201. See https://github.com/Textualize/textual/issues/1201#issuecomment-1380123660 though.
2023-01-12T10:37:15Z
Programatic scrolling should work without scrollbars (overflow hidden). Currently if there are no scrollbars, and you call `Widget.scroll_to`, the scrolling us suppressed. This is so that moving the scroll wheel doesn't scroll when the CSS has disabled scrolling. However, some times you may to scroll a container progr...
Quick test code to visually confirm the issue (using `scroll_to_widget`, which I imagine is part of this issue too?): ```python from textual.app import App, ComposeResult from textual.containers import Vertical from textual.widgets import Header, Footer, Button from textual.binding import Binding ...
[ { "body": "Currently if there are no scrollbars, and you call `Widget.scroll_to`, the scrolling us suppressed. This is so that moving the scroll wheel doesn't scroll when the CSS has disabled scrolling.\n\nHowever, some times you may to scroll a container programatically. Suggest we need to differentiate scroll...
23bfb08693974204303d90a555ad8e991656f7c3
{ "head_commit": "5dbecdd834e484ec33cbd2fe90f1a632210ea2d5", "head_commit_message": "Merge branch 'main' into issue/1201/scroll-to-with-code", "patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 402b8064cc..be893a83ed 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -23,6 +23,7 @@ and this proje...
[ { "diff_hunk": "@@ -1853,6 +1902,7 @@ def scroll_visible(\n top (bool, optional): Scroll to top of container. Defaults to False.\n easing (EasingFunction | str | None, optional): An easing method for the scrolling animation. Defaults to \"None\",\n which will result in Te...
6c64773996bf8bba3c61f7718408bc63234e0322
diff --git a/CHANGELOG.md b/CHANGELOG.md index 53dabe8160..39e484376f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added Widget._refresh_scroll to avoid expensive layout when scrolling https://github.com/Textualize/textual/pull/...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "Bug Fixes" }
Textualize__textual-1095@f29015f
Textualize/textual
Python
1,095
Add support for mounting widgets relative to other widgets
Addresses the requirements in #778. In short, `App.mount`, `App.mount_all` and `Widget.mount` now accept either a `before` or `after` keyword argument, which can be an integer, a string selector or a widget, and the new widget(s) will be mounted relative to them. A quick sandbox app for testing some of this would...
2022-11-02T15:24:35Z
mount should have additional options to insert new widgets Currently, mount() inserts new widgets at the end of the list. We should provide some way of inserting widgets at the beginning and arbitrary point. I'm thinking an `before` and `after` parameter which would accept an integer or a CSS query. And insert th...
First thing to do, before tacking this, is to remove support for adding "anonymous" widgets vs "named" widgets. This will mean dropping support in the `App` and `Widget` `mount` methods, and also looking through the code, examples and documentation to remove any use and mention of this. Having tidied up the parameters ...
[ { "body": "Currently, mount() inserts new widgets at the end of the list.\r\n\r\nWe should provide some way of inserting widgets at the beginning and arbitrary point.\r\n\r\nI'm thinking an `before` and `after` parameter which would accept an integer or a CSS query. And insert the new widget at a matching index...
530212fd4bfbff3c60a135bccc71b24c1d9ec66f
{ "head_commit": "f29015f70a1173dd90981eec5ca3a819a5745a95", "head_commit_message": "Add a reminder to the mount tests about query_one\n\nSee https://github.com/Textualize/textual/issues/1096", "patch_to_review": "diff --git a/src/textual/_node_list.py b/src/textual/_node_list.py\nindex fa5570fc48..a2a2d1d783 100...
[ { "diff_hunk": "@@ -13,6 +13,7 @@\n TypeVar,\n cast,\n overload,\n+ Union,", "line": null, "original_line": 16, "original_start_line": null, "path": "src/textual/dom.py", "start_line": null, "text": "@user1:\nIs this used?\n\n@author:\nGood catch, nope. Did a lot of change...
b0d2caf2219d037eec6efd8b64e29ddf1aa41730
diff --git a/src/textual/_node_list.py b/src/textual/_node_list.py index fa5570fc48..5a9a314866 100644 --- a/src/textual/_node_list.py +++ b/src/textual/_node_list.py @@ -39,6 +39,20 @@ def __len__(self) -> int: def __contains__(self, widget: Widget) -> bool: return widget in self._nodes + def index(...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-638@5c86331
Textualize/textual
Python
638
Focus order
Updates focus order to work in left to right then top to bottom order. Anchor point is top left corner of the widget region **including** the margin spacing of the widget.
2022-08-05T09:14:30Z
Better focus order We have a fairly naive approach to the focus order in Textual. Textual will go through widgets in the order they are defined within `children`. What should probably occur is that the children are scanned in the order they appear on screen, i.e. left to right, then top to bottom. We should pr...
I would be happy to help with this.
[ { "body": "We have a fairly naive approach to the focus order in Textual.\r\n\r\nTextual will go through widgets in the order they are defined within `children`.\r\n\r\nWhat should probably occur is that the children are scanned in the order they appear on screen, i.e. left to right, then top to bottom.\r\n\r\n...
7d2b6ac5f2eee25c88c8184ded221caefbe8690d
{ "head_commit": "5c86331c9a0c216399d583df61cf69b0d998b45b", "head_commit_message": "Improve order of focus", "patch_to_review": "diff --git a/sandbox/darren/just_a_box.css b/sandbox/darren/just_a_box.css\nindex 765fd56517..6f4806f828 100644\n--- a/sandbox/darren/just_a_box.css\n+++ b/sandbox/darren/just_a_box.cs...
[ { "diff_hunk": "@@ -596,3 +600,8 @@ def has_pseudo_class(self, *class_names: str) -> bool:\n \n def refresh(self, *, repaint: bool = True, layout: bool = False) -> None:\n pass\n+\n+\n+def _focus_sort_key(widget: Widget) -> tuple[int, int]:", "line": null, "original_line": 605, "original...
3bbbc560f44700beb1434d87445212e7ceef8fdd
diff --git a/sandbox/darren/just_a_box.css b/sandbox/darren/just_a_box.css index 765fd56517..062dff0ec7 100644 --- a/sandbox/darren/just_a_box.css +++ b/sandbox/darren/just_a_box.css @@ -1,6 +1,61 @@ -#box { - height: 50%; - width: 50%; - align: center middle; +Screen { + height: 100vh; + width: 100%; + ...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "New Feature Additions" }
Textualize__textual-1408@c7c352a
Textualize/textual
Python
1,408
Review styles reference
**Please review the following checklist.** - [x] Updated documentation – well, that _is_ the point of this PR :D - [ ] Updated CHANGELOG.md (where appropriate)
2022-12-20T09:26:09Z
Review Styles Reference Some CSS rules have missing values documented. We should review all the CSS rules un the reference section of the docs, to add anything missing. Document CSS units We need to document Textual CSS units (%, vw, fr etc). Where do we put them? I have a feeling this should go in the guide in a sec...
Pages in the reference and status tracker: - [x] align (added an example with a complete alignment grid) - [x] background (added example with different transparencies; improved `Color` documentation to make it clearer what color formats are accepted; added a couple more examples to the CSS and Python ways of changin...
[ { "body": "Some CSS rules have missing values documented. We should review all the CSS rules un the reference section of the docs, to add anything missing.", "number": 1340, "title": "Review Styles Reference" }, { "body": "We need to document Textual CSS units (%, vw, fr etc).\n\nWhere do we put...
86e873888273144f7c865151811bfbce11c0f822
{ "head_commit": "c7c352a38a3fa95c74bd6a0d002703cb013c8810", "head_commit_message": "Replace statics with labels.\n\n[skip ci]", "patch_to_review": "diff --git a/docs/css_types/_template.md b/docs/css_types/_template.md\nnew file mode 100644\nindex 0000000000..c9fe058d42\n--- /dev/null\n+++ b/docs/css_types/_temp...
[ { "diff_hunk": "@@ -0,0 +1,59 @@\n+# &lt;border&gt;\n+\n+The `<border>` CSS type represents a border style.\n+\n+## Syntax\n+\n+--8<-- \"docs/snippets/type_syntax/border.md\"\n+\n+## Border command\n+\n+The `textual` CLI has a subcommand which will let you explore the various border types interactively, when ap...
d9a0c343d7be717fbe646dada7b1ae302e6ffe1e
diff --git a/docs/blog/posts/spinners-and-pbs-in-textual.md b/docs/blog/posts/spinners-and-pbs-in-textual.md index a92ba590a5..daa6b774ff 100644 --- a/docs/blog/posts/spinners-and-pbs-in-textual.md +++ b/docs/blog/posts/spinners-and-pbs-in-textual.md @@ -396,7 +396,7 @@ Below you can see the code I wrote and a short an...
{ "difficulty": "low", "estimated_review_effort": 3, "problem_domain": "Documentation Updates" }
Textualize__textual-595@972aeec
Textualize/textual
Python
595
User CSS should always take precedence over Widget CSS
Adds an additional (greater) level of specificity (`Specificity5`), which means user-defined CSS (i.e. that inside a `.css` file) _always_ takes precedence over CSS defined inside the `CSS` class var.
2022-06-28T16:31:44Z
Default versus User CSS We have CSS specified within a widget (default CSS) and CSS specified in an external file. They are currently considered the same as far as the Textual CSS parser is concerned. We should probably treat default CSS as always having lower specificity than user specificity. This should make it e...
@darrenburns assigned this to you since it impacts your work on buttons.
[ { "body": "We have CSS specified within a widget (default CSS) and CSS specified in an external file. They are currently considered the same as far as the Textual CSS parser is concerned.\r\n\r\nWe should probably treat default CSS as always having lower specificity than user specificity. This should make it ea...
32c34d1e5427879fc0d3e8073d60019850764d4e
{ "head_commit": "972aeece649bc2f1eaa74378c1c43e06b3ffad74", "head_commit_message": "Add Specificity5 for user defined CSS", "patch_to_review": "diff --git a/sandbox/darren/buttons.css b/sandbox/darren/buttons.css\nnew file mode 100644\nindex 0000000000..cedf20ded1\n--- /dev/null\n+++ b/sandbox/darren/buttons.css...
[ { "diff_hunk": "@@ -199,13 +206,17 @@ def read(self, filename: str | PurePath) -> None:\n self.source[str(path)] = css\n self._require_parse = True\n \n- def add_source(self, css: str, path: str | PurePath | None = None) -> None:\n+ def add_source(\n+ self, css: str, path: str | Pur...
908e2e940ac19f3bde1896bd6cde7b9eeda0fcf8
diff --git a/sandbox/darren/buttons.css b/sandbox/darren/buttons.css new file mode 100644 index 0000000000..cedf20ded1 --- /dev/null +++ b/sandbox/darren/buttons.css @@ -0,0 +1,4 @@ +Button { + padding-left: 1; + padding-right: 1; +} diff --git a/sandbox/darren/buttons.py b/sandbox/darren/buttons.py new file mode...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Code Refactoring / Architectural Improvement" }
Textualize__textual-575@2a90897
Textualize/textual
Python
575
Add success/warning/error button variants
I kept the primary button as is on dark mode. I think I'd prefer if it was the blue/primary background colour on both light and dark mode, but not too fussed either way. One kind of annoying thing is the "success" button is the only one where, on hover, the text colour changes. https://user-images.githubuserconte...
2022-06-10T14:06:09Z
Button styles The button widget could use a number of different semantic styles, namely default, success, warn, fail These should be modelled in `Button.CSS` and use the design system colors. We also need dark variations for each. In the css, the class `-success` etc should set the style. We could let the dev set...
What's the `-` prefix on `success` for? Seems surprising to me (and like something I'd forget about constantly). It's a convention from a CSS style guide (I forget which) that says it's a modifier rule. Something you might toggle on and off. I'm not really following where this would be used vs where it wouldn't. A "suc...
[ { "body": "The button widget could use a number of different semantic styles, namely default, success, warn, fail\r\n\r\nThese should be modelled in `Button.CSS` and use the design system colors. We also need dark variations for each.\r\n\r\nIn the css, the class `-success` etc should set the style. We could le...
fe151a7f25cfd7f1134ebafbddc7eeade1c18ccb
{ "head_commit": "2a90897bd3b64852c97b79da084ae8f1bb9ad471", "head_commit_message": "Tidying Button widget-level CSS", "patch_to_review": "diff --git a/sandbox/buttons.css b/sandbox/buttons.css\nindex 77ff5c379d..cedf20ded1 100644\n--- a/sandbox/buttons.css\n+++ b/sandbox/buttons.css\n@@ -1,12 +1,4 @@\n-#foo {\n-...
[ { "diff_hunk": "@@ -100,3 +205,93 @@ async def on_click(self, event: events.Click) -> None:\n async def on_key(self, event: events.Key) -> None:\n if event.key == \"enter\" and not self.disabled:\n await self.emit(Button.Pressed(self))\n+\n+ @staticmethod", "line": null, "orig...
7e27298845630065efac953709cb2ab89954b42a
diff --git a/sandbox/buttons.css b/sandbox/buttons.css index 77ff5c379d..cedf20ded1 100644 --- a/sandbox/buttons.css +++ b/sandbox/buttons.css @@ -1,12 +1,4 @@ -#foo { - text-style: underline; - background: rebeccapurple; -} - -*:focus { - tint: yellow 50%; -} - -#foo:hover { - background: greenyellow; +But...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
vega__altair-2823@2a32ff7
vega/altair
Python
2,823
Expand mark spec when using to_dict
Suggestion to close https://github.com/altair-viz/altair/issues/2508. To test that the correct chart was created, (e.g. in a student assignment), it would be quite useful it if was possible to test that the functionality of the chart was the same, even if a slightly different syntax was used to create it. Currently...
2023-01-09T08:39:34Z
Add a method to always return the long/most verbose version of a chart spec To test that the correct chart was created, (e.g. in a student assignment), it would be quite useful it if was possible to convert a chart to the most verbose version of the vega spec. For example, using `mark_point()` will set `chart.mark` to ...
Can you clarify what you mean by "the most verbose"? For example, if you have something like ```python chart.encode(x='x') ``` do you want the result to look something like this? ``` spec = {'encoding': {'x': {'field': 'x', 'type': 'quantitative', 'axis': {}, 'scale': {'bins': {}, ...}, ...}}} ``` I was mainly t...
[ { "body": "To test that the correct chart was created, (e.g. in a student assignment), it would be quite useful it if was possible to convert a chart to the most verbose version of the vega spec. For example, using `mark_point()` will set `chart.mark` to `'point'`, whereas using `mark_point(opacity=0.5)` will i...
b42ecdf790c2385fce640ee37de33aafd9694eb4
{ "head_commit": "2a32ff7d15b7b5b430f3b4a93225ae927eaf6920", "head_commit_message": "Fix failing test and update docs", "patch_to_review": "diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py\nindex 4471c65ca..227ef1091 100644\n--- a/altair/utils/schemapi.py\n+++ b/altair/utils/schemapi.py\n@@ -374,6...
[ { "diff_hunk": "@@ -61,7 +61,7 @@ The contents of the resulting file will look something like this:\n \"type\": \"quantitative\"\n }\n },\n- \"mark\": \"point\"\n+ \"mark\": {\"type\": \"point\"},", "line": null, "original_line": 64, "original_start_line": null, ...
7d14d14a8fe426a6a1af3f5a6f819ae29ca2a8a7
diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py index 0c8f9b274..270a6c6d3 100644 --- a/altair/utils/schemapi.py +++ b/altair/utils/schemapi.py @@ -406,6 +406,8 @@ def to_dict(self, validate=True, ignore=None, context=None): kwds = { k: v for k, v in kwds.items() if k not ...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-319@c483391
Textualize/textual
Python
319
Regions
Closes #315
2022-03-02T15:46:23Z
Overlapping region resolver We need a container class which manages overlapping regions. Internally it will act like a container of Region objects (probably a simple list). Additionally there will be a method which generates a sequence of Region objects which cover the same area, but with no overlapping. Discuss ...
[ { "body": "We need a container class which manages overlapping regions. Internally it will act like a container of Region objects (probably a simple list).\r\n\r\nAdditionally there will be a method which generates a sequence of Region objects which cover the same area, but with no overlapping.\r\n\r\nDiscuss w...
d01a35dd5a75f480252cf441734b96b65dae2169
{ "head_commit": "c4833918a9b87636ccc7b39610f563b9c27b4094", "head_commit_message": "Ensure adjacent ranges are merged in RegionGroup", "patch_to_review": "diff --git a/.gitignore b/.gitignore\nindex bc0dfdb715..a205487359 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -2,6 +2,7 @@\n .pytype\n .DS_Store\n .vscode...
[ { "diff_hunk": "@@ -0,0 +1,57 @@\n+from __future__ import annotations\n+\n+from collections import defaultdict\n+from operator import attrgetter\n+from typing import NamedTuple, Iterable\n+\n+from src.textual.geometry import Region\n+\n+\n+class InlineRange(NamedTuple):\n+ \"\"\"Represents a region on a sing...
7939a8eaa8b5c76be354d6226c939be93a481cb5
diff --git a/.gitignore b/.gitignore index bc0dfdb715..a205487359 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .pytype .DS_Store .vscode +.idea mypy_report docs/build docs/source/_build diff --git a/src/textual/_region_group.py b/src/textual/_region_group.py new file mode 100644 index 0000000000..0960...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }
Textualize__textual-570@0125fbd
Textualize/textual
Python
570
XTerm parsing improvements
- Added a unit test suite covering the XTermParser code - Fixes freeze/hanging issue: When a candidate escape sequence grows in length to exceed a threshold, or when another \x1b is found, it'll backtrack and treat the characters until that point as keypresses (and escape codes that follow the non-matched sequence won...
2022-06-09T16:37:52Z
Unknown escape sequences shouldn't cause freeze (e.g. `^[d`, `^[f`, `^[b`) These sequences get sent by iTerm when natural text editing mode is on by default. They also get sent by default by Terminal.app, so pressing Option + Left, Option + Right, Option + Delete in that also results in a crash. They're and to m...
At the moment we have no way to recover there is a timeout, which could lead to missing keys or garbage keys. We should parse the keys more intelligently though. So we can recover from an unknown key.
[ { "body": "These sequences get sent by iTerm when natural text editing mode is on by default. \r\n\r\nThey also get sent by default by Terminal.app, so pressing Option + Left, Option + Right, Option + Delete in that also results in a crash.\r\n\r\nThey're and to move the cursor back and forward by full words, a...
fe151a7f25cfd7f1134ebafbddc7eeade1c18ccb
{ "head_commit": "0125fbdd4feebcc678bc9feae558908f4600224c", "head_commit_message": "Add test around non-escape code input mapping to keys", "patch_to_review": "diff --git a/src/textual/_parser.py b/src/textual/_parser.py\nindex 3ae16bf3f3..f01ca6f562 100644\n--- a/src/textual/_parser.py\n+++ b/src/textual/_parse...
[ { "diff_hunk": "@@ -30,7 +36,7 @@ def __init__(\n self.last_x = 0\n self.last_y = 0\n \n- self._debug_log_file = open(\"keys.log\", \"wt\") if debug else None\n+ self._debug_log_file = open(\"keys.log\", \"wt\")", "line": null, "original_line": 39, "original_start_line"...
e1c85987a70b562821838e640762cbc21c36677e
diff --git a/src/textual/_parser.py b/src/textual/_parser.py index 3ae16bf3f3..f01ca6f562 100644 --- a/src/textual/_parser.py +++ b/src/textual/_parser.py @@ -166,7 +166,6 @@ class TestParser(Parser[str]): def parse( self, on_token: Callable[[str], None] ) -> Generator[Awaitable, str, Non...
{ "difficulty": "medium", "estimated_review_effort": 4, "problem_domain": "Bug Fixes" }
Textualize__textual-246@776284d
Textualize/textual
Python
246
Underline bar renderable
Naming is hard :) more than happy to hear suggestions for the params etc. Closes #238
2022-01-31T13:04:35Z
Implement a bar renderable for tabbed dialogs Implement a renderable used to underline tabs in a tabbed dialog. This renderable should use the same unicode characters as Rich progress bars. It should render a line with a portion in a different color extending from p1 to p2. Also add the option to not render the h...
[ { "body": "Implement a renderable used to underline tabs in a tabbed dialog.\r\n\r\nThis renderable should use the same unicode characters as Rich progress bars. It should render a line with a portion in a different color extending from p1 to p2.\r\n\r\nAlso add the option to not render the highlight and just t...
3574a6da172c98a43f813033f39c610d5a3afd84
{ "head_commit": "776284ddd0e2075d40a3cae7d965159f2daf9ec4", "head_commit_message": "Ensure we clamp range properly, passing Styles directly", "patch_to_review": "diff --git a/src/textual/renderables/__init__.py b/src/textual/renderables/__init__.py\nnew file mode 100644\nindex 0000000000..e69de29bb2\ndiff --git ...
[ { "diff_hunk": "@@ -0,0 +1,127 @@\n+from __future__ import annotations\n+\n+from rich.console import ConsoleOptions, Console, RenderResult\n+from rich.segment import Segment\n+from rich.style import Style, StyleType\n+\n+\n+class UnderlineBar:\n+ \"\"\"Thin horizontal bar with a portion highlighted.\n+\n+ ...
65eb1b0b4f90682869f54ddac6ca2881f4b7ad2d
diff --git a/src/textual/renderables/__init__.py b/src/textual/renderables/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/textual/renderables/underline_bar.py b/src/textual/renderables/underline_bar.py new file mode 100644 index 0000000000..59c9e6bb40 --- /dev/null +++ b/src/textual/rend...
{ "difficulty": "medium", "estimated_review_effort": 3, "problem_domain": "New Feature Additions" }