Also expand parameters in lists of strings - #333
Conversation
|
Pointers on where to add a test would be appreciated if you want one. |
tests/test_api.py is probably the best place for those tests. |
|
Hi there, thank you for your contribution! This pull request has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this pull request to remain open please:
NOTE: If this pull request was closed prematurely, please leave a comment. Thanks! |
|
Not stale - this is a helpful addition, it just needs some tests. |
a15d12c to
d67aedb
Compare
d67aedb to
0796c50
Compare
|
kind ping |
46dd017 to
d59e2aa
Compare
<details><summary>Claude's draft</summary> Refresh this staging branch onto the current feedstock main (menuinst 2.5.2, rattler-build v1 recipe) and carry all four of my open conda/menuinst pull requests as source patches: - 333.patch — conda/menuinst#333 Expand placeholders in lists of strings, not just scalars. - 334.patch — conda/menuinst#334 Allow name/command/StartupWMClass/TryExec to be specified per target_environment_is_base, and add the linux `run_in_bash` key. Rebased onto upstream main: `min_items` -> `min_length` for pydantic v2, `Optional[A, B]` -> `Optional[Union[A, B]]`, and SCHEMA_VERSION bumped to 1-1-4 with the generated schema/default JSON regenerated so `run_in_bash` has a default to resolve against. - 535.patch — conda/menuinst#535 Restore the missing f-string prefix on the Icon= desktop entry line. - 536.patch — conda/menuinst#536 Pass the opened file or URL to Linux shortcuts via an Exec field code. 334 and 536 both rewrite LinuxMenuItem._command; 536.patch carries the merged form, which keeps the field-code "$@" trick for the bash-wrapped case and appends the field code directly when run_in_bash is false. Build number bumped by 100 and the build restricted to linux-64, since this is a staging branch for my own channel. Resume this Claude session: ``` cd /home/mark/git/feedstock/menuinst-feedstock claude --resume b888d0ac-7cec-4e1e-ac68-9c15e6554011 ``` </details> Claude-Session: https://claude.ai/code/session_0135Eijr6BTzjVHcRcn3JP8w
<details><summary>Claude's draft</summary> Refresh this staging branch onto the current feedstock main (menuinst 2.5.2, rattler-build v1 recipe) and carry all four of my open conda/menuinst pull requests as source patches: - 333.patch — conda/menuinst#333 Expand placeholders in lists of strings, not just scalars. - 334.patch — conda/menuinst#334 Allow name/command/StartupWMClass/TryExec to be specified per target_environment_is_base, and add the linux `run_in_bash` key. Rebased onto upstream main: `min_items` -> `min_length` for pydantic v2, `Optional[A, B]` -> `Optional[Union[A, B]]`, and SCHEMA_VERSION bumped to 1-1-4 with the generated schema/default JSON regenerated so `run_in_bash` has a default to resolve against. - 535.patch — conda/menuinst#535 Restore the missing f-string prefix on the Icon= desktop entry line. - 536.patch — conda/menuinst#536 Pass the opened file or URL to Linux shortcuts via an Exec field code. 334 and 536 both rewrite LinuxMenuItem._command; 536.patch carries the merged form, which keeps the field-code "$@" trick for the bash-wrapped case and appends the field code directly when run_in_bash is false. Build number bumped by 100 so this can be uploaded to my own channel. All platforms stay enabled. Resume this Claude session: ``` cd /home/mark/git/feedstock/menuinst-feedstock claude --resume b888d0ac-7cec-4e1e-ac68-9c15e6554011 ``` </details> Claude-Session: https://claude.ai/code/session_0135Eijr6BTzjVHcRcn3JP8w
<details><summary>Claude's draft</summary> Rebased onto the noarch-except-windows branch (conda-forge#67) so this staging build produces one noarch package plus the Windows builds. Carry all four of my open conda/menuinst pull requests as source patches: - 333.patch — conda/menuinst#333 Expand placeholders in lists of strings, not just scalars. - 334.patch — conda/menuinst#334 Allow name/command/StartupWMClass/TryExec to be specified per target_environment_is_base, and add the linux `run_in_bash` key. Rebased onto upstream main: `min_items` -> `min_length` for pydantic v2, `Optional[A, B]` -> `Optional[Union[A, B]]`, and SCHEMA_VERSION bumped to 1-1-4 with the generated schema/default JSON regenerated so `run_in_bash` has a default to resolve against. - 535.patch — conda/menuinst#535 Restore the missing f-string prefix on the Icon= desktop entry line. - 536.patch — conda/menuinst#536 Pass the opened file or URL to Linux shortcuts via an Exec field code. 334 and 536 both rewrite LinuxMenuItem._command; 536.patch carries the merged form, which keeps the field-code "$@" trick for the bash-wrapped case and appends the field code directly when run_in_bash is false. Build number bumped by 100 over the base so this can be uploaded to my own channel. Resume this Claude session: ``` cd /home/mark/git/feedstock/menuinst-feedstock claude --resume b888d0ac-7cec-4e1e-ac68-9c15e6554011 ``` </details> Claude-Session: https://claude.ai/code/session_0135Eijr6BTzjVHcRcn3JP8w
|
@hmaarrfk can you resolve the merge conflicts? I will take a look when they are resolved. |
Previously if one had a list of strings, expressions such as
{{ PREFIX }} or {{ ENV_NAME }} would not get expanded
- [ ] Add a test
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
<details><summary>Claude's draft</summary> Add `test_render_expands_placeholders_in_lists` covering the new `Menu.render` behavior: placeholders are now expanded element-wise in lists and tuples of strings, while non-string items are returned untouched and scalar strings behave as before. Resume this Claude session: ``` cd /Users/mark/git/feedstocks/menuinst claude --resume 6d4c7180-d5eb-4848-baf7-d9c3bded4784 ``` </details>
<details><summary>Claude's draft</summary> Add `news/333-render-lists` documenting the fix under "Bug fixes": `Menu.render` now expands placeholders in lists and tuples of strings instead of returning them unchanged. Filed as a bug fix rather than an enhancement because `MenuItem.render` already iterated lists element-wise; only the base `Menu.render` bailed out early, so the two rendering entry points disagreed. Resume this Claude session: ``` cd /home/mark/git/feedstock claude --resume cc4f79cc-0611-4c23-a969-4227b4debe3e ``` </details>
d59e2aa to
c115a3e
Compare
|
Done. I don't think the current failure is due to me. |
Previously if one had a list of strings, expressions such as {{ PREFIX }} or {{ ENV_NAME }} would not get expanded
Description
I wanted to write a command that looks like
{{ PREFIX }}/bin/my_app-{{ ENV_NAME }}Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?