Repository navigation
fix: Improve Windows runner path conversion and custom executable workflow - #1337
Merged
Merged
Conversation
LS-DYNA cannot parse paths containing commas. Windows OneDrive paths often contain commas (e.g., 'OneDrive - Company Name'), causing run_dyna to fail for many users. Add _get_short_path() helper that uses Windows GetShortPathNameW API to convert paths with commas to 8.3 short format. The conversion is applied in set_input() for both input_file and working_directory. If conversion fails, the original path is used with a warning. Related to #1083
Revathyvenugopal162
force-pushed
the
migration/pr-1328
branch
from
September 22, 2026 07:25
06edebe to
598e0d7
Compare
|
All Contributor License Agreement (CLA) signatures have been captured successfully. Thanks for contributing! |
Co-authored-by: guhou-hvi <[email protected]>
Revathyvenugopal162
force-pushed
the
migration/pr-1328
branch
from
September 22, 2026 07:28
2d3d8d0 to
475b089
Compare
Co-authored-by: guhou-hvi <[email protected]>
Co-authored-by: guhou-hvi <[email protected]>
Contributor
Revathyvenugopal162
approved these changes
Sep 23, 2026
koubaa
approved these changes
Sep 23, 2026
Revathyvenugopal162
approved these changes
Sep 23, 2026
Revathyvenugopal162
enabled auto-merge (squash)
September 23, 2026 15:03
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.
This PR is a mirror pull request created from fix: handle comma characters in Windows paths to allow the code to access PyDyna CICD secrets.
Check the original PR made by @guhou-hvi for more details.
Closes #1328
Original pull request
fix: handle comma characters in Windows paths
Summary
Convert Windows input and working-directory paths containing commas to short filenames when the filesystem provides a usable short name. This addresses the comma-path case in #1083 without changing the public API.
The helper first queries
GetShortPathNameWfor the required buffer length, then reads the result. Conversion failure, an insufficient result buffer, or a result still containing commas preserves the original path with a warning. Paths without commas do not call the API.Short names are not guaranteed on every filesystem. The fallback preserves the supplied path; it does not guarantee that LS-DYNA can run with commas.
Validation
tests/test_windows_runner.py -m run.The earlier tests named "with comma" did not contain a comma; they are replaced with targeted assertions. The earlier claim of a real OneDrive solve was not backed by saved evidence and is withdrawn here. These checks do not launch LS-DYNA.
Illustrative usage (not a solver execution record):
Related to #1083.
PR #1331
Summary
Fix an
UnboundLocalErrorwhenrun_dyna()is called with an explicitcontainerargument. The runner completes, but the function raises instead of returning stdout or the working directory. This exception does not delete solver output files.Initialize
containerbefore the environment fallback. Preserve argument precedence, including explicitcontainer=NonedisablingPYDYNA_RUN_CONTAINER, and useis not Noneon the touched lines.Validation
Nonewithout automaticcontainer_env.718b1aeand returnscontainer-stdoutwith the fix.test_docker_runner.py,test_windows_runner.pyandtest_localrun.pywith-m run.test_find_solver_with_version(fixture does not patch the imported lookup binding) andtest_find_solver_latest_install(path separator expectation on Windows). This is a baseline comparison, not a fully passing regression suite.The change touches only argument handling and its tests. It shares
local_solver.pywith #1327 but changes a different region; current merge inspection finds no conflict. No solver or Docker container was executed.PR #1329
Summary
Align Windows solver discovery with Linux by trying the saved solver path before a requested version or the latest installation. A missing saved file falls through to installation discovery.
When no matching
lsprepostdirectory is found, log a warning and construct the solver command without an LS-Run script. If a matching directory exists, the expected script must still be available. Direct MPI execution requires a workingmpiexeccommand and its libraries in the environment.Validation and merge order
The existing branch has 19 passing Windows runner tests. A separate local integration with the corrected #1328 keeps both test sets and passes 27 cases. Its test-file conflict resolution is prepared locally; update the later-merged branch against current main before merging.
#1327 documents both fixes. Merge #1328 and #1329 before that documentation. These are mock/command-construction checks, not a real solver execution.
Related to #1083.
PR #1327
Summary
Document local
run_dynadiscovery and platform prerequisites consistently in the guide and API docstring. Both platforms try an explicit executable, a saved path, a requested version, then the latest installation; Windows additionally checks the saved file exists.Clarify optional Windows environment scripts, MPI command/library requirements, comma-path conversion limits, the 2024 R1 version identifier (
241), and supported memory units (MB/GB). Standalone executables require a prepared environment when no script directory is available.Dependencies and validation
This describes the behavior after #1328 (including the validation corrections in bc40ff8) and #1329. Merge those changes before this documentation, or adapt the wording if their accepted behavior changes.
Focused Sphinx
-E -W --keep-goingsucceeds from outside the workspace with verified source imports. Both Python examples parse, and the runtime AST is unchanged from718b1aeafter removing docstrings. Vale 3.21.0 reports zero document errors/warnings; the existing configuration emits W101 for its unsupportedIgnoredFilesoption.Related to #1083.