Package: scale-olm
ORIGEN Library Manager (OLM)This is versionv0.12.4.OLM is a command-line utility that streamlines aspects of using theSCALE/ORIGENlibrary to solve nuclide inventory generation problems.To install, usepip.pip install scale-olmLocationsThe main development repository is hosted onGitHubwith a read-only mirror on the ORNL-hostedGitLab.DevelopingThe scriptdev.shis provided to initialize the development environment.$gitclonehttps://github.com/wawiesel/olm$cdolm$sourcedev.shThis is all you should need to do. The following sections explain in more detail
what happens when you rundev.sh.Developer detailsThis section contains additional details on developing OLM.Enable virtual environment$virtualenvvenv$.venv/bin/activate$whichpythonIf you get an error about missingvirtualenv, you may need to install it.$pipinstallvirtualenvInstall requirementsAfter enabling the virtual environment, run this command to install dependencies.$pipinstall-rrequirements.txtNOTE: if you need to regenerate the requirements file after adding dependencies.$pipfreeze|grep-v'^\-e'>requirements.txtEnable a local install for testingThis command will enable any changes you make to instantly propagate to the executable
you can run just witholm.$pipinstall--editable.$olm$whicholmCreating docsWith the development environment installed, the docs may be created within thedocsdirectory. With the following commands.$cddocs$makehtml$openbuild/html/index.htmlAlternatively the PDF docs may be generated using themake latexpdfcommand. Note
that the HTML docs are intended as the main documentation.The following greatly simplifies iterating on documentation. Run this command
and open your browser tohttp://localhost:8000.sphinx-autobuild docs/source/ docs/build/html/NotebooksThere are notebooks contained innotebookswhich may be helpful for debugging or
understanding how something is working. You may need to install your virtual environment
kernel for the notebooks to work. You should use the localvenvkernel instead of
your default Python kernel so you have all the local packages at the correct versions.$ipythonkernelinstall--name"venv"--userNow, you can select the created kernel "venv" when you start Jupyter notebook or lab.Notes about developmentClick for CLIWe use theClick python libraryfor command line. Here's a nicevideo about click.Commit messagesFollow theseguidelinesfor commit messages.Version updatesOLM usessemantic versioning. You should commit the
relevant code with the usual description commit message.Then runbumpversion patchif you are fixing a bugbumpversion minorif you are adding a new featurebumpversion majorif you are breaking backwards compatibilityWhen you push you need togit push --tagsor configure your repo to always push tags:#.git/config
[remote "origin"]
    push = +refs/heads/*:refs/heads/*
    push = +refs/tags/*:refs/tags/*Pytest for unit testsLocally for unit tests we use the pytest framework under thetestingdirectory.
All tests can be run simply like this from the root directory. Not we are using thepytest-xdistextension which allows parallel testing.$pytest-n6.Black for commit formattingThe first time you do work on a clone, do this.$pre-commitinstallThis will use theBlack formatter.Docstrings and DoctestOur goal is to have each function, module, and class with standard docstrings and
a few doctests. You can run verbose tests on a specific module as follows.$pytest-vscale/olm/core.py