Commit d483e96d9afd1f05f7261a3d8823667a0201da52

Authored by Jürgen Knödlseder
1 parent 47f56461

Integrate code.

ChangeLog
... ... @@ -3,6 +3,7 @@
3 3 * Version 0.10.0 released
4 4 =========================
5 5  
  6 + Add tests for installed ctools version (#1486)
6 7 Create cscripts Python module, move obsutils in that module (#1470)
7 8 Add csinfo script (#1489)
8 9 Removed obsutils.spectrum() function (replaced by csspec)
... ...
... ... @@ -22,13 +22,18 @@ None
22 22 A specific cscripts Python module has been created for cscripts. This module
23 23 can be imported using
24 24  
25   - import cscripts
  25 + >>> import cscripts
26 26  
27 27 The obsutils utility functions have also been moved into the scripts folder.
28 28  
29 29 The obsutils.spectrum() function has been removed as it is now replaced by the
30 30 csspec script.
31 31  
  32 +Some tests for the installed ctools package have been added. They can be
  33 +executed by typing the following under Python:
  34 +
  35 + >>> cscripts.test()
  36 +
32 37  
33 38 4. Support model
34 39 ----------------
... ...
cscripts/Makefile.am
... ... @@ -5,31 +5,30 @@
5 5 # tsmerge.py
6 6 binscripts = tsmerge.py
7 7  
8   -# Scripts to be distributed in pythondir
  8 +# Scripts to be distributed in $(pythondir)/cscripts
9 9 pythonscripts = __init__.py \
10 10 cspull.py cssens.py cstsdist.py cscaldb.py csresmap.py \
11 11 cshessobs.py csobsdef.py csspec.py cslightcrv.py \
12 12 csinfo.py \
13 13 obsutils.py
14 14  
  15 +# Test scripts to be distributed in $(pythondir)/cscripts/tests
  16 +testscripts = tests/__init__.py \
  17 + tests/test_unbinned.py
  18 +
15 19 # Scripts for which symbolic links will be created in bindir
16 20 linkscripts = cspull cssens cstsdist cscaldb csresmap \
17 21 cshessobs csobsdef csspec cslightcrv \
18 22 csinfo
19 23  
20   -testscripts = tests/__init__.py \
21   - tests/test_unbinned.py \
22   - tests/test_binned.py
23   -
24   -
25 24 # Distribute scripts
26 25 EXTRA_DIST = $(binscripts) $(pythonscripts) $(testscripts)
27 26 binscriptsdir = $(bindir)
28 27 binscripts_DATA = $(binscripts)
29 28 pythonscriptsdir = $(pythondir)/cscripts
30 29 pythonscripts_DATA = $(pythonscripts)
31   -testscriptsdir = $(pythondir)/cscripts/tests
32   -testscripts_DATA = $(testscripts)
  30 +testscriptsdir = $(pythondir)/cscripts/tests
  31 +testscripts_DATA = $(testscripts)
33 32  
34 33 # Add hook rule to create symbolic links for cscripts
35 34 install-data-hook:
... ...
cscripts/tests/test_unbinned.py
... ... @@ -15,9 +15,9 @@ class TestUnbinnedAnalysis(unittest.TestCase):
15 15 """
16 16  
17 17 def setUp(self):
18   - gammalib_dir = os.environ['GAMMALIB']
  18 + gammalib_dir = os.environ['GAMMALIB']
19 19 self.model_name = os.path.join(gammalib_dir, "share/models/crab.xml")
20   - self.workdir = mkdtemp()
  20 + self.workdir = mkdtemp()
21 21  
22 22 def test_unbinned_fits(self):
23 23 """
... ...