File: development.rst

package info (click to toggle)
hkl 5.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 26,708 kB
  • sloc: ansic: 56,730; haskell: 5,991; sh: 4,991; cpp: 1,854; makefile: 1,124; python: 925; xml: 76; lisp: 55
file content (133 lines) | stat: -rw-r--r-- 3,327 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.. _development:

Developpement
#############

Getting hkl
***********

To get hkl, you can download the last stable version from sourceforge or if you
want the latest development version use `git <http://git.or.cz/>`_ or
`msysgit <http://code.google.com/p/msysgit/downloads/list>`_ on windows system and
do::

  $ git clone git://repo.or.cz/hkl.git

or::

  $ git clone http://repo.or.cz/r/hkl.git (slower)

then checkout the next branch like this::

  $ cd hkl
  $ git checkout -b next origin/next

Building hkl
************

To build hkl you need `Python 2.3+ <http://www.python.org>`_ the
`GNU Scientific Library 1.12 <http://www.gnu.org/software/gsl/>`_
and `GLib-2.0 >= 2.3.4 <https://developer.gnome.org/glib/>`_::

  $ ./configure --disable-gui
  $ make
  $ sudo make install

you can also build a GUI interfaces which use `gtk <http://www.gtk.org>`_::

  $ ./configure
  $ make
  $ sudo make install

optionnaly you can build an experimental *libhkl3d* library (no public
API for now) which is used by the GUI to display and compute
diffractometer collisions (only the *K6C* model). To build it you need
also `gtkglext <https://projects.gnome.org/gtkglext/>`_ and
`bullet 2.82 <http://bulletphysics.org/wordpress/>`_::

  $ ./configure --enable-hkl3d
  $ make
  $ sudo make install

if you want to work on the documentation you need the extra

+ `gtk-doc <http://www.gtk.org/gtk-doc/>`_ for the api
+ `sphinx <http://sphinx.pocoo.org/>`_ for the html and latex doc.
+ `asymptote <http://asymptote.sourceforge.net/>`_ for the figures

::

  $ ./configure --enable-gtk-doc
  $ make
  $ make html

Hacking hkl
***********

Bug reporting
=============

You can find the bug tracker here `libhkl <https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=hkl>`_

* Debian/Ubuntu::

    $ reportbug hkl

* Other OS

  You just need to send an email::

    To: submit@bugs.debian.org
    From: xxx@yyy.zzz
    Subject: My problem with hkl...
  
    Package: hkl
    Version: |version|

    I found this problem in hkl...


Providing patchs
================

you can send your patch to `Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>`_ using ``git``

Here a minimalist exemple of the workflow to prepare and send a patch
for hkl. Suppose you wan to add a new feature to hkl create first a
new branch from the next one::

  $ git checkout -b my-next next

hack, hack::

  $ git commit -a

more hacks::

  $ git commit -a

now that your new feature is ready for a review, you can send by
email your work using git format-patch::

  $ git format-patch origin/next

and send generated files `0001_xxx`, `0002_xxx`, ... to the author.

Howto add a diffractometer
**************************

To add a new diffractometer, you just need to copy the
:file:`hkl/hkl-engine-template.c` into
:file:`hkl/hkl-engine-INSTITUT-BEAMLINE-INSTRUMENT.c` where you
replace the upper case with the appropriate values.

The template file is compiled during the build process to ensure that
it is always valid.

Then you just need to follow the instruction found in the template.
If you need some precision about the process, do not hesitate to
contact the main author.

do not forgot also to add this new file into :file:`hkl/Makefile.am`
with other diffractometers in the hkl_c_sources variable (please keep
the alphabetic order).