Repository navigation
Template 0.1.42: exclude menuinst 2.5.2; bump a wrapped conclusion_text - #66
Merged
Merged
Conversation
environment.yaml asks for menuinst>=2,!=2.5.2: menuinst 2.5.2 writes
Icon={_escape_desktop_string(self.render_key('icon')} unrendered into the
Linux .desktop file, so the menu entry has no icon (conda/menuinst#535,
fixed upstream, not released).
bump_version.py joins a conclusion_text written as a plain scalar over
several lines (the initialiser wraps it for a long project name) before
it updates the version, so the installer's last page names the release
version (LabConstrictor-CAREamics 0.0.3 said 0.0.2).
Migration 0.1.41 -> 0.1.42 changes only the `- menuinst>=2` line of an
app's environment.yaml (another menuinst requirement is skipped with a
by-hand note; no line is added) and replaces bump_version.py when it is
the 0.1.41 template file (a customised one is skipped with a note).
Tests: tests/test_template_sync_0_1_42.py; older tests see the 0.1.41
files through tests/_v0_1_42.py (before_0_1_42).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp98bPNSUhQXHiLUjA8h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Template 0.1.42, with migration 0.1.41 -> 0.1.42. Design note:
.tools/docs/migration_0_1_42.md(not listed in the docs README, like the other design notes).1. menuinst 2.5.2 is excluded
menuinst 2.5.2 writes
Icon={_escape_desktop_string(self.render_key('icon')}into Linux.desktopfiles without rendering it, so the app's menu entry has no icon. A real install confirmed it: 2.5.1 writes the icon path and 2.5.2 writes the broken line. The fix is merged upstream (conda/menuinst#535) but not released yet.environment.yamlchanges from- menuinst>=2to- menuinst>=2,!=2.5.2.2. A wrapped
conclusion_textnow gets its version bumpedbump_construct_textin.tools/python/bump_version.pyupdated the version inconclusion_textonly when the value was on one line. For a long project name, the repository initialiser writes the value wrapped as a plain multi-line scalar:That value was never updated, so the installer's last page named the previous version. This happened to LabConstrictor-CAREamics 0.0.3. The new
join_wrapped_conclusionfirst joins the continuation lines into one line, which is how YAML reads them: the non-blank lines more indented than the key. The existing one-line update then runs, so the release writes the value on one line with the new version. These cases behave as before: a quoted one-line value, a bare one-line value and theVERSION_NUMBERplaceholder. A quoted or block (|/>) value is not joined. CRLF is kept.What the migration does to an app
environment.yaml: only one line changes (a line-level edit, so the app's other lines stay as they are).- menuinst>=2becomes- menuinst>=2,!=2.5.2, keeping any trailing comment and the file's line endings.menuinst>=2,!=2.5.2, the file is reported as already up to date.bump_version.py: replaced whole when it is still the 0.1.41 template file. This is compared with LF line endings against the frozen copy in.template_sync/resources/v0_1_41_to_v0_1_42/previous/. The file keeps its own line endings. A customised file is left as it is and reported as SKIPPED, with what to change by hand.construct.yamlitself is not edited: the app's next release writesconclusion_texton one line.Tests
tests/test_template_sync_0_1_42.pycovers:environment.yamlexcluding 2.5.2;before_0_1_42;environment.yaml, where only the menuinst line changes;environment.yamlwith no menuinst line;bump_version.py, which is skipped;bump_construct_texton a wrapped plain scalar (0.0.2 -> 0.0.3gives one line with0.0.3, LF and CRLF), a value wrapped from the key line, a one-line quoted value, a one-line bare value and theVERSION_NUMBERplaceholder, and that the 0.1.41 script missed the wrapped value.tests/_v0_1_42.py(before_0_1_42) is called first by_v0_1_41.before_0_1_41, so the older tests keep seeing the 0.1.41 files.tests/test_template_sync_0_1_25.pynow comparesbump_version.pywith the file as 0.1.25 left it, not with the live file, following the same pattern asat_0_1_31in the 0.1.31 tests..github/workflows/tests.yml):python -m pytest tests -q: 588 passed, 1599 subtests passed.ruff check .template_sync .tools/python tests: all checks passed.python -m mypy .template_sync .tools/python tests: no issues found in 119 source files.Generated by Claude Code