Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 18 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,68 +100,46 @@ If IMAS is not available, tofu will simply display a warning stating that the im
tofu can thus easily load and handle multiple IDSs (IMAS data structure units) and provide command-line tools for exporting IMAS data to other general tofu classes (e.g.: Cameras, Plasma2D...) and for interactive plotting.
All tofu objects have methods to facailitate in-python-console introspection, the ``__repr__`` method is overloaded to display relevant information, an dthis is widely used to explore the data loaded from IMAS.

Do you want to use **tofu** on IMAS and don't know where to start? [See our wiki.](https://github.com/ToFuProject/tofu/wiki/Using-tofu-on-IMAS-server)
Do you want to use **tofu** on IMAS and don't know where to start?
[See our documetation.](https://tofuproject.github.io/tofu/installation.html#using-tofu-on-a-iter-cluster)

----


## Installing tofu


### For Windows


- [Follow this link to know how to configure your Windows to code on ToFu !](https://github.com/ToFuProject/tofu/wiki/Installing-tofu-on-windows)

### For Ubuntu / Mac
### For Ubuntu

#### Standard mode

``` conda install -c tofuproject tofu ```

#### Developer mode

Install dependencies


python (>= 3.6)
numpy
scipy
matplotlib
cython >= 0.26
nose
pygments
pandas


Checkout the tofu git repository and from the top directory


python setup.py build_ext --inplace
python setup.py install


## Getting Started

See our wiki's page: [Getting started](https://github.com/ToFuProject/tofu/wiki/Getting-started)
## For Developers and other platforms

[See our documentation.](https://tofuproject.github.io/tofu/installation.html)
-----


**Licensing**
**Licensing**

It is distributed under the MIT license and aims at providing the fusion community with
a transparent and modular tool for creating / designing diagnostics and using them for
synthetic diagnostic (direct problem) and tomography (inverse problem).
It is distributed under the MIT license and aims at providing the fusion
community with a transparent and modular tool for creating / designing
diagnostics and using them for synthetic diagnostic (direct problem)
and tomography (inverse problem).

**History**

It was first created at the Max-Planck Institute for Plasma Physics (IPP) in Garching, Germany,
by Didier Vezinet, and is now maintained / debugged / updated by a team of contributors.
It was first created at the Max-Planck Institute for Plasma Physics (IPP)
in Garching, Germany, by Didier Vezinet, and is now maintained, debugged
and updated by a team of contributors.


-----

**Warning**
This Pypi package focuses on tomography for fusion research.
It uses the same name as a previous package dedicated to a testing framework coupling fixtures and tests loosely, now renamed **reahl-tofu** and developped by Iwan Vosloo since 2006. If you ended up here looking for a web-oriented library, you should probably redirect to the more recent [**reahl-tofu**](https://pypi.python.org/pypi/reahl-tofu) page.
It uses the same name as a previous package dedicated to a testing framework
coupling fixtures and tests loosely, now renamed **reahl-tofu** and developped
by Iwan Vosloo since 2006. If you ended up here looking for a web-oriented
library, you should probably redirect to the more recent
[**reahl-tofu**](https://pypi.python.org/pypi/reahl-tofu) page.
3 changes: 3 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import sys
import tofu as tf
import sphinx_bootstrap_theme
from sphinx_gallery.sorting import FileNameSortKey

# Getting tofu version
tf_version = tf.__version__[:3]
Expand Down Expand Up @@ -354,6 +355,8 @@
sphinx_gallery_conf = {
"examples_dirs": "../../examples", # path to your example scripts
"gallery_dirs": "auto_examples", # path to save gallery generated output
"within_subsection_order": FileNameSortKey,
'filename_pattern': '/tuto_plot_',
}


Expand Down
56 changes: 51 additions & 5 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
Contribute to tofu
==================

Contributing to tofu
====================

You found a bug, or you want to add something to the library ? This
You found a bug, or you want to add something to the library? This
tutorial will show you how to get the repository and the first steps to
contribute to the project.

Bug reports and suggestions
----------------------------

If you found a bug in **tofu**, or if you have a suggestion, the best is to open
an issue directly on our `github page <https://github.com/ToFuProject/tofu/issues>`_.
If you are opening an issue related to a bug found, please specify the version
of the librairies (**tofu**, python, etc.) you are using, any configuration
information that might be helpful to us (OS, server, how you installed
**tofu**), a minimal example to recreate the bug (if possible), and the log
files or errors you might have got.



Developping in the code
-----------------------

The basic tools
"""""""""""""""

There are many tools and concepts to get familiar with when contributing
to an **open-source python library**. A good place to get started is the
`scikit-project <https://github.com/nathanshammah/scikit-project>`__.
Expand Down Expand Up @@ -66,12 +84,20 @@ environment.
- Make sure tests are running ``nosetests``


Where to start?
"""""""""""""""

If you wish to contribute, but don't know where to start, check `our
open issues <https://github.com/ToFuProject/tofu/issues>`__. You can
also read `this
tutorial <https://github.com/firstcontributions/first-contributions>`__,
on how to contribute to a github project. Before modifying the code, you
on how to contribute to a github project.


Git branches and pull requests
""""""""""""""""""""""""""""""

Before modifying the code, you
should create a new branch (based on the *devel* branch) and switch to it.

::
Expand All @@ -88,3 +114,23 @@ page <https://github.com/ToFuProject/tofu/pulls>`__, from your branch,
accept it.



Continuous integration
""""""""""""""""""""""

For each pull request (PR) on github, there will be a series of tests run to
make sure the modifications introduced to the library did not introduce any
errors. If all tests pass, you should see something like the image below.

.. image:: images/travis.png

If there is an error (red cross instead of green check) it can be either that
your code is breaking the normal functionning of the code, or (less probably)
that there is a bug in the unit tests. Please try and understand what went wrong.
If you cannot find the problem, you can ask for help by commenting on the PR.
Additionally to the unit tests, we have integrated pep8speaks_, a bot that will
check your coding style.

.. _pep8speaks: https://pep8speaks.com/

.. image:: images/pep8speaks.png
Binary file added doc/source/images/pep8speaks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/images/travis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 15 additions & 12 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,25 @@ interactive plots.
<div style="clear: both"></div>
<div class="container-fluid hidden-xs hidden-sm">
<div class="row">
<a href="auto_examples/tutorials/plot_basic_tutorial.html">
<div class="col-md-4 thumbnail">
<img src="_images/sphx_glr_plot_basic_tutorial_thumb.png">
<a href="auto_examples/tutorials/tuto_plot_basic.html">
<div class="col-md-3 thumbnail">
<img src="_images/sphx_glr_tuto_plot_basic_thumb.png">
</div>
</a>
<a href="auto_examples/tutorials/plot_create_geometry.html">
<div class="col-md-4 thumbnail">
<img src="_images/sphx_glr_plot_create_geometry_thumb.png">
<a href="auto_examples/tutorials/tuto_plot_create_geometry.html">
<div class="col-md-3 thumbnail">
<img src="_images/sphx_glr_tuto_plot_create_geometry_thumb.png">
</div>
</a>
<a href="auto_examples/tutorials/tuto_plot_custom_emissivity.html">
<div class="col-md-3 thumbnail">
<img src="_images/sphx_glr_tuto_plot_custom_emissivity_thumb.png">
</div>
</a>
</div>
</div>

Contents:
Contents
---------

**Tutorials and how to's:**
Expand All @@ -60,7 +65,6 @@ Contents:
A guide to contributing to tofu <contributing.rst>
Tutorials and examples <auto_examples/index.rst>


* How to create / handle a diagnostic geometry
- Visit the basic_ tutorial for getting started: create, plot and save
your first configuration: a vessel and its structures;
Expand All @@ -75,11 +79,10 @@ Contents:
- Use existing diagnostic geometry and signals to solve the inverse problem
and compute tomographic inversions using a choice of discretization basis
functions and regularisation functionals.
How to contribute (todos_)

.. _basic: auto_examples/tutorials/plot_create_geometry.html
.. _cameras: auto_examples/tutorials/plot_basic_tutorial.html
.. _tutorial: Tutorial_Geom_SynthDiag_Basic.html
.. _basic: auto_examples/tutorials/tuto_plot_create_geometry.html
.. _cameras: auto_examples/tutorials/tuto_plot_basic.html
.. _tutorial: auto_examples/tutorials/tuto_plot_custom_emissivity.html
.. _todos: Todos.html


Expand Down
5 changes: 2 additions & 3 deletions doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ your choice).

::

python -c "import tofu; print(tofu.__version__)"
$ python -c "import tofu; print(tofu.__version__)"

Now you can `follow a tutorial. <auto_examples/index.html>`__

Expand Down Expand Up @@ -128,7 +128,7 @@ To install tofu as a developer, we recommend using the conda ecosystem (Minicond
- Move to where you would like to install your local copy of ToFu ``$ cd some_path``
- ``$ git clone https://github.com/ToFuProject/tofu.git`` (make sure you
remember the path where you are installing, if you want to install it
into your home repository, just make sure to ``cd ~`` before the
into your home repository, just make sure to ``$ cd ~`` before the
``git clone...``)
- Move to the "cloned" tofu directory that has been created by the git clone command:
``cd ~/tofu``
Expand All @@ -142,4 +142,3 @@ To install tofu as a developer, we recommend using the conda ecosystem (Minicond
tofu Cython extensions and install it into your conda environment while you can still
modify the source files in the current repository.`
- Make sure tofu tests are running by typing ``nosetests``

7 changes: 7 additions & 0 deletions doc/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tofu
====

.. toctree::
:maxdepth: 5

tofu
21 changes: 13 additions & 8 deletions doc/source/tofu.data.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
tofu.data package
=================

.. automodule:: tofu.data
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

Expand All @@ -20,6 +25,14 @@ tofu.data.\_core module
:undoc-members:
:show-inheritance:

tofu.data.\_core\_new module
----------------------------

.. automodule:: tofu.data._core_new
:members:
:undoc-members:
:show-inheritance:

tofu.data.\_def module
----------------------

Expand All @@ -44,11 +57,3 @@ tofu.data.\_plot module
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: tofu.data
:members:
:undoc-members:
:show-inheritance:
13 changes: 5 additions & 8 deletions doc/source/tofu.dumpro.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
tofu.dumpro package
===================

.. automodule:: tofu.dumpro
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

Expand Down Expand Up @@ -52,11 +57,3 @@ tofu.dumpro.\_plot module
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: tofu.dumpro
:members:
:undoc-members:
:show-inheritance:
13 changes: 5 additions & 8 deletions doc/source/tofu.dust.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
tofu.dust package
=================

.. automodule:: tofu.dust
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

Expand Down Expand Up @@ -28,11 +33,3 @@ tofu.dust.\_plot module
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: tofu.dust
:members:
:undoc-members:
:show-inheritance:
Loading