Skip to content

Avoid importing namespace package pymatgen directly #4053

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

Merged
merged 6 commits into from
Sep 8, 2024

Conversation

DanielYang59
Copy link
Contributor

@DanielYang59 DanielYang59 commented Sep 8, 2024

Summary

  • Avoid importing namespace package pymatgen directly
  • [Question] Should we recommend the following alias (I thought pmg would be a shorthand of pymatgen instead of pymatgen.core):
    import pymatgen.core as pmg

@janosh
Copy link
Member

janosh commented Sep 8, 2024

[Question] Should we recommend the following alias (I thought pmg would be a shorthand of pymatgen instead of pymatgen.core):

no strong opinion but leaning towards not proliferating that usage

@janosh janosh added pkg Package health and distribution related stuff best practice Discussion/changes of best practices labels Sep 8, 2024
@DanielYang59
Copy link
Contributor Author

[Question] Should we recommend the following alias (I thought pmg would be a shorthand of pymatgen instead of pymatgen.core):

no strong opinion but leaning towards not proliferating that usage

Okay thanks for your reply, we might just from pymatgen.core import xxx (not the wild card *) then. And we might need to rebuild docs again (perhaps add rebuilding docs as an automate workflow as well?).

@janosh
Copy link
Member

janosh commented Sep 8, 2024

perhaps add rebuilding docs as an automate workflow as well?

yes, that should have been done a long time ago. in particular, there's no reason to keep the generated HTML for docs under version control. it's a major history pollutant

@DanielYang59
Copy link
Contributor Author

DanielYang59 commented Sep 8, 2024

perhaps add rebuilding docs as an automate workflow as well?

yes, that should have been done a long time ago.

Okay I would have a look at this if you don't have much time ATM :)

in particular, there's no reason to keep the generated HTML for docs under version control. it's a major history pollutant

Yes!

@janosh janosh merged commit 13182c5 into materialsproject:master Sep 8, 2024
43 checks passed
@DanielYang59 DanielYang59 deleted the remove-import-pmg branch September 8, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
best practice Discussion/changes of best practices pkg Package health and distribution related stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants