-
Notifications
You must be signed in to change notification settings - Fork 12
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
Split magnet set object #173
base: main
Are you sure you want to change the base?
Conversation
tests are passing locally :( I did make some changes to the tests to accommodate the changes in this PR, maybe the CI is using the old versions of the tests? I'll look more into it soon. |
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 know this is still in draft stage, but here are some general comments and suggestions
if cubit_io.initialized: | ||
cubit.cmd("new") | ||
else: | ||
cubit_io.init_cubit() |
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.
Is this necessary? Not sure how/if pytest isolates these tests
if cubit_io.initialized: | ||
cubit.cmd("new") | ||
else: | ||
cubit_io.init_cubit() |
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.
Same question as above
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.
yeah, I added these upon realizing that there was leftover stuff from previous tests messing up these tests
if cubit_io.initialized: | ||
cubit.cmd("new") | ||
else: | ||
cubit_io.init_cubit() |
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.
See above
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.
A couple of comments on the details, but I think we need to get the inheritance issues of the constructor/__init__
right.
self.geom_filename, self.export_dir | ||
) | ||
|
||
self.volume_ids = list(range(first_vol_id, last_vol_id + 1)) |
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.
Are we sure that the volume ids are contiguous? I think there is a cubit command to ensure this.
) | ||
|
||
|
||
class BuildableMagnetSet(MagnetSet): |
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.
Not convinced by this new name... maybe FilamentMagnetSet
?
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.
Both versions may have filament data associated with them, as it may be desired to build the magnet surface for radial distance finding. BuildableMagnetSet
is not my favorite either, but I've had a hard time coming up with another distinguishing feature. Maybe CadQueryMagnetSet, or ParastellMagnetSet, or MagnetSetFromFilaments? Could have 3 objects in total as well, MagnetSet
and MagnetSetFromFilaments
and MagnetSetFromGeometry
, which inherit from MagnetSet
?
First crack at the class hierarchy disussed a couple weeks back - not sure the best way to handle things that you might want to be part of the init method for both classes? I just left those variables (like logger) in the init for each class. This felt a bit like defining things in two places.