File: development.rst

package info (click to toggle)
odc 1.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,060 kB
  • sloc: cpp: 22,074; f90: 3,707; sh: 999; ansic: 471; python: 382; makefile: 39
file content (105 lines) | stat: -rw-r--r-- 2,170 bytes parent folder | download | duplicates (3)
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
Development
===========

Contributions
-------------

.. index:: Github

The code repository is hosted on `Github`_. Feel free to fork it and submit your PRs against the **develop** branch. The first time you do this, you will be asked to sign our Contributor License Agreement via an automatic comment in the pull request.

To clone the repository locally, you can use the following command:

.. code-block:: shell

   git clone --branch develop git@github.com:ecmwf/odc.git


.. index:: Dependencies; Development

Development Dependencies
------------------------

Required
~~~~~~~~

* C or C++ compiler
* `CMake`_ (>= 3.20.1)
* `ecbuild`_ (>= 3.6.1)
* `eckit`_ (>= 1.16.1)


Optional
~~~~~~~~

* Fortran compiler
* `Doxygen`_ (>= 1.9.1)


.. index:: Unit Tests

Run Unit Tests
--------------

To run the test suite, you can use the following command:

.. code-block:: shell

   # Setup environment variables (edit as needed)
   SRC_DIR=$(pwd)
   BUILD_DIR=build
   export eckit_DIR=$HOME/local # set to eckit prefix

   # Create the the build directory
   mkdir $BUILD_DIR
   cd $BUILD_DIR

   # Run ecbuild (CMake)
   ecbuild -- $SRC_DIR

   # Build and test
   make -j10
   make test


Optional Features
~~~~~~~~~~~~~~~~~

Fortran interface and its tests are an optional feature, and require an activation flag to be set during build configuration:

.. code-block:: shell

   ENABLE_FORTRAN=ON
   ecbuild -- -DENABLE_FORTRAN=$ENABLE_FORTRAN $SRC_DIR


.. index:: Dependencies; Documentation

Build Documentation
-------------------

The documentation is generated using Sphinx.

First, make sure that ``Doxygen`` module is available, and then install Python dependencies in your environment:

.. code-block:: shell

   pip install -r docs/requirements.txt


You can then build the documentation by using **make**:

.. code-block:: shell

   cd docs
   make html


The built HTML documentation will be available under the ``docs/_build/html/index.html`` path.


.. _`Github`: https://github.com/ecmwf/odc
.. _`cmake`: https://cmake.org
.. _`ecbuild`: https://github.com/ecmwf/ecbuild
.. _`eckit`: https://github.com/ecmwf/eckit
.. _`Doxygen`: https://www.doxygen.nl