McUtils Binder

McUtils is a set of utilities written by the McCoy group for the McCoy group to handle common things we do, like pulling data from electronic structure calculations, doing unit conversions, interpolating functions, making attractive plots, getting finite difference derivatives, performing fast, vectorized operations, etc.

We’re working on documenting the package, but writing good documentation takes more time than writing good code. Docs for the actively edited, unstable branch can be found here.

Installation & Requirements

The easiest way to install is via pip, as

pip install mccoygroup-mcutils

This should install all dependencies. The major requirement is that Python 3.8+ is required due to use of features in the types module. For safety, it is best to install this in a virtual environment, which we can make like

python3.8 -m pip venv mcenv

and activate like

. mcenv/bin/activate

or to use it in a container or conda environment or some other place where we can control the environment.

It is also possible to install from source like

git clone https://github.com/McCoyGroup/McUtils.git

but in this case you will need to make sure the library is on the path yourself and all of the dependencies are installed. If you want to get all of the nice JHTML features for working in Jupyter, you’ll then need to run

from McUtils.Jupyter import JHTML
JHTML.load()

and then reload the browser window when prompted.

Contributing

If you’d like to help out with this, we’d love contributions. The easiest way to get started with it is to try it out. When you find bugs, please report them. If there are things you’d like added let us know, and we’ll try to help you get the context you need to add them yourself. One of the biggest places where people can help out, though, is in improving the quality of the documentation. As you try things out, add them as examples, either to the main page or to a child page. You can also edit the docstrings in the code to add context, explanation, argument types, return types, etc.

API Reference

Help Us Out!

The easiest way to help us out is to give feedback. Each page should support examples, but unfortunately most do not, simply because writing that kind of thing by hand is time consuming. If you see a page without examples and you want some, let us know! To do that, just open and issue on GitHub. You can use the Feedback button at the bottom of each page to do so.

If you want to be a bit more proactive, feel free to provide examples and docstrings yourself! There are links at the bottom of each page to edit the examples, templates, and docstrings for that page. Just create a new one if needed or edit the old one, commit your changes, and Peeves will rebuild the site which what you’ve added. It is a huge, huge help, so please take advantage of the opportunity if you’re looking for ways to get involved.