Add steps to generate release notes
[docs.git] / docs / release-process / namespace.rst
1 **********
2 Namespaces
3 **********
4
5 Project namespaces in OpenDaylight are used to ensure projects do not have name
6 collisions in code and packages. OpenDaylight enforces namespaces in Nexus
7 using the following patterns:
8
9 - ^/org\.opendaylight\.PROJECT/.*
10 - ^/org/opendaylight/PROJECT/.*
11
12 Where PROJECT is the name of an OpenDaylight project.
13
14 In cases where a project has a sub-project we recommend adding an additional
15 level to the path for example `org.opendaylight.integration.test` however no
16 strong enforcement is currently enforced and some projects do this already
17 internally.
18
19 This restriction applies to all site repositories in Nexus as well in the event
20 that a project wishes to push a static web site into their allocated site path.
21
22 Maven / Java
23 ============
24
25 Maven has a built in namespace routing using <groupId> field in pom files.
26 For example:
27
28 .. code-block:: xml
29
30     <project>
31       <groupId>org.opendaylight.odlparent</groupId>
32       <artifactId>odlparent-lite</artifactId>
33       <version>1.8.0-SNAPSHOT</version>
34     </project>
35
36 Python
37 ======
38
39 Python projects typically publish to artifacts to PyPi and use their shortname
40 for modules rather than a full path like Java projects do.
41
42 setup.py:
43
44 .. code-block:: python
45     :emphasize-lines: 2
46
47     setup(
48         name='spectrometer',
49     )
50
51 The structure of a Python project typically determines it's package routing. So
52 a project package spectrometer.reporttool might have a layout like this inside
53 their project root.
54
55 .. code-block:: bash
56
57     ./  # This is the root of the repository
58     ./setup.py
59     ./spectrometer
60     ./spectrometer/__init__.py
61     ./spectrometer/reporttool
62     ./spectrometer/reporttool/__init__.py