Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation instructions #154

Merged
merged 36 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
dcfaf1b
add dependency missing from pip version of xdesign
smajee Dec 29, 2021
e9ff99e
update example command for GPU install
smajee Dec 29, 2021
ad6bb4d
add dev requirements
smajee Dec 29, 2021
4ba2057
fix bug in link
smajee Dec 29, 2021
f8d072e
fix incorrect instruction for astra
smajee Dec 30, 2021
bbca395
Doc fix
smajee Dec 30, 2021
289dd38
move docs building instructions from install to contributing
smajee Jan 4, 2022
462af6d
Update astra install channel
smajee Jan 4, 2022
21e0f41
add dependency installation in examples
smajee Jan 4, 2022
3c4e867
fix link
smajee Jan 4, 2022
06f7b2c
add example dependencies heading
smajee Jan 4, 2022
393c5a1
add ref
smajee Jan 4, 2022
d4be3b7
add new ref
smajee Jan 4, 2022
ec83acc
update links
smajee Jan 4, 2022
4103091
clean up links
smajee Jan 4, 2022
0dde201
clean up extra instructions
smajee Jan 4, 2022
b5a83bb
Merge main into branch
smajee Jan 4, 2022
03c9a0c
Merge branch 'main' into smajee/install_instructions
bwohlberg Jan 6, 2022
36beca9
Fix wording
smajee Jan 6, 2022
4711b17
Merge branch 'smajee/install_instructions' of github.com:lanl/scico i…
smajee Jan 6, 2022
b4f0cd3
fix indentation:
smajee Jan 6, 2022
e278182
revert
smajee Jan 6, 2022
3805e4e
remove doc duplication
smajee Jan 6, 2022
4bc20c4
misc changes
smajee Jan 6, 2022
34ff9ac
add indent
smajee Jan 6, 2022
c9ed61a
fix typo
smajee Jan 6, 2022
cbf811b
change wording
smajee Jan 6, 2022
6a6b725
fix wording
smajee Jan 6, 2022
1ec4614
change wording
smajee Jan 6, 2022
528c043
Merge branch 'main' into smajee/install_instructions
bwohlberg Jan 6, 2022
93694fb
Update examples.rst
bwohlberg Jan 6, 2022
75b666d
fix bug
smajee Jan 7, 2022
ce4da27
Merge branch 'smajee/install_instructions' of github.com:lanl/scico i…
smajee Jan 7, 2022
617e993
add comment about neccessity of installing example requirements
smajee Jan 7, 2022
d2301b7
update submodule
smajee Jan 7, 2022
7d37a01
merge main
smajee Jan 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data
Submodule data updated 0 files
25 changes: 21 additions & 4 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Installing a Development Version
conda activate scico


6. Navigate to the root of the cloned repository:
6. Change directory to the root of the cloned repository:

::

Expand All @@ -77,11 +77,15 @@ Installing a Development Version
::

pip install -r requirements.txt # Installs basic requirements
pip install -r dev_requirements.txt # Installs developer requirements
pip install -r docs/docs_requirements.txt # Installs documentation requirements
pip install -r examples/examples_requirements.txt # Installs example requirements
pip install -e . # Installs SCICO from the current directory in editable mode


For installing dependencies related to the examples please see :ref:`example_notebooks`.
Installing these are neccessary for the successfull running of the tests.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems easy to miss to me, but I think it's fine for now given that we will likely look at all of this again for #155 .



9. The SCICO project uses the `black <https://black.readthedocs.io/en/stable/>`_,
`isort <https://pypi.org/project/isort/>`_ and `pylint <https://pylint.pycqa.org/en/latest/>`_
code formatting utilities. It is important to set up a `pre-commit hook <https://pre-commit.com>`_ to
Expand All @@ -104,13 +108,26 @@ Installing a Development Version
Building Documentation
----------------------

To build a local copy of the docs, from the repo root directory, do
Before building the documentation, one must install the documentation specific dependencies by running

::

pip install -r docs_requirements.txt

Then, a local copy of the documentation can be built from the respository root directory by running

::

python setup.py build_sphinx


Alternatively, one can also build the documentation by running the following from the `docs/` directory

::

make html



Contributing Code
-----------------
Expand Down Expand Up @@ -203,7 +220,7 @@ scico-data repositories must be updated and kept in sync.

1. Add the ``new_data.npz`` file to the ``scico/data`` directory.

2. Navigate to the ``data`` directory and add/commit the new data file:
2. Change directory to the ``data`` directory and add/commit the new data file:

::

Expand Down
15 changes: 15 additions & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ Usage Examples
.. toctree::
:maxdepth: 1

.. _example_dependencies:

Example Dependencies
--------------------

Some examples use additional dependencies, which are listed in `examples_requirements.txt <https://github.com/lanl/scico/blob/main/examples/examples_requirements.txt>`_.
The additional requirements should be installed via pip, with the exception of ``astra-toolbox``,
which should be installed via conda:

::

conda install -c astra-toolbox astra-toolbox
pip install -r examples/examples_requirements.txt # Installs other example requirements

The dependencies can also be installed individually as required.

Organized by Application
------------------------
Expand Down
42 changes: 2 additions & 40 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,56 +54,18 @@ The instructions above install a CPU-only version of SCICO. To install a version

::

pip install --upgrade "jaxlib==0.1.70+cuda110" -f https://storage.googleapis.com/jax-releases/jax_releases.html
pip install --upgrade "jaxlib==0.1.75+cuda110" -f https://storage.googleapis.com/jax-releases/jax_releases.html



Additional Dependencies
-----------------------

We use the `ASTRA Toolbox <https://www.astra-toolbox.com/>`_ for tomographic projectors. We currently require the development version of ASTRA, as suggested by the package maintainers.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first sentence here seems to have been lost (rather than moved) in the edits.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it since it seemed that we are explaining why we need astra but not why we need the other example_requirements. Shall I add a few sentences to explain how we are using each of the example_requirements or just add back this sentence on astra?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. I'm OK with leaving it as-is.


The development version of ASTRA can be installed using conda:

::

conda install -c astra-toolbox/label/dev astra-toolbox

Alternatively, it can be `built from source <https://www.astra-toolbox.com/docs/install.html#for-python>`_.

We also support the `Super-Voxel Model-Based Iterative Reconstruction <https://svmbir.readthedocs.io/en/latest/>`_ package as an alternative tomographic projector. Since this package can be installed via ``pip``, it is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we mention astra, perhaps svmbir also deserves an explicit mention, despite being included in the requirements file?

included in the list of package dependencies (``requirements.txt``), and need
not be separately installed.
For instructions on installing dependencies related to the examples please see :ref:`example_notebooks`.


For Developers
--------------

For installing a version of SCICO suitable for development,
see the instructions in :ref:`scico_dev_contributing`.


Building Documentation
----------------------

The documentation can be built from the respository root directory by doing

::

python setup.py build_sphinx

Alternatively:

1. Navigate to the docs directory ``docs/``

2. Install dependencies

::

pip install -r docs_requirements.txt

3. Build documentation

::

make html
2 changes: 1 addition & 1 deletion examples/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ A number of files in this directory assist in the mangement of the usage example
`examples_requirements.txt <examples_requirements.txt>`_
Requirements file (as used by ``pip``) listing additional dependencies for running the usage example scripts.

`notebooks_requirements.txt <examples_requirements.txt>`_
`notebooks_requirements.txt <notebooks_requirements.txt>`_
bwohlberg marked this conversation as resolved.
Show resolved Hide resolved
Requirements file (as used by ``pip``) listing additional dependencies for building the Jupyter notebooks from the usage example scripts.

`makenotebooks.py <makenotebooks.py>`_
Expand Down
1 change: 1 addition & 0 deletions examples/examples_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
astra-toolbox
cached_property
bwohlberg marked this conversation as resolved.
Show resolved Hide resolved
colour_demosaicing
xdesign
ray[tune]
Expand Down