-
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
Make Cubit installation optional #195
base: main
Are you sure you want to change the base?
Conversation
mesh_volume_skeleton, | ||
get_last_id, | ||
) | ||
from . import cubit_utils |
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'd like to note (for reviewers) that cubit_utils
is imported separately here for its initialized
variable. If initialized
is imported into the namespace of magnet_coils
, changes to the variable do not persist when modified by calls to the imported functions
I would also like to note that all tests indeed pass (other than those skipped) when Cubit is removed from |
def get_last_id(entity): | ||
"""Returns the ID of the most recently created entity of a given type. | ||
|
||
Arguments: |
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.
might be nice to list valid strings here for anyone who is not familiar with the entity types in cubit.
Do we want to update the example parastell_cad_to_dagmc_example.py to not use cubit at all? Right now it calls cubit to make a volumetric mesh of the magnets. |
This branch isolates the use of Cubit within ParaStell such that it becomes an optional dependency. Cubit import occurs in a single location, the
init_cubit
function of thecubit_utils.py
script (formerly namedcubit_io.py
), which is called only in functions using Cubit. As the radial distance utility is completely dependent on Cubit, no major modifications were made to that script. In addition, tests are modified to test Cubit functionality only if installed, includingtest_parastell.py
.