Allow renaming keys added by CallsiteParameterAdder
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
Research direction
Start by reading the CallsiteParameterAdder initializer and its tests for the existing parameters argument. Compare the proposed mapping form with the current collection behavior, then check what tests cover the added keys. Done means users can choose output keys while the existing collection form remains compatible; a linked open pull request already addresses this issue.
Written by the indexing model from the issue text.
Description
Currently, CallsiteParameterAdder always adds each parameter under a predetermined key. It would be nice if the user can specify an alternate key for each parameter instead.
A pretty simple to implement and fully backwards compatible way would be to change the init method from
def __init__(
self,
parameters: Collection[CallsiteParameter] = _all_parameters,
additional_ignores: list[str] | None = None,
) -> None:
to
def __init__(
self,
parameters: Collection[CallsiteParameter] | Mapping[str, CallsiteParameter] = _all_parameters,
additional_ignores: list[str] | None = None,
) -> None:
The user can then instantiate the processor as
CallsiteParameterAdder({"tid": allsiteParameter.THREAD, "pid": allsiteParameter.PROCESS})
- Dominant language
- Python
- Stars
- 5k
- Forks
- 302
- Avg merge
- 17m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hynek/structlog
-
bind_contextvars is not thread-safe?Possibly taken @nosmile99 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Transform examples in docs into included source filesPossibly taken @alexchen-sys claimed this 100 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
waiting for feedback
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Project submission:Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
slavakurilyak/awesome-ai-agents#845 ·
Maintainers usually reply within 1 day
-
tests: pin that the atomic writers in utils/paths.py stage the temporary file in the target's directoryPossibly taken A pull request linked to this issue is open or already merged. Opendifficulty:2 enhancement good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
MakazhanAlpamys/Soup#2178 ·
Maintainers usually reply within 1 day
-
[BUG] dcg.waggr permutation p-values are folded twice, so near-zero scores get the smallest p-valuesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
scverse/rapids-singlecell#854 ·
Maintainers usually reply within 1 day
-
Slang input: int8_t4_packed and uint8_t4_packed are copied into CrossGLPossibly taken @ninglinLiu claimed this today. Openarea:frontend backend:slang bug direction:input
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 13 days