filename = cwd + "/tests/mixing_elbow.pmdat"
# Commands syntaxes...
# This executes a command without having to create a command instance
# the arguments are optional and "None" is used if not provided
execute_command(
"prime",
"file",
"readcad",
initial_path=filename,
)
CONTAINER_USER_DATA = '/data'
CONTAINER_EXAMPLES = os.path.join(CONTAINER_USER_DATA, 'examples')
#...
def get_examples_path_for_containers():
"""Get the server-side default container path in case of containers.
In case of a container, the user data directory is mounted within the container image.
"""
return CONTAINER_EXAMPLES
Conclusion
pyprimemesh when run in containers expects readcad to find files in CONTAINER_EXAMPLES under CONTAINER_USER_DATA.
More flexibility on CONTAINER_USER_DATA would be welcome.
📝 Description of the feature
Running github actions with tests using pyprimemesh containers locally via nektos act fails.
Example
.github/workflows/ci_cd.yml
file contentsExample tests file contents
Tracing the issue
https://github.com/ansys/pyprimemesh/blob/v0.6.0.dev6/src/ansys/meshing/prime/internals/utils.py#L254
https://github.com/ansys/pyprimemesh/blob/v0.6.0.dev6/src/ansys/meshing/prime/internals/defaults.py#L44
Conclusion
pyprimemesh when run in containers expects
readcad
to find files inCONTAINER_EXAMPLES
underCONTAINER_USER_DATA
.More flexibility on
CONTAINER_USER_DATA
would be welcome.💡 Steps for implementing the feature
https://github.com/ansys/pyprimemesh/blob/v0.6.0.dev6/src/ansys/meshing/prime/internals/defaults.py#L44
replace:
by:
🔗 Useful links and references
No response
Repository is internal.