~canonical-kernel/+git/kteam-tools:arighi/annotations-tools-json-format

Last commit made on 2023-12-11
Get this branch:
git clone -b arighi/annotations-tools-json-format https://git.launchpad.net/~canonical-kernel/+git/kteam-tools
Members of Canonical Kernel can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
arighi/annotations-tools-json-format
Repository:
lp:~canonical-kernel/+git/kteam-tools

Recent commits

8977f80... by Andrea Righi

annotations-tools: move sys.dont_write_bytecode to main script

Move sys.dont_write_bytecode to the main script and put a comment that
describe why we need this to be enabled.

Signed-off-by: Andrea Righi <email address hidden>

1f255c3... by Andrea Righi

annotations-tools: additional linter fixes

Apply / re-apply linter fixes to the annotation-tools scripts.

Signed-off-by: Andrea Righi <email address hidden>

cfab8c8... by Andrea Righi

annotations-tools: clean up shebang

Get rid of the python shebang where it's not needed.

Signed-off-by: Andrea Righi <email address hidden>

8eb8c64... by Andrea Righi

annotations: introduce --no-include

Add an option to skip processing included annotations files. This option
can be useful to convert files from an old format to a newer one, by
dumping the contant of the local leaf-node annotations file, instead of
including the content of external files.

Example:

  $ annotations -f debian.lowlatency/config/annotations --no-include > annotations.new
  [ check if everything is correct in annotations.new ]
  $ mv annotations.new debian.lowlatency/config/annotations

Signed-off-by: Andrea Righi <email address hidden>

09d5aad... by Andrea Righi

annotations: support JSON format

Allow to read and dump all annotations data in pure JSON format.

With this change applied the "annotations" script is able to read either
the old custom format (format version 4) or a new pure-JSON format
(format version 5).

It is possible to convert an old annotations file to the newer format
simply by running "annotations" (no argument): the script will parse the
old annotations (format version 4) and it will dump in output the new
content in the new pure-JSON format (format version 5).

Signed-off-by: Andrea Righi <email address hidden>

4be1560... by Andrea Righi

annotations-tools: coding style fixes

No functional changes, only python coding style fixes.

Signed-off-by: Andrea Righi <email address hidden>

b649c03... by Andrea Righi

annotations-tools: make the output of config-check more user-friendly

In case of a config change we shouldn't print an error, but a nicer
message instead explaining that the option simply changed.

Hopefully this will help to avoid all the misunderstanding that usually
happens by priting a normal change as an error.

Signed-off-by: Andrea Righi <email address hidden>

dc611be... by Andrea Righi

annotations-tools: add (optional) support to argcomplete

With this change applied and the argcomplete python module available in
the system it can be possible to enable bash autocompletion for
annotations.

The autocompletion script can be generated running the following
command (a proper installation script/packaging will take care of this
in the future):

 $ register-python-argcomplete annotations

Signed-off-by: Andrea Righi <email address hidden>

df97cdc... by Andrea Righi

annotations-tools: introduce version.py

Define the version of the program in a separate python module called
kconfig.version.

In the future we may want to define other versions in the same place,
such as the annotations format version.

Signed-off-by: Andrea Righi <email address hidden>

ed97e7f... by Andrea Righi

annotations-tools: introduce utils.py

Move potential generic utility functions to a separate python module,
called kconfig.utils.

Signed-off-by: Andrea Righi <email address hidden>