Skip to content

Union refactor followup - #2753

Merged
Lomholy merged 545 commits into
mccode-dev:union_refactor_scattering_while_loopfrom
mads-bertelsen-agentic:union-refactor-followup
Oct 5, 2026
Merged

Lomholy merged 545 commits into
mccode-dev:union_refactor_scattering_while_loopfrom
mads-bertelsen-agentic:union-refactor-followup

Conversation

@mads-bertelsen-agentic

Copy link
Copy Markdown
Contributor

Merging new developments on main into the refactor and solving the merge conflicts.

The hand-rolled Unix linker flags (-Wl,-rpath,... -L... -l...) broke the
Windows CI build, since the MSVC cl.exe compiler does not understand that
syntax. NCrystal_process.comp and Many_meshes.instr already use
@NCRYSTALFLAGS@ for exactly this reason; switching to it here makes the flags
platform-independent as suggested by P. Willendrup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tically

write_browse() no longer shells out to `npm run dev` (Vite dev server) to
view a trace - dist/ is a self-contained, hashed Vite production build, so
the stdlib ThreadingHTTPServer serves it directly with no Node/npm/vite
runtime dependency and no per-launch startup cost.

This removes the whole per-user ~/.mcstas/<ver>/webgl deployment: no more
node_modules symlink/junction, no start-vite.js, no first-launch
npminstall requiring internet access. mcdisplay.py now always reads dist/
from wherever it's installed (conda env or dev checkout) and only builds
it once, in place, if it's ever missing.

npminstall(.bat).in simplified to match: build directly next to the
source files instead of copying everything into a per-user folder first.

CMakeLists.txt: drop the empty node_modules install and start-vite.js
(unused now); add model/, vite.config.mts, tsconfig*.json so the fallback
`npm run build` matches a real dev build; drop nodejs/npm/rsync as a
package runtime dependency, since dist/ ships pre-built.

vite.config.mts: remove the vite-plugin-static-copy step - it pointed at
placeholder paths ("path/to/particles.json") that never existed as real
files, and was always dead since vite.config.mts was never previously
shipped to end users. instrument.json/particles.json are per-run outputs
write_browse() already writes directly into the served directory.

package.json: move build-only packages (vite, @vitejs/plugin-react,
@types/*) into devDependencies; drop the now-unused
vite-plugin-static-copy dependency.

Verified end-to-end on macOS: cold `npm install && npm run build` from
exactly what CMakeLists.txt now ships, served via the new stdlib server,
and a real instrument trace through mcdisplay-webgl.
mcdisplay-webgl: drop Vite/npm from the runtime path
…nD-scintillator

Add Union_abs_logger_nD_scintillator component and test instrument
(use platform-specific @XRLFLAGS@ to inject an xraylib/ folder if required,
see cmake/Modules/PlatformDefaults.cmake if needed)
…lay_conics_fix

Fix Conics display and particle trace parsing
…nitor_nd_workaround

nvc >= 26.5 Monitor_nd workaround
farhi and others added 29 commits October 4, 2026 09:45
I'll look at mcdoc's doc-string parsing in your McCode checkout and make a minimal fix.

The parsing lives in `mccodelib/utils.py`; let me look at `parse_header`.

Now a quick check against a synthetic header with a wrapped parameter description.

Copy-over failed, so I'll exercise the patched loop verbatim in the workspace.

mcdoc now joins parameter descriptions that wrap over several lines into one description, so they show up in full in the HTML, Markdown and LaTeX output. Before this, everything after the first line was silently dropped.

The fix is a 9-line addition to `parse_header()` in `tools/Python/mccodelib/utils.py`, which is where mcdoc reads the file headers. `mcdoc.py` itself is unchanged.

- **How it works:** after a `name: [unit] text` line, any following non-blank line is added to that parameter's description. Joining stops at a blank line, a `%` tag, a `/` line, or the next parameter.
- **What stays the same:** headers with only single-line descriptions parse exactly as before.
- **Testing:** I ran the new loop on a sample header with a three-line description, and it came out as one joined description. I couldn't copy `utils.py` into my workspace, so I tested a copy of the loop rather than the file itself, and haven't run `mcdoc` on your machine.

A wrapped line that starts like a new parameter (for example `Note: see below`) is still read as a new parameter entry. That's how the parser already worked, and I left it alone to keep the change small.
…iline-parm-docstrings

Tiny mcdoc change for mcdoc to parse multiline parm-docstrings.
…er-updates

Ai driven doc header updates and CI-improvements
* mcxtrace: SOLEIL: add PUMA BL

* X: PUMA: add target test value

* AI-drafted input descriptions/doc-strings

* Only use single-line parameter doc strings

---------

Co-authored-by: Peter Willendrup <pkwi@fysik.dtu.dk>
…ore-release

DOC and Manual refresh branch: Finalize here and merge before release
@Lomholy
Lomholy merged commit a99f57c into mccode-dev:union_refactor_scattering_while_loop Oct 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.