1 | # RTEMS Specification Items and Qualification Tools |
---|
2 | |
---|
3 | This repository contains a prototype of the RTEMS specification and tools to |
---|
4 | generate content from the specification. It demonstrates the use of Python |
---|
5 | development tools such as yapf, flake8, mypy, pylint, pytest, and coverage. |
---|
6 | |
---|
7 | ## Repository Overview |
---|
8 | |
---|
9 | * env - contains the Python environment (created by `make env`) |
---|
10 | |
---|
11 | * spec - contains the specification items |
---|
12 | |
---|
13 | * rtemsqual - contains the `rtemsqual` Python package |
---|
14 | |
---|
15 | * tests - contains Python unit tests |
---|
16 | |
---|
17 | * external - contains Git submodules |
---|
18 | |
---|
19 | * rtems - contains the RTEMS sources as a Git submodule |
---|
20 | |
---|
21 | * rtems-docs - contains the RTEMS documentation sources as a Git submodule |
---|
22 | |
---|
23 | * `rtems_spec_to_x.py` - a command line tool to generate content from the |
---|
24 | specification |
---|
25 | |
---|
26 | ## Getting Started |
---|
27 | |
---|
28 | Run |
---|
29 | ``` |
---|
30 | git submodule init |
---|
31 | git submodule update |
---|
32 | ``` |
---|
33 | to initialize the Git submodules. Run |
---|
34 | ``` |
---|
35 | make env |
---|
36 | ``` |
---|
37 | to set up the Python environment. Activate the Python environment afterwards |
---|
38 | with |
---|
39 | ``` |
---|
40 | . env/bin/activate |
---|
41 | ``` |
---|
42 | |
---|
43 | ## Specification Items |
---|
44 | |
---|
45 | The |
---|
46 | [specification items](https://docs.rtems.org/branches/master/eng/req-eng.html#specification-items) |
---|
47 | are located in the `spec` directory. You can use doorstop to work with them, |
---|
48 | e.g. |
---|
49 | ``` |
---|
50 | $ doorstop |
---|
51 | building tree... |
---|
52 | loading documents... |
---|
53 | validating items... |
---|
54 | |
---|
55 | RTEMS |
---|
56 | â |
---|
57 | âââ RTEMS-GLOS |
---|
58 | â |
---|
59 | âââ RTEMS-GLOS-TERM |
---|
60 | ``` |
---|
61 | |
---|
62 | ## Specification-To-X Tool |
---|
63 | |
---|
64 | The command line tool `rtems_spec_to_x.py` generates content from the |
---|
65 | specification. The tool is configured by the `config.ini` configuration file. |
---|
66 | This is a prototype implementation. It demonstrates the generation of a |
---|
67 | project-wide glossary (`external/rtems-docs/c-user/glossary.rst`) and |
---|
68 | document-specific glossaries (`external/rtems-docs/eng/glossary.rst`) from |
---|
69 | glossary specification items (glossary groups and terms in `spec/glos`). |
---|
70 | |
---|
71 | Example: |
---|
72 | ``` |
---|
73 | $ ./rtems_spec_to_x.py |
---|
74 | $ git status |
---|
75 | On branch master |
---|
76 | Your branch is up to date with 'origin/master'. |
---|
77 | |
---|
78 | nothing to commit, working tree clean |
---|
79 | $ sed -i 's/Binary/Boom/' spec/glos/term/RTEMS-GLOS-TERM-ABI.yml |
---|
80 | $ ./rtems_spec_to_x.py |
---|
81 | $ git status |
---|
82 | On branch master |
---|
83 | Your branch is up to date with 'origin/master'. |
---|
84 | |
---|
85 | Changes not staged for commit: |
---|
86 | (use "git add <file>..." to update what will be committed) |
---|
87 | (use "git checkout -- <file>..." to discard changes in working directory) |
---|
88 | (commit or discard the untracked or modified content in submodules) |
---|
89 | |
---|
90 | modified: external/rtems-docs (modified content) |
---|
91 | modified: spec/glos/term/RTEMS-GLOS-TERM-ABI.yml |
---|
92 | |
---|
93 | no changes added to commit (use "git add" and/or "git commit -a") |
---|
94 | $ cd external/rtems-docs |
---|
95 | $ git diff |
---|
96 | diff --git a/c-user/glossary.rst b/c-user/glossary.rst |
---|
97 | index d0996e8..dfac60c 100644 |
---|
98 | --- a/c-user/glossary.rst |
---|
99 | +++ b/c-user/glossary.rst |
---|
100 | @@ -10,7 +10,7 @@ Glossary |
---|
101 | :sorted: |
---|
102 | |
---|
103 | ABI |
---|
104 | - An acronym for Application Binary Interface. |
---|
105 | + An acronym for Application Boom Interface. |
---|
106 | |
---|
107 | active |
---|
108 | A term used to describe an object which has been created by an |
---|
109 | diff --git a/eng/glossary.rst b/eng/glossary.rst |
---|
110 | index c58e67f..ac2c8f8 100644 |
---|
111 | --- a/eng/glossary.rst |
---|
112 | +++ b/eng/glossary.rst |
---|
113 | @@ -9,7 +9,7 @@ Glossary |
---|
114 | :sorted: |
---|
115 | |
---|
116 | ABI |
---|
117 | - An acronym for Application Binary Interface. |
---|
118 | + An acronym for Application Boom Interface. |
---|
119 | |
---|
120 | API |
---|
121 | An acronym for Application Programming Interface. |
---|
122 | ``` |
---|
123 | |
---|
124 | ## Unit Tests and Static Analysers |
---|
125 | |
---|
126 | Run the unit tests and static analysers with: |
---|
127 | ``` |
---|
128 | make |
---|
129 | ``` |
---|
130 | You can get a coverage report with: |
---|
131 | ``` |
---|
132 | $ make coverage-report |
---|
133 | coverage report -m --omit 'env/*' |
---|
134 | Name Stmts Miss Cover Missing |
---|
135 | ------------------------------------------------------ |
---|
136 | rtemsqual/__init__.py 5 0 100% |
---|
137 | rtemsqual/content.py 120 0 100% |
---|
138 | rtemsqual/glossary.py 73 0 100% |
---|
139 | rtemsqual/items.py 93 0 100% |
---|
140 | tests/test_content.py 114 0 100% |
---|
141 | tests/test_glossary.py 33 0 100% |
---|
142 | tests/test_items.py 47 0 100% |
---|
143 | ------------------------------------------------------ |
---|
144 | TOTAL 485 0 100% |
---|
145 | ``` |
---|
146 | |
---|
147 | ## Contributing |
---|
148 | |
---|
149 | Please read |
---|
150 | [Support and Contributing](https://docs.rtems.org/branches/master/user/support/index.html). |
---|
151 | |
---|
152 | ## License |
---|
153 | |
---|
154 | This project is licensed under the |
---|
155 | [BSD-2-Clause](https://spdx.org/licenses/BSD-2-Clause.html) or |
---|
156 | [CC-BY-SA-4.0](https://spdx.org/licenses/CC-BY-SA-4.0.html). |
---|