Skip to content

Commit

Permalink
Merge branch 'develop' into 'main'
Browse files Browse the repository at this point in the history
Emergency fix to release 0.2.0 for package description

See merge request experiment_analysis_all/software/montepy!108
  • Loading branch information
MicahGale committed Dec 8, 2023
2 parents e43ef96 + c80c867 commit e0396ed
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 31 deletions.
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,8 @@ A python library to read, edit, and write MCNP input files.

## Installing

See the [Installing section in the user guide](https://experiment_analysis_all.pages.hpc.inl.gov/software/montepy/starting.html#installing).

### System Wide (for the current user).

>>>
Note: If you are planning to use this in a jupyter notebook on an HPC,
the HPC may use modules for python, which may make it so the installed MontePy package doesn't show up in the jupyter environment.
In this case the easiest way to deal with this is to open a teminal inside of `jupyter lab` and to install the package there.
>>>
1. Install it from [PyPI](https://pypi.org) by running `pip install --user montepy`.

### Install specific version for a project

The best way maybe to setup a project-specific [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html),
[Mamba](https://mamba.readthedocs.io/en/latest/user_guide/concepts.html),
a [venv](https://docs.python.org/3/library/venv.html) environment.
The steps for installing inside one of those environments are the same as the previous steps.

Another option is to clone the repository and to use symbolic-links. In this scenario we'll assume that your local
repository is located at `~/dev/montepy`, and your project is located at `~/foo/bar`.

1. Move to the repository parent folder: `cd ~/dev`
1. Clone this repository: `git clone TODO`
1. Enter the repository: `cd montepy`
1. Checkout the specific version you want. These are tagged with git tags
1. You can list all tags with `git tag`
1. You can then checkout that tag: `git checkout <tag>`
1. Install the dependent requirements: `pip install -r requirements/common.txt`
1. Move to your project folder: `cd ~/foo/bar`
1. Create a symbolic link in the project folder to the repository: `ln -s ~/dev/montepy/montepy montepy`

Now when you run a python script in that folder (*and only in that folder*) `import montepy` will use the specific version you want.

## User Documentation

Expand Down
40 changes: 40 additions & 0 deletions doc/source/starting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,46 @@ and will link the cell with its material object.

Due to the manuals for these earlier versions of MCNP being export controlled, these versions will likely never be fully supported.

Installing
----------


System Wide (for the current user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note::
If you are planning to use this in a jupyter notebook on an HPC,
the HPC may use modules for python, which may make it so the installed MontePy package doesn't show up in the jupyter environment.
In this case the easiest way to deal with this is to open a teminal inside of `jupyter lab` and to install the package there.


#. Install it from `PyPI <https://pypi.org>`_ by running ``pip install --user montepy``.

Install specific version for a project
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The best way maybe to setup a project-specific `conda <https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html>`_,
`Mamba <https://mamba.readthedocs.io/en/latest/user_guide/concepts.html>`_,
or a `venv <https://docs.python.org/3/library/venv.html>`_ environment.
The steps for installing inside one of those environments are the same as the previous steps.

Another option is to clone the repository and to use symbolic-links. In this scenario we'll assume that your local
repository is located at ``~/dev/montepy``, and your project is located at ``~/foo/bar``.

#. Move to the repository parent folder: ``cd ~/dev``
#. Clone this repository: ``git clone https://github.com/idaholab/montepy.git``
#. Enter the repository: ``cd montepy``
#. Checkout the specific version you want. These are tagged with git tags

#. You can list all tags with ``git tag``

#. You can then checkout that tag: ``git checkout <tag>``

#. Install the dependent requirements: ``pip install -r requirements/common.txt``
#. Move to your project folder: ``cd ~/foo/bar``
#. Create a symbolic link in the project folder to the repository: ``ln -s ~/dev/montepy/montepy montepy``

Now when you run a python script in that folder (*and only in that folder*) ``import montepy`` will use the specific version you want.

Reading a File
--------------

Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
name = "montepy"
dynamic = ["version"]
description = "A library for reading, editing, and writing MCNP input files"

# gitlab limits the readme to 4,000 chars.
readme = "README.md"
requires-python = ">=3.8"
maintainers = [
Expand Down

0 comments on commit e0396ed

Please sign in to comment.