-
Notifications
You must be signed in to change notification settings - Fork 69
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 robocrys and pmg addon packages optional #522
Conversation
How are you making packages optional when the document model depends on them, e.g. I believe |
|
Yes, it does. I've just added a check to the beginning of the module import statements. That way if you go to import the model class it tells you to install the package if you don't have it. The modules involving addon packages are isolated in |
Codecov Report
@@ Coverage Diff @@
## main #522 +/- ##
==========================================
- Coverage 97.53% 97.52% -0.02%
==========================================
Files 116 116
Lines 24135 24142 +7
==========================================
+ Hits 23541 23544 +3
- Misses 594 598 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Happy to do something different if you feel there is a better solution. |
That's fair; maybe. I think the main thing is to ensure that the API is still usable for people who don't have those installed, e.g. that we ensure that the error messages if you're trying to use the
I think the error message on the import in emmet-core is ok, but wouldn't be sufficient for the client users, so perhaps we can just add another |
Yeah, my plan was to do just that and add another try-except block in the client. |
I think this makes sense! I can vouch for Maybe we can slightly modify the API installation instructions to be |
Sure, that sounds good to me! |
robocrys
,pymatgen-analysis-diffusion
, andpymagen-analysis-alloys
are all now optional inemmet-core