-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Currently, batch submissions for modesolver (and likely FDTD) require that the path used to specify download location is given as a string. At some point in the chain, <filename>.lower() is used, which causes failing errors when the supplied filename is not a string.
To improve robustness and allow more streamlined checks for things like extensions, validity of file location, etc, it would be nice to allow path-like objects to be specified (pathlib's Path?). I typically have a data directory where simulation files are stored, separate from where my script files are located/run.
My current solution is to generate the filename and do all my checks on a Path object, then convert to string before passing to the run commands.
The functions I'm referring to for modesolver and fdtd:
Line 147 in 78dfeff
| def run_batch( |
tidy3d/tidy3d/web/api/container.py
Line 191 in 78dfeff
| def run(self, path: str = DEFAULT_DATA_PATH) -> SimulationDataType: |