Repository navigation
irspec session DIR --preview: every spectrum drawn as text before anything is filed - #4
Merged
Merged
Conversation
…awn as text, nothing written
Dry run that shows more than --dry-run: prints the moves as --dry-run does, then the
`irspec preview` text of each spectrum (loose or filed), headed by the title and the
csv/ and plain/ names it will get; img/ pictures are listed, not drawn. --json prints
{"moves","spectra","images"}. Reuses organize(dry_run=True), build_manifest (now takes
files not yet filed) and preview.work_out_entry/render. Roadmap 1c, second part.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UFRe77TjiXkrJrN11L1uwj
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.
Roadmap 1c, second part:
irspec session DIR --preview [--width N] [--height N] [--ascii] [--json].What it does
--dry-rundoes, then, for every spectrum in DIR (loose, or already inSPA/andjdx/), the same textirspec previewprints, headed by the title and thecsv/andplain/names the file will get.img/pictures are listed with their planned names and a note thatsessiondigitizes them; they are not drawn.manifest.json(peaks, titles) and--title STEM=TITLEare honoured.--previewwith--dry-runmeans the same as--preview; plain--dry-runoutput is unchanged.--jsonprints exactly one object{"moves", "spectra", "images"}. Each spectrum is theirspec preview --jsonobject pluswill_be_filed_as(andtitle,csv,plain).--width/--heightis too small. Exit 1: some spectrum could not be read; it is listed with its error and the others are still shown.How
organize(dry_run=True)for the moves,build_manifest(new optionalplannedargument: files not yet filed count as on disk and are read from where they lie;default_titlegets a matchingpathargument), andpreview.work_out_entry/render(work_outsplit in two;public()split out ofmain). No second picking or limit computation.tests/test_session_preview.py(19 tests): unchanged tree listing with sizes and mtimes (loose and filed folders, text,--json,--dry-run,--build/--formats), golden text for the sample.SPA, headers for the.jdxfixtures, manifest and--titlehonoured, pictures,--jsonshape, peaks andyminequal to what a realsession --build nonethen writes tomanifest.jsonandfigures.json, an unreadable file, QUANT-IR withoutpeak_a, exit 2 cases,--dry-rununchanged.session.py(writing a folder, dropping planned files, moves not printed, swapped csv/plain names, manifest ignored, exit code, absolute paths in errors, images drawn, unchecked width, extra stdout in--json, ...); all killed except one equivalent (text rendered but not printed under--json). One surviving title path got its own test, which then killed it.## Unreleased) and roadmap 1c updated.__version__not bumped, nothing tagged.Test result
Whole suite in a throwaway venv:
Ran 176 tests, OK (skipped=18). The skips are the tests that need lualatex, R, poppler or MuPDF, or the author's LR6 folders; this change does not touch those paths.Do not merge: for the author's review.
Generated by Claude Code