Skip to content

Allow path_like specification for filenames in batch submissions #2148

@gvnwst

Description

@gvnwst

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:

def run_batch(

def run(self, path: str = DEFAULT_DATA_PATH) -> SimulationDataType:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions