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
82 changes: 82 additions & 0 deletions doc/source/dev_tutos.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
.. _devtutos:

=========================
Tutorials For Developers
=========================

Some tutorials for developers.

-----------------


-------------------
How To Do A Release
-------------------

1. Write down the release_notes:

a) in **rST** format: ``realeas_notes_XYZ.rst``
b) Start with a summary **Main Changes** (TL;DR version of the whole file)
c) add all issues and PR related references
d) add list of contributors
e) add list of perspectives and tag contributors

2. Release an alpha version:

a) Create an annotaded tag (do not use GitHub's release system) ``git tag -a X.Y.Z-alpha0 -m "annotation"``
b) Update the version of the repo: ``python -c "import _updateversion as up; out = up.updateversion(); print(out)"``
c) push on GitHub server
d) Verify that ONE build passes on travis:
the deployment on conda should pass for all travis-build, but for pypi only
the first build will pass
e) Install it locally on all available platforms and environments (by hand),
with all different packaging tools. And try some tests.
f) Easybuild: try to create a tarball for Jira machines
g) For IRFM servers, build the conda_recipe by hand:

.. code-block:: python

$ if [[ "$TRAVIS_PYTHON_VERSION" == "3.7-dev" ]]; then export VADD="py37"; else export VADD="py36"; fi
$ export CONDA_BLD_PATH=$(pwd)/conda-bld/ # you should be in the tofu dir
$ export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)")
$ export VERSION=$(echo $REV | tr - .)
$ echo $REV

#. Update the ``releases.rst`` file in the web documentation:

#. create a symbolic link from ``$TOFU_DIR/release_notes/release_notes_XYZ.rst`` to ``$TOFU_DIR/doc/source/release_notes/release_notes_XYZ.rst``
#. Update the ``.rst`` file
#. Make and publish doc (see tutorial below)

#. Release the real version:

a) Follow the same steps as for alpha version, just change the tag and annotation.

#. Send an email to users.


------------------------
How To Construct The Doc
------------------------

Adding text, updating the API:

#. The easiest way is to have two different repo: ``$TOFU_DIR``, for building the doc and ``$TOFU_DIR/../test_doc/tofu/`` for seeing the resulting html (always in the ``gh-pages`` branch)
#. If updating the API, make sure that you have installed the right version of **tofu**
#. Change to the ``new-doc`` branch
#. Go to ``$ cd $TOFU_DIR/doc/``
#. Modify the corresponding file (somewhere in ``src/a-file.rst``)
#. If you added a file
#. ``sphinx-apidoc -Mf -P -d 5 -o source/ ../tofu/ {../*test*,../*mag*,../*imas2tofu*,../*geom/inputs}``
#. ``$ make clean`` (to make sure only the needed files will be stored)
#. ``$ make html``
#. Go to the ``gh-pages`` branch and open the ``index.html`` file (from the top)
#. Commit and push the changes to the ``new-doc`` branch: to keep the changes in the sources
#. Commit and push the changes to the ``gh-pages``, this will update the website.


Adding a tutorial:

#. Add your tutorial in ``$TOFU_DIR/examples/tutorials`` with the proper naming conventions
#. The sphinx gallery is automatically updated when building the doc (as above)
#. Change the ``index.rst`` file to include a thumbnail of your tutorial
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ 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.
* Advanced tutorials for developpers: :ref:`devtutos`

.. _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


**Code documentation:**
Expand Down
115 changes: 115 additions & 0 deletions doc/source/release_notes/release_notes_142.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
====================
What's new in 1.4.2
====================

Main changes:
=============

- Python 2.7 is not supported anymore
- Python 3.6 and 3.7 are supported
- Several changes to try and make installation easier (on clusters, windows, mac....) and less verbose for users
- More explicit names for default saved configurations
- Major bug fix in one of the methods for computing synthetic signal
- Minor bug fixes in interactive figures
- Minor bug fixes in Plasma2D interpolation
- New configuration (ITER) available
- First version of a class handling 2D XRay bragg spectrometers
- First tools for magnetic field line tracing available on WEST
- Better documentation, more ressources
- More informative error messages
- extra tools for computing LOS length, closest point to magnetic axis...
- Better PEP8 compliance


Detailed changes:
=================

Installation / portability:
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Bug fixes for installation on ITER and Gateway clusters #250
- Easier installation on Mac #183 (``requirements.txt``)
- Removed explicit compiler specification in ``setup.py`` for more flexibility
- When sub-packages imas2tofu or mag are missing, the warning is much more concise, but the error traceback is still accessible in a hidden dictionnary for developpers #243
- ``python setup.py clean`` now doesn't cythonize
- Dropped python 2 support: #228
- merged ``_GG02`` and ``_GG03`` into the ``_GG`` file
- no longer being tested in travis
- no longer packaged in conda
- updated README file accordingly
- dropped ``funcsigs`` dependency
- made necessary changes in ``setup.py``
- ``benchmarks/calc_signal_benchmark.py``: now working with python 3

Bug fixes:
~~~~~~~~~~
- Major bug fix in ``LOS_calc_signal()`` for computing the synthetic signal of a LOS camera using a particular algortihm : method='sum', minimize='hybrid', ani=True, #247 #255
- Major bug fix in ``LOS_get_sample()`` when ``minimize='hybrid'`` and ``minimize='memory'`` the limits were not set correctly
in some cases the formula for sampling a LOS was wrong (``los_get_sample_core_var_res``).
- Minor bug fixes in interactive figures when ``t=None`` was used (the interactivity was lost due to wrong formatting of the time array)
- Minor bug fixed in Plasma 2D interpolation (``interp_t`` was not being set), imporved error messages #209
- Removed unused variable in ``_Ves_get_sampleS`` (_GG), in ``_core.py`` #190
- Gave more explicit names to some variables in ``_core.py`` to avoid bugs/typos (eg. ``I`` to ``current``) #186
- Removed a secondary ``init`` function for the class ``tf.geom.CoilsPF`` #187
- ``_checkformat_inputs_dgeom`` now is a function of ``Rays`` class
- Change default separator in ``to_dict()`` from '_' to '.', #228
- Rays.calc_kInOut_IsoFlux() is now more flexible (accepts 3d np.arrays as well as lists of np.ndarrays), #188
- __repr__() is now overloaded in a more robust way so it falls back to printing the class if get_summary() fails to avoid crashing in debug mode #242

Documentation:
~~~~~~~~~~~~~~
- Updated information about support of python version
- Added slides of talk given at PyConFR 2019 conference
- Added a ``gallery`` in our documentation with 3 different tutorials:
- 5 minutes tutorial to show to create a geometry and 1D/2D cameras
- Guide on how to create your own Geometry from scratch (vacuum vessel, structures, etc.)
- How to compute the signal received by a camera using a synthetic signal.
For all of these tutorial, you can see directly the codes and the
resulting images, and you can get the source code or download it as a
Jupyter notebook!
- Minor changes to the web doc: updated install instructions to be "cleaner"
now in rST and not HTML), small changes in navigation bar.
- Guide on how to contribute to ToFu.

New features:
~~~~~~~~~~~~~
- First version of ``magnetic field line tracing`` (for WEST only so far, to be improved) #213 #235
- First version of ``2D XRay Bragg spectrometers`` for synthetic diagnostics, modelling the diagnotics geometry and providing 2d spectral fitting routines (to be improved) #267
- When computing a signal ``LOS_calc_signal`` emissivity function can now return
a 1D array if ``t=None`` #217 #252
- Three functions added to ``tf.geom.Rays``: #211
- ``calc_length_in_isoflux()``: compute the length inside a set of isoflux surfaces of each LOS
- ``calc_min_geom_radius()``: compute the minimal geometrical radius (impact parameter) of each LOS
- ``calc_min_rho_from_Plasma2D()``: compute the minimum normalized radius (or any field with a minimum on the axis) for each LOS
- New ``ITER configuration`` available! #220 #227
- More explicit names for default configurations #264

Contributors:
=============

Many thanks to all developpers:

- Didier Vezinet (@Didou09)
- Laura Mendoza (@lasofivec)
- Florian Le Bourdais (@flothesof)
- Jorge Morales (@jmoralesFusion)
- Koyo Munechika (@munechika-koyo)
- Louwrens Van Dellen (@Louwrensth)


What's next (indicative):
=========================
- Migrating from nosetests (ongoing for @lasofivec : issues #95 and #232 )
- Easier binary and source installs from pip and conda for all platforms, including unit tests on alla platforms (ongoing for @lasofivec and @flothesof : issue #92 and #259 )
- Solid angles for Volume-Of-Sight and radiative heat loads computation (ongoing for @lasofivec : Issues #71, #72, #73, #74, #75, #76, #77, #78 )
- Tools and classes to handle 2D Bragg X-Ray crystal spectrometer (ongoing for @Didou09 : Issues #202 and #263)
- Generic data classe to incorporate plateau-finding, data analysis and 1d Bayesian fitting routines and classes (ongoing for @Didou09 and @jmoralesFusion and @MohammadKozeiha: issues #208, #260 and #262)
- More general magnetic field line tracing workflow
- Better unit tests coverage
- More complete documentation


List of issues and PR closed:
=============================
- Issues: #30, #180, #183, #185, #186, #187, #188, #189, #190, #201, #209, #211, #213, #217, #220, #224, #227, #228, #230, #235, #243, #247, #248, #250, #252, #255, #264
- PR: #173, #175, #179, #181, #182, #184, #191, #192, #193, #194, #195, #196, #197, #199, #206, #207, #210, #212, #222, #223, #225, #226, #229, #231, #233, #234, #236, #237, #238, #240, #242, #244, #245, #246, #249, #251, #253, #254, #256, #257, #258,
#261, #265, #267
1 change: 1 addition & 0 deletions doc/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ Latest release
.. toctree::
:maxdepth: 1

release_notes/release_notes_142.rst
release_notes/release_notes_141.rst
release_notes/release_notes_140.txt
9 changes: 9 additions & 0 deletions doc/source/tofu.data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ tofu.data.\_plot module
:members:
:undoc-members:
:show-inheritance:

tofu.data.\_spectrafit2d module
-------------------------------

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

1 change: 1 addition & 0 deletions doc/source/tofu.dumpro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ tofu.dumpro.\_plot module
:members:
:undoc-members:
:show-inheritance:

1 change: 1 addition & 0 deletions doc/source/tofu.dust.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ tofu.dust.\_plot module
:members:
:undoc-members:
:show-inheritance:

25 changes: 25 additions & 0 deletions doc/source/tofu.geom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ tofu.geom.\_comp module
:undoc-members:
:show-inheritance:

tofu.geom.\_comp\_optics module
-------------------------------

.. automodule:: tofu.geom._comp_optics
:members:
:undoc-members:
:show-inheritance:

tofu.geom.\_core module
-----------------------

Expand All @@ -41,6 +49,14 @@ tofu.geom.\_core module
:undoc-members:
:show-inheritance:

tofu.geom.\_core\_optics module
-------------------------------

.. automodule:: tofu.geom._core_optics
:members:
:undoc-members:
:show-inheritance:

tofu.geom.\_def module
----------------------

Expand All @@ -65,6 +81,14 @@ tofu.geom.\_plot module
:undoc-members:
:show-inheritance:

tofu.geom.\_plot\_optics module
-------------------------------

.. automodule:: tofu.geom._plot_optics
:members:
:undoc-members:
:show-inheritance:

tofu.geom.\_raytracing\_tools module
------------------------------------

Expand Down Expand Up @@ -96,3 +120,4 @@ tofu.geom.utils module
:members:
:undoc-members:
:show-inheritance:

1 change: 1 addition & 0 deletions doc/source/tofu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ tofu.version module
:members:
:undoc-members:
:show-inheritance:

16 changes: 10 additions & 6 deletions release_notes/release_notes_142.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
====================
What's new in 1.4.2
====================

Main changes:
==========
=============

- Python 2.7 is not supported anymore
- Python 3.6 and 3.7 are supported
Expand All @@ -18,10 +22,10 @@ Main changes:


Detailed changes:
============
=================

Installation / portability:
---------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Bug fixes for installation on ITER and Gateway clusters #250
- Easier installation on Mac #183 (`requirements.txt`)
- Removed explicit compiler specification in `setup.py` for more flexibility
Expand All @@ -37,7 +41,7 @@ Installation / portability:
- `benchmarks/calc_signal_benchmark.py`: now working with python 3

Bug fixes:
-----------
~~~~~~~~~~
- Major bug fix in `LOS_calc_signal()` for computing the synthetic signal of a LOS camera using a particular algortihm : method='sum', minimize='hybrid', ani=True, #247 #255
- Major bug fix in `LOS_get_sample()` when `minimize='hybrid'` and `minimize='memory'` the limits were not set correctly
in some cases the formula for sampling a LOS was wrong (`los_get_sample_core_var_res`).
Expand All @@ -52,7 +56,7 @@ Bug fixes:
- __repr__() is now overloaded in a more robust way so it falls back to printing the class if get_summary() fails to avoid crashing in debug mode #242

Documentation:
--------------
~~~~~~~~~~~~~~
- Updated information about support of python version
- Added slides of talk given at PyConFR 2019 conference
- Added a `gallery` in our documentation with 3 different tutorials:
Expand All @@ -67,7 +71,7 @@ Documentation:
- Guide on how to contribute to ToFu.

New features:
---------------
~~~~~~~~~~~~~
- First version of `magnetic field line tracing` (for WEST only so far, to be improved) #213 #235
- First version of `2D XRay Bragg spectrometers` for synthetic diagnostics, modelling the diagnotics geometry and providing 2d spectral fitting routines (to be improved) #267
- When computing a signal `LOS_calc_signal` emissivity function can now return
Expand Down
2 changes: 1 addition & 1 deletion tofu/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Do not edit, pipeline versioning governed by git tags!
__version__ = '1.4.1-396-g806dbc9'
__version__ = '1.4.1-303-gf837259'