lanl / hippynn

python library for atomistic machine learning
https://lanl.github.io/hippynn/
Other
59 stars 22 forks source link

Transparent plot, doc update, and some misc updates #13

Closed tautomer closed 1 year ago

tautomer commented 1 year ago
  1. Implemented the transparent plot option as a library setting, and defaults to False. One note though, transparent PDF does work, but most of the pdf reader will automatically add a white background, which looks like the keyword isn't working. The "library settings" section of the doc is updated as well.

  2. Stylish the docs with a css file. The default RTD theme has a fixed width of 800 px, which is too narrow for the tables to show properly. Even worse, there is no way to narrow the sidebar, except truncating it or remove it completely. So I decided to lift the limit a little bit. Now the width of the whole page is 80% or 1000 px, whichever is smaller. For anything that is > 1280 pixels horizontally, 1000 will be used. (It will suck for sure on phones or vertically used 1080p monitors, but it sucks even without this PR...) The RTD theme is way too restrictive. They even refuse to merge this... https://github.com/readthedocs/sphinx_rtd_theme/pull/337 Probably nothing more we can do.

    A comparison

    Before After
    before after

    A bonus point is that we don't have to hard code line breaks anymore. The texts will be wrapped.

  3. Misc updates. See if you like it.

    1. Updated .gitignore to exclude files from pip install -e. I guess it won't be useful for normal users, but for the development branch, it should be super useful.
    2. Add tools.py to init.py, so you get auto-completion for stuff like hippynn.tools.log_terminal. I know it's trivial 😂
lubbersnick commented 1 year ago

Thanks for the improvements, looks good.