Skip to content

Commit

Permalink
DOC: Reorder devguide headers
Browse files Browse the repository at this point in the history
  • Loading branch information
carterbox committed May 15, 2023
1 parent c32c25a commit 183e35f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 59 deletions.
24 changes: 15 additions & 9 deletions INSTALL.rst
@@ -1,5 +1,9 @@
Building TomoPy
===============


Installing dependencies
=======================
-----------------------
To build and run TomoPy, you will need to install at least the dependencies
listed in ``envs/{platform}-{version}.yml`` plus additional dependencies based
on your platform. For convenience, installing requirements for building
Expand All @@ -12,20 +16,21 @@ dependencies. If you already have a conda environment named tomopy. Use the
`-n` option to name it something else.

Additional Windows Requirements
-------------------------------
```````````````````````````````
The Windows VC++2017 compiler cannot be distributed through conda. The conda
package for this compiler creates link from the system provided compiler
to the conda environment into which it is installed. Install VC++2017 using
the Windows Build Tools installer; Visual Studio (the IDE) is not required
to build TomoPy.

Additional CUDA Requirements
----------------------------
````````````````````````````
The CUDA compiler cannot be distributed through conda. Building TomoPy with
GPU features requires the CUDA Toolkit and NVCC.

Building TomoPy
===============

Compiling TomoPy
----------------

TomoPy is built/packaged in two parts: the python-only modules and the
compiled shared libraries. The python module searches the library path at
Expand All @@ -35,18 +40,19 @@ developing the python parts does not require building the compiled parts; the
compiled parts may be installed precompiled using conda.

TomoPy (the python-only modules)
--------------------------------
````````````````````````````````

After navigating to inside the `tomopy` directory, you can install TomoPy by
running the install script in the typical Python way::

$ pip install . --no-deps

libtomo (the compiled shared libraries)
---------------------------------------
```````````````````````````````````````

The shared libraries are a CMake project which are installed in the typical
way::
The shared libraries are a `CMake
<https://cmake.org/cmake/help/latest/index.html>`_ project which are installed
in the typical way::

$ mkdir build
$ cd build
Expand Down
106 changes: 56 additions & 50 deletions doc/source/devguide.rst
Expand Up @@ -9,8 +9,12 @@ to the TomoPy project.
:local:


Working with GitHub
===================


Cloning the repository
======================
----------------------

The project is maintained on GitHub, which is a version control and a
collaboration platform for software developers. First register on `GitHub
Expand All @@ -34,6 +38,50 @@ and ask you where you want to save it. Select a location in your
computer and feel comfortable with making modifications in the code.


Committing changes
------------------

After making some changes in the code, take a *snapshot* of the edits you made.
That's when you make a *commit*. To do this, launch the GitHub desktop
application and it should provide you all the changes in your code since your
last commit. Write a brief *Summary* and *Description* about the changes you
made and click the **Commit** button:

.. image:: img/commit-screen.png

Remember that you are writing these messages to help other people understand the
changes that you have made to the code.


Publishing your changes
-----------------------

Once you feel that the functionality you added would benefit the community, then
you should consider contributing back to the TomoPy project. You will need to
push your local commits to GitHub, then go to your online GitHub repository of
the project and click on the *green* button to compare, review, and create a
pull request.

.. image:: img/create-revision.png

After clicking on this button, you are presented with a review page where you
can get a high-level overview of what exactly has changed between your forked
branch and the original TomoPy repository. When you're ready to submit your pull
request, click **Create pull request**:

.. image:: img/create-pr.png

Clicking on **Create pull request** sends you to a discussion page, where you
can enter a title and helpful description. It’s important to provide as much
useful information and a rationale for why you’re making this Pull Request in
the first place.

When you’re ready typing out your heartfelt argument, click on **Send pull
request**. You’re done!

.. This text is partially adopted from GitHub guides and Wikipedia.
.. include:: ../../INSTALL.rst


Expand Down Expand Up @@ -97,56 +145,14 @@ parameters::
Package versioning
==================

We follow the X.Y.Z (Major.Minor.Patch) semantic for package versioning. The
patch number is incremented for minor changes and bug fixes which do not change
the software's API. The minor version is incremented for releases which add new,
but backward-compatible, API features, and the major version is incremented for
API changes which are not backward-compatible. For example, software which
relies on version 2.1.5 of an API is compatible with version 2.2.3, but not
necessarily with 3.2.4.
We follow the X.Y.Z (Major.Minor.Patch) `semantic for package versioning
<https://semver.org/>`_. The patch number is incremented for minor changes and
bug fixes which do not change the software's API. The minor version is
incremented for releases which add new, but backward-compatible, API features,
and the major version is incremented for API changes which are not
backward-compatible. For example, software which relies on version 2.1.5 of an
API is compatible with version 2.2.3, but not necessarily with 3.2.4.

We manage our versions using git tags, and the `setuptools_scm` package.


Committing changes
==================

After making some changes in the code, take a *snapshot* of the edits you made.
That's when you make a *commit*. To do this, launch the GitHub desktop
application and it should provide you all the changes in your code since your
last commit. Write a brief *Summary* and *Description* about the changes you
made and click the **Commit** button:

.. image:: img/commit-screen.png

Remember that you are writing these messages to help other people understand the
changes that you have made to the code.


Publishing your changes
=======================

Once you feel that the functionality you added would benefit the community, then
you should consider contributing back to the TomoPy project. You will need to
push your local commits to GitHub, then go to your online GitHub repository of
the project and click on the *green* button to compare, review, and create a
pull request.

.. image:: img/create-revision.png

After clicking on this button, you are presented with a review page where you
can get a high-level overview of what exactly has changed between your forked
branch and the original TomoPy repository. When you're ready to submit your pull
request, click **Create pull request**:

.. image:: img/create-pr.png

Clicking on **Create pull request** sends you to a discussion page, where you
can enter a title and helpful description. It’s important to provide as much
useful information and a rationale for why you’re making this Pull Request in
the first place.

When you’re ready typing out your heartfelt argument, click on **Send pull
request**. You’re done!

.. This text is partially adopted from GitHub guides and Wikipedia.

0 comments on commit 183e35f

Please sign in to comment.