-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volumes modules #747
Volumes modules #747
Conversation
Build passed ! Good Job 🍻 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small discussion to have on WorldBoundingBox
and its usage in scil_crop_volume.py
from scilpy.utils.util import voxel_to_world | ||
|
||
|
||
class WorldBoundingBox(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to discuss this more. This class is used as a pickle in the scil_crop_volume.py
script. Moving it here won't work, it must be a top of module to be picklable (https://docs.python.org/3/library/pickle.html).
And even, it will bug all pickled WorldBoundingBox kept by scilpy user (a pickle is bound to the module in which it was created, which is main up till now). As such, the script parameters --input_bbox
won't work with old boxes.
If we intend to deprecate those boxes, we should deprecate this pickle usage instead and rely on another saving method for the bounding box. It is legacy and really the worst way of doing this job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arnaudbore @frheault @EmmaRenauld I would move this code back to the script, if we all agree. With a todo to change the way it works, remove pickling from the solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
@frheault , I will remove scil_crop_volume from files to give to people at the retreat. Seems more complicated than expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexVCaron Tests were passing, though. Do you have an example of pickle file that we could add to the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not test the input and output pickle, so we don't check this behavior. I'll prepare a little package for here and the retreat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is some data. You have the pickled bbox, created from the current master.
Loading the box does not work. However, contrary to what I thought, it is still possible to create and load boxes with the bbox class in the module. I still think we should change to another way than pickle, but we'll talk about it at the retreat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I will try to play with this eventually.
Build passed ! Good Job 🍻 ! |
Build Failed 💥 |
Build Failed 💥 |
612982d
to
f0702a6
Compare
(Rebased on master. Locally tests are passing). |
Build Failed 💥 |
Build passed ! Good Job 🍻 ! |
@frheault @AlexVCaron @AntoineTheb This is ready! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested, but everything looks good to me ! If you want to, LGTM.
Preparing a few other refactored modules.
Goal: To merge this before the scil retreat so that people can do the unit tests.
Summary:
Associated scripts:
The following scripts are now clean (i.e. the main script is as empty as possible).