bessagroup / rvesimulator

Automated representative volume element simulator via abaqus for material constitutive law discovery
https://bessagroup.github.io/rvesimulator/
MIT License
14 stars 2 forks source link

This path only works for one OS #64

Open mpvanderschelling opened 10 months ago

mpvanderschelling commented 10 months ago

Problem

This line of code uses direct '/' concatenation to create a file path. This will not work on Windows.

Proposed solution

Use the pathlib library:

from pathlib import Path

"script_path": Path(rvesimulator.__file__).parent / "scriptbase",

Assignees: Labels:

https://github.com/bessagroup/rvesimulator/blob/ea31752a6da3131cfe55027895ac23ddf684f3de/src/rvesimulator/benchmarks/asca_rve.py#L40-L41