source: rtems-central/README.md @ c0ac12a

Last change on this file since c0ac12a was c0ac12a, checked in by Sebastian Huber <sebastian.huber@…>, on 02/25/20 at 12:54:17

Initial import

  • Property mode set to 100644
File size: 4.3 KB
Line 
1# RTEMS Specification Items and Qualification Tools
2
3This repository contains a prototype of the RTEMS specification and tools to
4generate content from the specification.  It demonstrates the use of Python
5development 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
28Run
29```
30git submodule init
31git submodule update
32```
33to initialize the Git submodules.  Run
34```
35make env
36```
37to set up the Python environment.  Activate the Python environment afterwards
38with
39```
40. env/bin/activate
41```
42
43## Specification Items
44
45The
46[specification items](https://docs.rtems.org/branches/master/eng/req-eng.html#specification-items)
47are located in the `spec` directory.  You can use doorstop to work with them,
48e.g.
49```
50$ doorstop
51building tree...
52loading documents...
53validating items...
54
55RTEMS
56│
57└── RTEMS-GLOS
58    │
59    └── RTEMS-GLOS-TERM
60```
61
62## Specification-To-X Tool
63
64The command line tool `rtems_spec_to_x.py` generates content from the
65specification.  The tool is configured by the `config.ini` configuration file.
66This is a prototype implementation.  It demonstrates the generation of a
67project-wide glossary (`external/rtems-docs/c-user/glossary.rst`) and
68document-specific glossaries (`external/rtems-docs/eng/glossary.rst`) from
69glossary specification items (glossary groups and terms in `spec/glos`).
70
71Example:
72```
73$ ./rtems_spec_to_x.py
74$ git status
75On branch master
76Your branch is up to date with 'origin/master'.
77
78nothing 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
82On branch master
83Your branch is up to date with 'origin/master'.
84
85Changes 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
93no changes added to commit (use "git add" and/or "git commit -a")
94$ cd external/rtems-docs
95$ git diff
96diff --git a/c-user/glossary.rst b/c-user/glossary.rst
97index 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
109diff --git a/eng/glossary.rst b/eng/glossary.rst
110index 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
126Run the unit tests and static analysers with:
127```
128make
129```
130You can get a coverage report with:
131```
132$ make coverage-report
133coverage report -m --omit 'env/*'
134Name                     Stmts   Miss  Cover   Missing
135------------------------------------------------------
136rtemsqual/__init__.py        5      0   100%
137rtemsqual/content.py       120      0   100%
138rtemsqual/glossary.py       73      0   100%
139rtemsqual/items.py          93      0   100%
140tests/test_content.py      114      0   100%
141tests/test_glossary.py      33      0   100%
142tests/test_items.py         47      0   100%
143------------------------------------------------------
144TOTAL                      485      0   100%
145```
146
147## Contributing
148
149Please read
150[Support and Contributing](https://docs.rtems.org/branches/master/user/support/index.html).
151
152## License
153
154This 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).
Note: See TracBrowser for help on using the repository browser.