bugfix: chargemol runtime directory and os.path.exists fix#3778
bugfix: chargemol runtime directory and os.path.exists fix#3778chiang-yuan wants to merge 14 commits intomaterialsproject:masterfrom
os.path.exists fix#3778Conversation
WalkthroughThe recent changes in Changes
Recent Review DetailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
janosh
left a comment
There was a problem hiding this comment.
thanks @chiang-yuan for the os.path.isfile fix! 👍
|
|
||
| response = subprocess.run(CHARGEMOL_EXE, capture_output=True, check=False) | ||
| _stdout = response.stdout.decode("utf-8") | ||
| response.stderr.decode("utf-8") |
There was a problem hiding this comment.
do these two lines serve a purpose? i don't think these raise when response.returncode != 0? i think we need a test for the previously raised RuntimeError
There was a problem hiding this comment.
maybe we can just use check=True? We don't even need to capture response/stdout here as it is not used?
There was a problem hiding this comment.
yes, let's use check=True. it's a different error type CalledProcessError which I think is better than RuntimeError anyway but we should still add a test for this behavior.
|
Try to fix the missing |
e3fbc67 to
41e6d99
Compare
|
Thanks. We have refactored pymatgen to move core packages to a separate pymatgen-core repo. If you don't mind, please submit a new PR in that repo. This will also ensure you are properly credited for the contribution. Sorry about the inconvenience. |
Summary
os.path.isfilebug. Change it intoos.path.existsTodos
Checklist
ruff.mypy.Summary by CodeRabbit