Commit a32b92ba473ba04030fb8b851ef29704a793898a
1 parent
6e13a871
Add profiling and release information for developers
Showing
10 changed files
with
222 additions
and
1 deletions
doc/source/develop/index.rst
| @@ -29,13 +29,15 @@ You are highly invited to join one of the next coding sprints. | @@ -29,13 +29,15 @@ You are highly invited to join one of the next coding sprints. | ||
| 29 | You can also follow `@ctools_software <https://twitter.com/ctools_software>`_ on | 29 | You can also follow `@ctools_software <https://twitter.com/ctools_software>`_ on |
| 30 | twitter to get informed about new ctools releases. | 30 | twitter to get informed about new ctools releases. |
| 31 | 31 | ||
| 32 | -Below a few links to learn how to contribute to ctools: | 32 | +Below some reasources to learn how to contribute to ctools: |
| 33 | 33 | ||
| 34 | .. toctree:: | 34 | .. toctree:: |
| 35 | :maxdepth: 1 | 35 | :maxdepth: 1 |
| 36 | 36 | ||
| 37 | git/index | 37 | git/index |
| 38 | coding/index | 38 | coding/index |
| 39 | + profiling/index | ||
| 40 | + releasing/index | ||
| 39 | 41 | ||
| 40 | And here some status shields: | 42 | And here some status shields: |
| 41 | 43 |
doc/source/develop/profiling/index.rst
0 → 100644
doc/source/develop/profiling/install.rst
0 → 100644
| 1 | +.. _dev_profiling_install: | ||
| 2 | + | ||
| 3 | +Installing valgrind | ||
| 4 | +=================== | ||
| 5 | + | ||
| 6 | +Mac OS X | ||
| 7 | +-------- | ||
| 8 | + | ||
| 9 | +The tools necessary to profile ctools on Mac OS X are best installed using | ||
| 10 | +Homebrew. Below the sequence of things that need to be installed: | ||
| 11 | + | ||
| 12 | +.. code-block:: bash | ||
| 13 | + | ||
| 14 | + $ brew install qcachegrind | ||
| 15 | + $ brew install valgrind | ||
| 16 | + $ brew install GraphViz | ||
| 17 | + | ||
| 18 | +Now you should have ``qcachegrind`` and ``valgrind`` installed: | ||
| 19 | + | ||
| 20 | +.. code-block:: bash | ||
| 21 | + | ||
| 22 | + $ which qcachegrind | ||
| 23 | + /usr/local/bin/qcachegrind | ||
| 24 | + $ which valgrind | ||
| 25 | + /usr/local/bin/valgrind |
doc/source/develop/profiling/qcachegrind.png
0 → 100644
683 KB
doc/source/develop/profiling/usage.rst
0 → 100644
| 1 | +.. _dev_profiling_usage: | ||
| 2 | + | ||
| 3 | +Using valgrind | ||
| 4 | +============== | ||
| 5 | + | ||
| 6 | +Mac OS X | ||
| 7 | +-------- | ||
| 8 | + | ||
| 9 | +A valgrind analysis is performed using the ``valgrind`` executable. Here we | ||
| 10 | +show as example how the :ref:`ctobssim` tool is profiled. The ``valgrind`` | ||
| 11 | +executable should be run in a specific repository since a large number of | ||
| 12 | +output files will be generated by the tool. | ||
| 13 | + | ||
| 14 | +.. code-block:: bash | ||
| 15 | + | ||
| 16 | + $ valgrind --tool=callgrind -v --dump-every-bb=10000000 ctobssim ra=83.63 dec=22.01 rad=5.0 tmin=0.0 tmax=1800.0 emin=0.1 emax=100.0 caldb=prod2 irf=South_0.5h inmodel=$CTOOLS/share/models/crab.xml outevents=events.fits | ||
| 17 | + | ||
| 18 | +While the ``valgrind`` executable is still running you can start already the | ||
| 19 | +``qcachegrind`` executable that will display the analysis results: | ||
| 20 | + | ||
| 21 | +.. code-block:: bash | ||
| 22 | + | ||
| 23 | + $ qcachegrind | ||
| 24 | + | ||
| 25 | +This will open up a window with the profiling results displayed in tabular and | ||
| 26 | +graphical form. An example of the window is shown in the figure below: | ||
| 27 | + | ||
| 28 | +.. figure:: qcachegrind.png | ||
| 29 | + :width: 600px | ||
| 30 | + :align: center | ||
| 31 | + | ||
| 32 | + *qcachegrind window* |
doc/source/develop/releasing/create.rst
0 → 100644
| 1 | +.. _dev_releasing_create: | ||
| 2 | + | ||
| 3 | +Create the release | ||
| 4 | +================== | ||
| 5 | + | ||
| 6 | +The ctools release is created by invoking the release manager: | ||
| 7 | + | ||
| 8 | +.. code-block:: bash | ||
| 9 | + | ||
| 10 | + $ dev/release.py | ||
| 11 | + ctools release manager | ||
| 12 | + ====================== | ||
| 13 | + | ||
| 14 | + [1] Make a new release | ||
| 15 | + [2] Set the package version in current branch | ||
| 16 | + [3] Set the libtool version in current branch | ||
| 17 | + [4] Commit changes in current branch | ||
| 18 | + [5] Create tarball from current branch | ||
| 19 | + [6] Check tarball | ||
| 20 | + [q] Quit | ||
| 21 | + Enter your choice: | ||
| 22 | + | ||
| 23 | +To create a new release type ``1``. You will then be guided through a number | ||
| 24 | +of questions. In the example below we show how you go from the development | ||
| 25 | +version ``1.2.0.dev1`` to the release ``1.2.0``. The first step is to create | ||
| 26 | +a ``release`` branch. | ||
| 27 | + | ||
| 28 | +.. code-block:: bash | ||
| 29 | + | ||
| 30 | + Make a new release | ||
| 31 | + ------------------ | ||
| 32 | + Step 1: Do you want to create a 'release' branch? (y/n): y | ||
| 33 | + Created new branch 'release' | ||
| 34 | + Switched to a new branch 'release' | ||
| 35 | + | ||
| 36 | +Then you have to set the version number of the release. | ||
| 37 | + | ||
| 38 | +.. code-block:: bash | ||
| 39 | + | ||
| 40 | + Step 2: Current ctools version is '1.2.0.dev1'. Do you want to change the package version? (y/n): y | ||
| 41 | + Current ctools version is '1.2.0.dev1'. Please enter new ctools version: 1.2.0 | ||
| 42 | + Change version to '1.2.0'? (y/n): y | ||
| 43 | + ctools version changed to '1.2.0' | ||
| 44 | + | ||
| 45 | +After this the libtool version number will be set. **The libtool version number | ||
| 46 | +will in general be different from the release version number.** The new libtool | ||
| 47 | +version number is determined from the source code and interface changes with | ||
| 48 | +respect to the last release. You therefore have to answer a couple of | ||
| 49 | +questions about the changes you did. | ||
| 50 | + | ||
| 51 | +.. code-block:: bash | ||
| 52 | + | ||
| 53 | + Step 3: Current Libtool version is '2:0:0'. Do you want to change the libtool version? (y/n): y | ||
| 54 | + Current libtool version is '2:0:0'. Do you want to change the version? (y/n): y | ||
| 55 | + Has the source code changed since last release? (y/n): y | ||
| 56 | + Have interfaces been added since last release? (y/n): y | ||
| 57 | + Have interfaces been removed since last release? (y/n): y | ||
| 58 | + Have interfaces changed since last release? (y/n): y | ||
| 59 | + Libtool version changed to '3:0:0' | ||
| 60 | + | ||
| 61 | +Then you have to commit all changes and push then into the git repository. | ||
| 62 | + | ||
| 63 | +.. code-block:: bash | ||
| 64 | + | ||
| 65 | + Step 4: Commit changes? (y/n): y | ||
| 66 | + The following files have been changed: | ||
| 67 | + M README.md | ||
| 68 | + M configure.ac | ||
| 69 | + M ctools.pc.in | ||
| 70 | + M doc/Doxyfile | ||
| 71 | + M doc/source/conf.py | ||
| 72 | + M sonar-project.properties | ||
| 73 | + Commit all changes? (y/n): y | ||
| 74 | + [release 6d01085] ctools package version set to '1.2.0' and libtool version set to '3:0:0' | ||
| 75 | + 6 files changed, 9 insertions(+), 9 deletions(-) | ||
| 76 | + | ||
| 77 | + Step 5: Push changes? (y/n): y | ||
| 78 | + Counting objects: 10, done. | ||
| 79 | + Delta compression using up to 8 threads. | ||
| 80 | + Compressing objects: 100% (10/10), done. | ||
| 81 | + Writing objects: 100% (10/10), 809 bytes | 0 bytes/s, done. | ||
| 82 | + Total 10 (delta 8), reused 0 (delta 0) | ||
| 83 | + remote: To https://github.com/ctools/ctools.git | ||
| 84 | + remote: * [new branch] release -> release | ||
| 85 | + To https://cta-gitlab.irap.omp.eu/ctools/ctools.git | ||
| 86 | + * [new branch] release -> release | ||
| 87 | + | ||
| 88 | +You then should build and check the source tarball to verify that everything | ||
| 89 | +went fine. Note that this step is not formally needed for a release since | ||
| 90 | +the software release will start from the code in the ``release`` branch. | ||
| 91 | + | ||
| 92 | +.. code-block:: bash | ||
| 93 | + | ||
| 94 | + Step 6: Build tarball? (y/n): y | ||
| 95 | + Log actions in logfile? (y/n): y | ||
| 96 | + Configure package | ||
| 97 | + Package configuration successful | ||
| 98 | + Create tarball | ||
| 99 | + Tarball creation successful | ||
| 100 | + | ||
| 101 | + Step 7: Check tarball? (y/n): y | ||
| 102 | + Log check in logfile? (y/n): y | ||
| 103 | + Configure package | ||
| 104 | + Package configuration successful | ||
| 105 | + Check tarball | ||
| 106 | + Tarball checking successful | ||
| 107 | + | ||
| 108 | +Now you are done and can quite the release manager. | ||
| 109 | + | ||
| 110 | +.. code-block:: bash | ||
| 111 | + | ||
| 112 | + [1] Make a new release | ||
| 113 | + [2] Set the package version in current branch | ||
| 114 | + [3] Set the libtool version in current branch | ||
| 115 | + [4] Commit changes in current branch | ||
| 116 | + [5] Create tarball from current branch | ||
| 117 | + [6] Check tarball | ||
| 118 | + [q] Quit | ||
| 119 | + Enter your choice: q | ||
| 120 | + | ||
| 121 | + |
doc/source/develop/releasing/index.rst
0 → 100644
doc/source/develop/releasing/merge.rst
0 → 100644
doc/source/develop/releasing/pipeline.rst
0 → 100644
doc/source/develop/releasing/tag.rst
0 → 100644