Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 17:55
· 345 commits to main since this release

Added

  • pymcnp check reports lines wider than 80 columns as errors and the first card PyMCNP cannot parse as a warning, with line numbers. Checking stops at that card, so rerun it after fixing.
  • pymcnp check --diff shows the changes --fix would make.
  • pymcnp visualize --cells-skip and --surfaces-skip also work with --pdf.
  • CONTRIBUTING.md, now also used for the documentation's contributing page.
  • Roundtrip tests for the example inputs, including a run through MCNP when mcnp6 is installed.
  • Continuous integration builds the package (with twine check) and the documentation.

Changed

  • Breaking: pymcnp check exit codes: lines over 80 columns exit 1, files PyMCNP cannot parse exit 3, and a bad path exits 2. --fix no longer rewrites a file PyMCNP cannot parse.
  • Breaking: Integer fields reject non-integral values such as 2.5 instead of truncating them.
  • Breaking: removed the unused Tally_8 block, superseded by Tally_8A and Tally_8B.
  • Written cards wrap at 80 columns with & continuation and a 5-space indent.
  • Surface tally facets (F1:p 2.1), the F5 ring radius, and the PTRAC NSF field are read as reals.
  • INP, OUTP, PTRAC and MESHTAL attributes are Field descriptors, and shared behaviour moved into base classes.
  • Geometry and surface operators follow MCNP semantics, and BOX vectors are checked for orthogonality.
  • pymcnp check, plot, run, convert and visualize usage lines put options first.
  • Python 3.11 to 3.14 are supported. Python 3.15 is not yet, because vtk (through pyvista) has no wheels for it.
  • Ruff is pinned to 0.17.0 with an explicit rule list, and the example inputs are valid MCNP.
  • Documentation recommends uv, and the active-development warnings were removed.

Fixed

  • Cell and material options were silently dropped when parsing INP.
  • Vertical-data rows whose length differed from the header were accepted.
  • pymcnp visualize had ambiguous short options, did not validate cell and surface numbers, and wrote the cell PDF for --surface --pdf.
  • Previews of the Plane, Ellipsoid, unbounded cylinder, torus, truncated cone, wedge and hexagonal cylinder shapes were wrong or inverted.
  • The MCNP torus card parameters were mapped to the wrong axes.
  • Material cards with library keywords such as plib between substances failed to parse (#7).