[Debichem-devel] Bug#1145147: custodian: FTBFS: FAILED tests/vasp/test_validators.py::TestVaspNpTMDValidator::test_check_and_correct - assert False
Maximiliano Curia
maxy at gnuservers.com.ar
Wed Sep 16 22:27:18 BST 2026
¡Hola Drew!
El 2026-09-16 a las 22:44 +0200, Drew Parsons escribió:
>Source: custodian
>Followup-For: Bug #1145147
>X-Debbugs-Cc: Maximiliano Curia <maxy at debian.org>
>Control: tags -1 ftbfs moreinfo
>
>Maximiliano Curia wrote:
>> To solve this issue, I created a patch to normalize the file path to
>> an absolute path when caching VASP outputs. This patch should likely be
>> sent upstream as well.
>
>Thanks for the patch, Maximiliano.
>
>I have a question though: what is the point of creating the separate
>functions _load_vasprun and _load_outcar ?
>
>As far as I can see your idea would work just adding the abspath()
>wrapping directly within the existing
> return Vasprun(filepath, **vasprun_kwargs)
>
>i.e.
> return Vasprun(os.path.abspath(filepath), **vasprun_kwargs)
>
>What's the reason for separating the fix out into the extra functions?
The thing is that the functions are lru_cached but the path they receive
could be a relative path, so we need to move the cache to the function
that receives the absolute path, and we keep the old one as a wrapper to
the cached function.
Happy hacking,
--
"First, solve the problem. Then, write the code." -- John Johnson
Saludos /\/\ /\ >< `/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debichem-devel/attachments/20260916/08405189/attachment.sig>
More information about the Debichem-devel
mailing list