Thanks for having a look at the other bugs I raised, @bennybp! I put off raising this one because I haven't put together a MRE, but I think if you inspect the code then the issue becomes clear.
Describe the bug
I cannot pass a tmpdir into TemporaryPostgres because:
TemporaryPostgres assumes tmpdir has a name attribute
TemporaryPostgres assumes the name attribute is the absolute path / TemporaryPostgres does not account for directories that are not within the current working directory.
Thanks for having a look at the other bugs I raised, @bennybp! I put off raising this one because I haven't put together a MRE, but I think if you inspect the code then the issue becomes clear.
Describe the bug
I cannot pass a
tmpdir
intoTemporaryPostgres
because:TemporaryPostgres
assumestmpdir
has aname
attributeTemporaryPostgres
assumes thename
attribute is the absolute path /TemporaryPostgres
does not account for directories that are not within the current working directory.To Reproduce
Both behaviours are down to this line:
https://github.com/MolSSI/QCFractal/blob/00d989919419b8ad7893631e7b5224f605310aab/qcfractal/postgres_harness.py#L483
.name
for apathlib.Path
only gives the last portion of the path, i.e.And of course strings do not have
.name
s (the documented type isOptional[str]
).Expected behavior
I can give either a string or a path.
Additional context