Skip to main content

ORIGEN Library Manager (OLM)

Documentation Status

The latest stable version is v0.14.2.

OLM is a command-line utility that streamlines aspects of using the SCALE/ORIGEN library to solve nuclide inventory generation problems.

To install, use pip.

pip install scale-olm

Locations

The main development repository is hosted on GitHub with a read-only mirror on the ORNL-hosted GitLab.

Developing

The script dev.sh is provided to initialize the development environment.

$ git clone https://github.com/wawiesel/olm
$ cd olm
$ source dev.sh

This is all you should need to do. The following sections explain in more detail what happens when you run dev.sh.

Developer details

This section contains additional details on developing OLM.

Enable virtual environment

$ virtualenv venv
$ . venv/bin/activate
$ which python

If you get an error about missing virtualenv, you may need to install it.

$ pip install virtualenv

Install requirements

After enabling the virtual environment, run this command to install dependencies.

$ pip install -r requirements.txt

NOTE: if you need to regenerate the requirements file after adding dependencies.

$ pip freeze | grep -v '^\-e'>requirements.txt

Enable a local install for testing

This command will enable any changes you make to instantly propagate to the executable you can run just with olm.

$ pip install --editable .
$ olm
$ which olm

Creating docs

With the development environment installed, the docs may be created within the docs directory. With the following commands.

$ cd docs
$ make html
$ open build/html/index.html

Alternatively the PDF docs may be generated using the make latexpdf command. 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 to http://localhost:8000.

sphinx-autobuild docs/source/ docs/build/html/

Notebooks

There are notebooks contained in notebooks which 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 local venv kernel instead of your default Python kernel so you have all the local packages at the correct versions.

$ ipython kernel install --name "venv" --user

Now, you can select the created kernel "venv" when you start Jupyter notebook or lab.

Notes about development

Click for CLI

We use the Click python library for command line. Here's a nice video about click.

Commit messages

Follow these guidelines for commit messages.

Version updates

OLM uses semantic versioning. You should commit the relevant code with the usual description commit message.

Then run

  • bumpversion patch if you are fixing a bug
  • bumpversion minor if you are adding a new feature
  • bumpversion major if you are breaking backwards compatibility

When you push you need to git push --tags or configure your repo to always push tags:

#.git/config
[remote "origin"]
    push = +refs/heads/*:refs/heads/*
    push = +refs/tags/*:refs/tags/*

Pytest for unit tests

Locally for unit tests we use the pytest framework under the testing directory. All tests can be run simply like this from the root directory. Not we are using the pytest-xdist extension which allows parallel testing.

$ pytest -n 6 .

Black for commit formatting

The first time you do work on a clone, do this.

$ pre-commit install

This will use the Black formatter.

Docstrings and Doctest

Our 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 -v scale/olm/core.py

Metadata

Release files for scale-olm 0.14.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scale-olm 0.14.2
File Size Uploaded
scale_olm-0.14.2.tar.gz 81.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scale-olm 0.14.2
File Interpreter ABI Platform
scale_olm-0.14.2-py3-none-any.whl Python 3 none any Details

Total release size: 159.3 kB

Release files / scale_olm-0.14.2.tar.gz

Download URL scale_olm-0.14.2.tar.gz
Size 81.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c03442891c09d18441d01d607d7773770ecaa1b36e2daa7fd7597a682ab33503
BLAKE2b-256 checksum
How to use checksums
c04a2b3bdf7f94833f31d41676e1f5be939e1f1d77cb61469aec23a695738aa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release files / scale_olm-0.14.2-py3-none-any.whl

Download URL scale_olm-0.14.2-py3-none-any.whl
Size 78.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c07f88ef291383b8189879366f18f421bb2b428ca15013cb442567c034e7d497
BLAKE2b-256 checksum
How to use checksums
397b8012c52e4636d559e08f316ccb94eb8582e34390d386176d1e00c8f47c06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release history Release notifications | RSS feed

This release

0.14.2 This release

2 release files

0.14.0

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.7

2 release files

0.10.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page