Closed servoz closed 10 months ago
It's because anasimpleviewer2 starts from the current directory and adds the path user_interface/data_viewer/anatomist_2
, which supposes that the CWD is in the root source dir of populse_mia (which I find quite strange, we are usually not here).
So yes it's a consequence of the change for pyscript.m
because your fix was to chdir
to a temp directory at startup.
But:
pyscript.m
problem was also solved by https://github.com/populse/capsul/commit/e64de08460fe346581460eeafb0426be163205a8 (I hope) so maybe doesn't need to chdir
to a temp any longer (to be tested from Mia side)__file__
or something like that, it will be more robust.Exactly, I'm looking at this ticket right now! The fix shouldn't be too complicated.
the pyscript.m problem was also solved by https://github.com/populse/capsul/commit/e64de08460fe346581460eeafb0426be163205a8 (I hope) so maybe doesn't need to chdir to a temp any longer (to be tested from Mia side)
Following your commit (https://github.com/populse/capsul/commit/e64de08460fe346581460eeafb0426be163205a8), I ran few tests (which I've already forgotten about, but which I can run again) to remove the previous commits ( 188c79b and populse/capsul@751b88c) for changing working directories to a temporary directory (because there's no point in keeping commits that produce the same thing, especially as in practice this amounts to changing from one temporary directory to another temporary directory ...).
This tests indicated that deleting the 2 previous commits and keeping the last (https://github.com/populse/capsul/commit/e64de08460fe346581460eeafb0426be163205a8) wasn't enough to fix the pyscript.m issue on our side, so I didn't deleted the 2 previous commits in this regard. Anyway, I don't think it's particularly problematic to be in a temporary directory to launch mia.
However, what worries me a little is that as there is no longer any synchronization between master (V2) and the V3 branch, the improvements we are currently making in V2 (master) will certainly be lost in V3 ...
I initially thought of using capsul_config
(in cc['engine']['global']['capsul.engine.module.python']['python']['path'] we can find the root of the populse_mia used) but your idea of using the __file__
is simpler and therefore better!!!!
I'll use this idea ... :-)
This tests indicated that deleting the 2 previous commits and keeping the last (populse/capsul@e64de08) wasn't enough to fix the pyscript.m issue on our side
So the fix on capsul side is not complete... Too bad... We still have to find something because the distributed execution will likely also write these files everywhere.
However, what worries me a little is that as there is no longer any synchronization between master (V2) and the V3 branch, the improvements we are currently making in V2 (master) will certainly be lost in V3 ...
Same for me, but branches have completely diverged, it's impossible to merge automatically, we would need to report manually every change from master to 3.0. That's why I want to switch to 3.0 as quickly as possible and completely drop 2.x. Maintaining both is too much work.
Before switching to V3 (master) and dropping 2.x, please let me know, we'll need just before to make a last release of capsul 2.x (certainly also populse_db) on pypi so we can continue with Mia V2 while waiting to go to V3!!
Yes sure, but we're not completely there yet... and anyway we have to port Mia to Capsul3 before we drop Capsul2. By now there are a few tools missing.
anatomist_2 viewer no longer works. I haven't looked into this issue yet, but I think it's due to the recent change made to avoid writing pyscript.m files to the project root (changing the current directory to a temporary directory).