File: developer.rst

package info (click to toggle)
python-pysam 0.20.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,348 kB
  • sloc: ansic: 137,388; python: 8,501; sh: 283; makefile: 263; perl: 41
file content (80 lines) | stat: -rw-r--r-- 1,941 bytes parent folder | download
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
=================
Developer's guide
=================

Code organization
=================

The top level directory is organized in the following 
directories:

:file:`pysam`
   Code specific to pysam.

:file:`doc`
   The documentation. To build the latest documentation, first install 
   `Sphinx`_ and then type::

       make -C doc html

:file:`tests`
   Code and data for testing and benchmarking.

:file:`htslib`
   Source code from `htslib`_ shipped with pysam. See
   :file:`import.py` about importing.

:file:`samtools`
   Source code from `samtools`_ shipped with pysam. See
   :file:`import.py` about importing.

:file:`bcftools`
   Source code from `bcftools`_ shipped with pysam. See
   :file:`import.py` about importing.


Importing new versions of htslib and samtools
=============================================

See instructions in :file:`import.py` to import the latest
versions of `htslib`_, `samtools`_ and `bcftools`_.

Unit testing
============

Unit tests are in the :file:`tests` directory. To run all unit tests,
run::

   pytest tests

Most tests use test data from the :file:`tests/*_data` directories.
Some of these test data files are generated from other files in these
directories, which is done by running ``make`` in each directory::

   make -C tests/pysam_data
   # etc

Alternatively if any :file:`tests/*_data/all.stamp` file is not already
present, running the unit tests should generate that directory's data
files automatically.

Benchmarking
============

To run the benchmarking suite, make sure that `pytest-benchmark
<https://github.com/ionelmc/pytest-benchmark>`_ is installed. To run
all benchmarks, type::

   pytest tests/*_bench.py

See :ref:`Benchmarking` for more on this topic.

Contributors
============

Please see Github for a list of all contributors:

https://github.com/pysam-developers/pysam/graphs/contributors

Many thanks to all contributors for helping in making pysam
useful.