From 575b2efa9c07227532ea1c155fcd3a7b69335376 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Fri, 8 Dec 2023 09:51:30 -0600 Subject: [PATCH 1/3] Added warning about gitlab limits. --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 3b4d41d8..218c6060 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ From 7ff464e3994d2e8f51e32a0935a0199cb3b3b006 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Fri, 8 Dec 2023 09:51:41 -0600 Subject: [PATCH 2/3] Moved installation guide to sphinx. -This is for shortening the README. -The readme is part of the package description. - This prevents us from exceeding the gitlab description limit --- README.md | 32 +------------------------------- doc/source/starting.rst | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 6b896b54..74875231 100644 --- a/README.md +++ b/README.md @@ -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 ` -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 diff --git a/doc/source/starting.rst b/doc/source/starting.rst index c62d9463..15045e95 100644 --- a/doc/source/starting.rst +++ b/doc/source/starting.rst @@ -20,6 +20,43 @@ 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 `_ by running ``pip install --user montepy``. + +Install specific version for a project +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The best way maybe to setup a project-specific `conda `_, +`Mamba `_, +or a `venv `_ 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 `` +#. 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 -------------- From a7874ac09e5d90f234c5f30651c1f4c528f2998f Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Fri, 8 Dec 2023 09:55:47 -0600 Subject: [PATCH 3/3] Fixed broken sublist. --- doc/source/starting.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/source/starting.rst b/doc/source/starting.rst index 15045e95..afb26183 100644 --- a/doc/source/starting.rst +++ b/doc/source/starting.rst @@ -49,8 +49,11 @@ repository is located at ``~/dev/montepy``, and your project is located at ``~/f #. 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 `` + #. 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``