Compare commits
42 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f17a1f086 | |||
| f8dd47c4c8 | |||
| 35a801a3ab | |||
| 9ca2797772 | |||
| 124938bf3c | |||
| 06cd566365 | |||
| 28df41b772 | |||
| c85a6b5bf1 | |||
| 8c70703210 | |||
| 0729d2a987 | |||
| 15f1741064 | |||
| eff4b41307 | |||
| 9d478ab76a | |||
| 39de31c459 | |||
| f17b2ac3e0 | |||
| 8803977364 | |||
| 2f37aeac5b | |||
| dd5e725fde | |||
| 0938903b69 | |||
| dfc68306e2 | |||
| d167d4b61d | |||
| 5c10e45fa1 | |||
| 9ba2b9525d | |||
| 4d33c0eeae | |||
| 7753557a3b | |||
| 12d5e3d75f | |||
| ff901d8258 | |||
| 5f46a27e69 | |||
| 219f1dbd4f | |||
| 660d781318 | |||
| 368cd17f33 | |||
| 1ad5998930 | |||
| 25e0f2f006 | |||
| 7fde2303ab | |||
| 049486da03 | |||
| 6e153d83d9 | |||
| aa039dc5d2 | |||
| 889a4899a3 | |||
| b0ebf9444e | |||
| cc03dfe2e5 | |||
| a0ccf61e22 | |||
| 94c6336f5d |
2615 changed files with 25826 additions and 5 deletions
111
CHANGELOG.md
111
CHANGELOG.md
|
|
@ -1,16 +1,117 @@
|
||||||
## 0.1.0rc1 (2024-11-06)
|
## 0.2.0a14 (2025-11-21)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
||||||
- update rougail dependency
|
- ExtentionError => ExtensionError
|
||||||
|
|
||||||
## 0.1.0rc0 (2024-11-01)
|
## 0.2.0a13 (2025-11-06)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
||||||
- support auto_save variable
|
- add some tests
|
||||||
|
|
||||||
|
## 0.2.0a12 (2025-11-03)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- allow extra kwargs
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- update tests
|
||||||
|
|
||||||
|
## 0.2.0a11 (2025-10-10)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- update test
|
||||||
|
- tests
|
||||||
|
- tests for formatter
|
||||||
|
|
||||||
|
## 0.2.0a10 (2025-09-29)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- remove json.read_write option
|
||||||
|
- default value for a calculated variable with an unknown optional variable
|
||||||
|
- update tests for integer type
|
||||||
|
|
||||||
|
## 0.2.0a9 (2025-09-22)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- dependency
|
||||||
|
|
||||||
|
## 0.2.0a8 (2025-05-12)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|
||||||
- black
|
- black
|
||||||
- license, pyproject and so on
|
|
||||||
|
## 0.2.0a7 (2025-04-30)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- remove negative_description support
|
||||||
|
- update tests
|
||||||
|
|
||||||
|
## 0.2.0a6 (2025-04-09)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- version
|
||||||
|
|
||||||
|
## 0.2.0a5 (2025-04-01)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- update tests
|
||||||
|
- update translation
|
||||||
|
|
||||||
|
## 0.2.0a4 (2025-03-30)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- update tests
|
||||||
|
|
||||||
|
## 0.2.0a3 (2025-03-19)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- add json.get to have sub variables
|
||||||
|
|
||||||
|
## 0.2.0a2 (2025-02-17)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- translation
|
||||||
|
|
||||||
|
## 0.2.0a1 (2025-02-10)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- output return status too
|
||||||
|
|
||||||
|
## 0.2.0a0 (2024-12-11)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- add error and warnings informations in json
|
||||||
|
- add tests
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- update tests
|
||||||
|
|
||||||
|
## 0.1.1a0 (2024-11-28)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- separation between run and print function
|
||||||
|
|
||||||
|
## 0.1.0 (2024-11-28)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- copy from rougail-output-exporter
|
||||||
|
- init commit
|
||||||
|
|
|
||||||
78
locale/fr/LC_MESSAGES/rougail_output_json.po
Normal file
78
locale/fr/LC_MESSAGES/rougail_output_json.po
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR ORGANIZATION
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: \n"
|
||||||
|
"POT-Creation-Date: 2025-10-05 21:25+0200\n"
|
||||||
|
"PO-Revision-Date: 2025-10-05 21:26+0200\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
"X-Generator: Poedit 3.7\n"
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:48
|
||||||
|
msgid "the \"step.output\" is not set to \"{0}\""
|
||||||
|
msgstr "\"step.output\" n'est pas mis à \"{0}\""
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:105
|
||||||
|
msgid "Error in config: {0}"
|
||||||
|
msgstr "Erreur dans la configuration : {0}"
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:115
|
||||||
|
msgid "The following variables are mandatory but have no value:"
|
||||||
|
msgstr "Les variables suivantes sont obligatoire mais n'ont pas de valeur :"
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:125
|
||||||
|
msgid "The following variables are inaccessible but are empty and mandatory :"
|
||||||
|
msgstr "Les variables suivantes sont inaccessibles mais sont vides et obligatoires :"
|
||||||
|
|
||||||
|
#: src/rougail/output_json/config.py:29
|
||||||
|
msgid "configuration rougail-json"
|
||||||
|
msgstr "configuration de rougail-json"
|
||||||
|
|
||||||
|
#: src/rougail/output_json/config.py:37
|
||||||
|
msgid "test mandatories variables before display in json"
|
||||||
|
msgstr "tester les variables obligatoires avant de l'afficher en json"
|
||||||
|
|
||||||
|
#: src/rougail/output_json/config.py:48
|
||||||
|
msgid "get value for a variable or a family"
|
||||||
|
msgstr "récupère la valeur pour une variable ou une famille"
|
||||||
|
|
||||||
|
#~ msgid "display variables available in read_write mode"
|
||||||
|
#~ msgstr "affiche les variables valables en mode lecture écriture"
|
||||||
|
|
||||||
|
#~ msgid "display variables available in read_only mode"
|
||||||
|
#~ msgstr "affiche les variables valables en mode lecture seul"
|
||||||
|
|
||||||
|
#~ msgid "do not test mandatories variables before display in json"
|
||||||
|
#~ msgstr "ne pas tester les variables obligatoires avant de l'afficher en json"
|
||||||
|
|
||||||
|
#~ msgid "Undocumented variable"
|
||||||
|
#~ msgstr "Variable non documentée"
|
||||||
|
|
||||||
|
#~ msgid "Undocumented but modified variable"
|
||||||
|
#~ msgstr "Variable non documentée mais modifiée"
|
||||||
|
|
||||||
|
#~ msgid "Unmodifiable variable"
|
||||||
|
#~ msgstr "Variable non modifiable"
|
||||||
|
|
||||||
|
#~ msgid "Default value"
|
||||||
|
#~ msgstr "Valeur par défaut"
|
||||||
|
|
||||||
|
#~ msgid "Modified value"
|
||||||
|
#~ msgstr "Valeur modifiée"
|
||||||
|
|
||||||
|
#~ msgid "Original default value"
|
||||||
|
#~ msgstr "Valeur par défaut d'origine"
|
||||||
|
|
||||||
|
#~ msgid "Caption"
|
||||||
|
#~ msgstr "Légende"
|
||||||
|
|
||||||
|
#~ msgid "Variables:"
|
||||||
|
#~ msgstr "Variables :"
|
||||||
45
locale/rougail_output_json.pot
Normal file
45
locale/rougail_output_json.pot
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR ORGANIZATION
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"POT-Creation-Date: 2025-10-05 21:26+0200\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:48
|
||||||
|
msgid "the \"step.output\" is not set to \"{0}\""
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:105
|
||||||
|
msgid "Error in config: {0}"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:115
|
||||||
|
msgid "The following variables are mandatory but have no value:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/output_json/__init__.py:125
|
||||||
|
msgid "The following variables are inaccessible but are empty and mandatory :"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/output_json/config.py:29
|
||||||
|
msgid "configuration rougail-json"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/output_json/config.py:37
|
||||||
|
msgid "test mandatories variables before display in json"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/rougail/output_json/config.py:48
|
||||||
|
msgid "get value for a variable or a family"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
42
pyproject.toml
Normal file
42
pyproject.toml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
[build-system]
|
||||||
|
build-backend = "flit_core.buildapi"
|
||||||
|
requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "rougail.output_json"
|
||||||
|
version = "0.2.0a14"
|
||||||
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
|
readme = "README.md"
|
||||||
|
description = "Rougail output json"
|
||||||
|
requires-python = ">=3.10"
|
||||||
|
license = {file = "LICENSE"}
|
||||||
|
classifiers = [
|
||||||
|
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||||
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Programming Language :: Python :: 3.13",
|
||||||
|
"Programming Language :: Python :: 3.14",
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Natural Language :: French",
|
||||||
|
]
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
"rougail-base >= 1.1,<2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Home = "https://forge.cloud.silique.fr/stove/rougail-output-json"
|
||||||
|
|
||||||
|
[tool.commitizen]
|
||||||
|
name = "cz_conventional_commits"
|
||||||
|
tag_format = "$version"
|
||||||
|
version_scheme = "pep440"
|
||||||
|
version_provider = "pep621"
|
||||||
|
version_files = [
|
||||||
|
"src/rougail/output_json/__version__.py",
|
||||||
|
"pyproject.toml:version"
|
||||||
|
]
|
||||||
|
update_changelog_on_bump = true
|
||||||
|
changelog_merge_prerelease = true
|
||||||
183
src/rougail/output_json/__init__.py
Normal file
183
src/rougail/output_json/__init__.py
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
"""
|
||||||
|
Silique (https://www.silique.fr)
|
||||||
|
Copyright (C) 2022-2025
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
|
details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from typing import Any, List, Optional
|
||||||
|
|
||||||
|
from json import dumps
|
||||||
|
|
||||||
|
from tiramisu.error import PropertiesOptionError, ConfigError
|
||||||
|
from rougail.error import ExtensionError
|
||||||
|
|
||||||
|
from .i18n import _
|
||||||
|
from .__version__ import __version__
|
||||||
|
|
||||||
|
|
||||||
|
class RougailOutputJson:
|
||||||
|
output_name = "json"
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self,
|
||||||
|
config: "Config",
|
||||||
|
*,
|
||||||
|
rougailconfig: "RougailConfig" = None,
|
||||||
|
user_data_errors: Optional[list] = None,
|
||||||
|
user_data_warnings: Optional[list] = None,
|
||||||
|
**kwargs,
|
||||||
|
) -> None:
|
||||||
|
if rougailconfig is None:
|
||||||
|
from rougail import RougailConfig
|
||||||
|
|
||||||
|
rougailconfig = RougailConfig
|
||||||
|
rougailconfig["step.output"] = self.output_name
|
||||||
|
if rougailconfig["step.output"] != self.output_name:
|
||||||
|
raise ExtensionError(
|
||||||
|
_('the "step.output" is not set to "{0}"').format(self.output_name)
|
||||||
|
)
|
||||||
|
self.rougailconfig = rougailconfig
|
||||||
|
self.config = config
|
||||||
|
if user_data_errors:
|
||||||
|
self.errors = user_data_errors
|
||||||
|
else:
|
||||||
|
self.errors = []
|
||||||
|
if user_data_warnings:
|
||||||
|
self.warnings = user_data_warnings
|
||||||
|
else:
|
||||||
|
self.warnings = []
|
||||||
|
|
||||||
|
def run(self) -> None:
|
||||||
|
ret = self.exporter()
|
||||||
|
if isinstance(self.dico, str):
|
||||||
|
value = self.dico
|
||||||
|
else:
|
||||||
|
value = dumps(self.dico, ensure_ascii=False, indent=2)
|
||||||
|
return ret, value
|
||||||
|
|
||||||
|
def print(self) -> str:
|
||||||
|
ret, data = self.run()
|
||||||
|
print(data)
|
||||||
|
return ret
|
||||||
|
|
||||||
|
def exporter(self) -> None:
|
||||||
|
self.is_mandatory = self.rougailconfig["json.mandatory"]
|
||||||
|
self.get = self.rougailconfig["json.get"]
|
||||||
|
self.dico = {}
|
||||||
|
if self.is_mandatory:
|
||||||
|
ori_properties = self.config.property.exportation()
|
||||||
|
self.config.property.read_write()
|
||||||
|
self.mandatory()
|
||||||
|
self.config.property.importation(ori_properties)
|
||||||
|
if self.manage_errors():
|
||||||
|
return False
|
||||||
|
self.manage_warnings()
|
||||||
|
if self.get:
|
||||||
|
config = self.config.option(self.get)
|
||||||
|
if not config.isoptiondescription():
|
||||||
|
self.dico = config.value.get()
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
config = self.config
|
||||||
|
self.parse_family(
|
||||||
|
config,
|
||||||
|
self.dico,
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
|
||||||
|
def mandatory(self):
|
||||||
|
title = False
|
||||||
|
options_with_error = []
|
||||||
|
try:
|
||||||
|
mandatories = self.config.value.mandatory()
|
||||||
|
except (ConfigError, PropertiesOptionError) as err:
|
||||||
|
self.errors.append(_("Error in config: {0}").format(err))
|
||||||
|
return
|
||||||
|
except ValueError as err:
|
||||||
|
self.errors.append(str(err))
|
||||||
|
return
|
||||||
|
for option in mandatories:
|
||||||
|
try:
|
||||||
|
option.value.get()
|
||||||
|
if not title:
|
||||||
|
self.errors.append(
|
||||||
|
_("The following variables are mandatory but have no value:")
|
||||||
|
)
|
||||||
|
title = True
|
||||||
|
self.errors.append(f" - {option.description()}")
|
||||||
|
except PropertiesOptionError:
|
||||||
|
options_with_error.append(option)
|
||||||
|
if not title:
|
||||||
|
for idx, option in enumerate(options_with_error):
|
||||||
|
if not idx:
|
||||||
|
self.errors.append(
|
||||||
|
_(
|
||||||
|
"The following variables are inaccessible but are empty and mandatory :"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
self.errors.append(f" - {option.description()}")
|
||||||
|
|
||||||
|
def manage_warnings(self) -> None:
|
||||||
|
if self.warnings:
|
||||||
|
self.dico["_warnings"] = self.warnings
|
||||||
|
|
||||||
|
def manage_errors(self) -> bool:
|
||||||
|
if not self.errors:
|
||||||
|
return False
|
||||||
|
self.dico = {"_errors": self.errors}
|
||||||
|
self.manage_warnings()
|
||||||
|
return True
|
||||||
|
|
||||||
|
def parse_family(
|
||||||
|
self,
|
||||||
|
conf,
|
||||||
|
child,
|
||||||
|
):
|
||||||
|
for option in conf:
|
||||||
|
if option.isoptiondescription():
|
||||||
|
if option.isleadership():
|
||||||
|
parent = []
|
||||||
|
self.parse_leadership(
|
||||||
|
option,
|
||||||
|
parent,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
parent = {}
|
||||||
|
self.parse_family(option, parent)
|
||||||
|
child[option.name()] = parent
|
||||||
|
else:
|
||||||
|
child[option.name()] = option.value.get()
|
||||||
|
|
||||||
|
def parse_leadership(
|
||||||
|
self,
|
||||||
|
conf,
|
||||||
|
parent,
|
||||||
|
):
|
||||||
|
leader, *followers = list(conf)
|
||||||
|
leader_values = leader.value.get()
|
||||||
|
for idx, leader_value in enumerate(leader_values):
|
||||||
|
leader_dict = {leader.name(): leader_value}
|
||||||
|
parent.append(leader_dict)
|
||||||
|
for follower in list(followers):
|
||||||
|
if follower.index() != idx:
|
||||||
|
continue
|
||||||
|
followers.remove(follower)
|
||||||
|
leader_dict[follower.name()] = follower.value.get()
|
||||||
|
|
||||||
|
|
||||||
|
RougailOutput = RougailOutputJson
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ("RougailOutputJson",)
|
||||||
1
src/rougail/output_json/__version__.py
Normal file
1
src/rougail/output_json/__version__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__version__ = "0.2.0a14"
|
||||||
59
src/rougail/output_json/config.py
Normal file
59
src/rougail/output_json/config.py
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
"""
|
||||||
|
Silique (https://www.silique.fr)
|
||||||
|
Copyright (C) 2024-2025
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
|
details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
from .i18n import _
|
||||||
|
|
||||||
|
|
||||||
|
def get_rougail_config(
|
||||||
|
*,
|
||||||
|
backward_compatibility=True,
|
||||||
|
) -> dict:
|
||||||
|
options = f"""
|
||||||
|
json:
|
||||||
|
description: {_('configuration rougail-json')}
|
||||||
|
disabled:
|
||||||
|
jinja: |
|
||||||
|
{{% if step.output is propertyerror or step.output != 'json' %}}
|
||||||
|
disabled
|
||||||
|
{{% endif %}}
|
||||||
|
|
||||||
|
mandatory:
|
||||||
|
description: {_('test mandatories variables before display in json')}
|
||||||
|
type: boolean
|
||||||
|
default:
|
||||||
|
jinja: |-
|
||||||
|
{{% if cli.read_write is defined and cli.read_write %}}
|
||||||
|
false
|
||||||
|
{{% else %}}
|
||||||
|
true
|
||||||
|
{{% endif %}}
|
||||||
|
|
||||||
|
get:
|
||||||
|
description: {_('get value for a variable or a family')}
|
||||||
|
mandatory: false
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
"name": "json",
|
||||||
|
"process": "output",
|
||||||
|
"options": options,
|
||||||
|
"level": 50,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ("get_rougail_config",)
|
||||||
26
src/rougail/output_json/i18n.py
Normal file
26
src/rougail/output_json/i18n.py
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
"""Internationalisation utilities
|
||||||
|
Silique (https://www.silique.fr)
|
||||||
|
Copyright (C) 2024-2025
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by the
|
||||||
|
Free Software Foundation, either version 3 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
|
details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from gettext import translation
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
t = translation(
|
||||||
|
"rougail_output_json", str(Path(__file__).parent / "locale"), fallback=True
|
||||||
|
)
|
||||||
|
|
||||||
|
_ = t.gettext
|
||||||
Binary file not shown.
1
tests/results/test/00_0empty.json
Normal file
1
tests/results/test/00_0empty.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
1
tests/results/test/00_0no_variable.json
Normal file
1
tests/results/test/00_0no_variable.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
1
tests/results/test/00_0no_variable_default_version.json
Normal file
1
tests/results/test/00_0no_variable_default_version.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
1
tests/results/test/00_0no_variable_remove_version.json
Normal file
1
tests/results/test/00_0no_variable_remove_version.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
3
tests/results/test/00_0version_underscore.json
Normal file
3
tests/results/test/00_0version_underscore.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"version": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_1empty_variable.json
Normal file
3
tests/results/test/00_1empty_variable.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"empty": "string1"
|
||||||
|
}
|
||||||
8
tests/results/test/00_2default_calculated.json
Normal file
8
tests/results/test/00_2default_calculated.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
12
tests/results/test/00_2default_calculated_multi.json
Normal file
12
tests/results/test/00_2default_calculated_multi.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var2": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"leadership": [
|
||||||
|
{
|
||||||
|
"var1": "a_value",
|
||||||
|
"var2": "a_value"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
10
tests/results/test/00_2default_calculated_variable.json
Normal file
10
tests/results/test/00_2default_calculated_variable.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
],
|
||||||
|
"var2": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
],
|
||||||
|
"var2": [
|
||||||
|
"domain1.lan",
|
||||||
|
"domain2.lan"
|
||||||
|
]
|
||||||
|
}
|
||||||
4
tests/results/test/00_4load_subfolder.json
Normal file
4
tests/results/test/00_4load_subfolder.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_5load_notype.json
Normal file
3
tests/results/test/00_5load_notype.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"without_type": "string1"
|
||||||
|
}
|
||||||
8
tests/results/test/00_6boolean.json
Normal file
8
tests/results/test/00_6boolean.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"var1": true,
|
||||||
|
"var2": true,
|
||||||
|
"var3": true,
|
||||||
|
"var4": true,
|
||||||
|
"var5": true,
|
||||||
|
"var6": true
|
||||||
|
}
|
||||||
3
tests/results/test/00_6boolean_no_mandatory.json
Normal file
3
tests/results/test/00_6boolean_no_mandatory.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": true
|
||||||
|
}
|
||||||
8
tests/results/test/00_6choice.json
Normal file
8
tests/results/test/00_6choice.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"var1": "a",
|
||||||
|
"var2": "a",
|
||||||
|
"var3": "a",
|
||||||
|
"var4": null,
|
||||||
|
"var5": "a",
|
||||||
|
"var6": 1
|
||||||
|
}
|
||||||
3
tests/results/test/00_6choice_calculation.json
Normal file
3
tests/results/test/00_6choice_calculation.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"var": 0
|
||||||
|
}
|
||||||
4
tests/results/test/00_6choice_link.json
Normal file
4
tests/results/test/00_6choice_link.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "a",
|
||||||
|
"var2": "a"
|
||||||
|
}
|
||||||
8
tests/results/test/00_6choice_variable.json
Normal file
8
tests/results/test/00_6choice_variable.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
9
tests/results/test/00_6choice_variable_link.json
Normal file
9
tests/results/test/00_6choice_variable_link.json
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
11
tests/results/test/00_6choice_variable_link2.json
Normal file
11
tests/results/test/00_6choice_variable_link2.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var2": "string1",
|
||||||
|
"family": {
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
|
}
|
||||||
4
tests/results/test/00_6custom.json
Normal file
4
tests/results/test/00_6custom.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"custom1": "string1",
|
||||||
|
"custom2": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_6domainname.json
Normal file
3
tests/results/test/00_6domainname.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "domain1.lan"
|
||||||
|
}
|
||||||
3
tests/results/test/00_6domainname_params.json
Normal file
3
tests/results/test/00_6domainname_params.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "domain1.lan"
|
||||||
|
}
|
||||||
8
tests/results/test/00_6float.json
Normal file
8
tests/results/test/00_6float.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"var1": 1.1,
|
||||||
|
"var2": 1.1,
|
||||||
|
"var3": 1.1,
|
||||||
|
"var4": 1.1,
|
||||||
|
"var5": 1.1,
|
||||||
|
"var6": 1.1
|
||||||
|
}
|
||||||
8
tests/results/test/00_6integer.json
Normal file
8
tests/results/test/00_6integer.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"var1": 1,
|
||||||
|
"var2": 1,
|
||||||
|
"var3": 1,
|
||||||
|
"var4": 1,
|
||||||
|
"var5": 1,
|
||||||
|
"var6": 1
|
||||||
|
}
|
||||||
5
tests/results/test/00_6ip.json
Normal file
5
tests/results/test/00_6ip.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "192.168.1.6",
|
||||||
|
"var2": "192.168.1.6/24",
|
||||||
|
"var3": "192.168.1.6/24"
|
||||||
|
}
|
||||||
5
tests/results/test/00_6network.json
Normal file
5
tests/results/test/00_6network.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "192.168.1.0",
|
||||||
|
"var2": "192.168.1.6/32",
|
||||||
|
"var3": "192.168.1.6/32"
|
||||||
|
}
|
||||||
8
tests/results/test/00_6number.json
Normal file
8
tests/results/test/00_6number.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"var1": 1,
|
||||||
|
"var2": 1,
|
||||||
|
"var3": 1,
|
||||||
|
"var4": 1,
|
||||||
|
"var5": 1,
|
||||||
|
"var6": 1
|
||||||
|
}
|
||||||
5
tests/results/test/00_6port.json
Normal file
5
tests/results/test/00_6port.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"variable1": "80",
|
||||||
|
"variable2": "80",
|
||||||
|
"variable3": "80"
|
||||||
|
}
|
||||||
3
tests/results/test/00_6regexp.json
Normal file
3
tests/results/test/00_6regexp.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"var": "#b1b1b1"
|
||||||
|
}
|
||||||
4
tests/results/test/00_6regexp_link.json
Normal file
4
tests/results/test/00_6regexp_link.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "#b1b1b1",
|
||||||
|
"var2": "#b2b1b1"
|
||||||
|
}
|
||||||
4
tests/results/test/00_6secret.json
Normal file
4
tests/results/test/00_6secret.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"secret1": "onE7vaLues_len1",
|
||||||
|
"secret2": "onE7vaLues_len1"
|
||||||
|
}
|
||||||
5
tests/results/test/00_6secret_param.json
Normal file
5
tests/results/test/00_6secret_param.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"secret1": "onE7vaLues_len1",
|
||||||
|
"secret2": "onE7vaLues",
|
||||||
|
"secret3": "onE7vaLues"
|
||||||
|
}
|
||||||
10
tests/results/test/00_6string.json
Normal file
10
tests/results/test/00_6string.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1",
|
||||||
|
"var4": "string1",
|
||||||
|
"var5": "string1",
|
||||||
|
"var6": "string1",
|
||||||
|
"var7": "string1",
|
||||||
|
"var8": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_7choice_quote.json
Normal file
3
tests/results/test/00_7choice_quote.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"var": "quote'"
|
||||||
|
}
|
||||||
4
tests/results/test/00_7help.json
Normal file
4
tests/results/test/00_7help.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
4
tests/results/test/00_7help_quote.json
Normal file
4
tests/results/test/00_7help_quote.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
4
tests/results/test/00_7help_sup.json
Normal file
4
tests/results/test/00_7help_sup.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_7value_doublequote.json
Normal file
3
tests/results/test/00_7value_doublequote.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_7value_doublequote2.json
Normal file
3
tests/results/test/00_7value_doublequote2.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_7value_doublequote3.json
Normal file
3
tests/results/test/00_7value_doublequote3.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_7value_quote.json
Normal file
3
tests/results/test/00_7value_quote.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_8calculation_information.json
Normal file
3
tests/results/test/00_8calculation_information.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "string1"
|
||||||
|
}
|
||||||
11
tests/results/test/00_8test.json
Normal file
11
tests/results/test/00_8test.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"var1": "test",
|
||||||
|
"var2": "test",
|
||||||
|
"var3": "test1",
|
||||||
|
"var4": null,
|
||||||
|
"var5": false,
|
||||||
|
"var6": [
|
||||||
|
"test1",
|
||||||
|
"test2"
|
||||||
|
]
|
||||||
|
}
|
||||||
10
tests/results/test/00_9choice_variable_multi.json
Normal file
10
tests/results/test/00_9choice_variable_multi.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"variable1": [
|
||||||
|
"val1",
|
||||||
|
"val2"
|
||||||
|
],
|
||||||
|
"variable2": [
|
||||||
|
"val1",
|
||||||
|
"val2"
|
||||||
|
]
|
||||||
|
}
|
||||||
5
tests/results/test/00_9choice_variables.json
Normal file
5
tests/results/test/00_9choice_variables.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"source_variable_1": "string1",
|
||||||
|
"source_variable_2": "string1",
|
||||||
|
"my_variable": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_9default_calculation.json
Normal file
3
tests/results/test/00_9default_calculation.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"var": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"my_variable": "string1",
|
||||||
|
"my_calculated_variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"my_variable": "string1",
|
||||||
|
"my_calculated_variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"my_variable": "string1",
|
||||||
|
"my_calculated_variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
tests/results/test/00_9default_calculation_optional.json
Normal file
7
tests/results/test/00_9default_calculation_optional.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"my_calculated_variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"my_variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"my_calculated_variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/00_9default_integer.json
Normal file
3
tests/results/test/00_9default_integer.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"var": 0
|
||||||
|
}
|
||||||
3
tests/results/test/00_9default_number.json
Normal file
3
tests/results/test/00_9default_number.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"var": 0
|
||||||
|
}
|
||||||
26
tests/results/test/01_6boolean_multi.json
Normal file
26
tests/results/test/01_6boolean_multi.json
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"var2": [
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"var3": [
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"var4": [
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"var5": [
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"var6": [
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"var7": [
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"var8": [
|
||||||
|
true
|
||||||
|
]
|
||||||
|
}
|
||||||
12
tests/results/test/01_6custom_multi.json
Normal file
12
tests/results/test/01_6custom_multi.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"custom1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"custom2": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
42
tests/results/test/01_6float_multi.json
Normal file
42
tests/results/test/01_6float_multi.json
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
],
|
||||||
|
"var2": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
],
|
||||||
|
"var3": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
],
|
||||||
|
"var4": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
],
|
||||||
|
"var5": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
],
|
||||||
|
"var6": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
],
|
||||||
|
"var7": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
],
|
||||||
|
"var8": [
|
||||||
|
1.1,
|
||||||
|
2.2,
|
||||||
|
3.3
|
||||||
|
]
|
||||||
|
}
|
||||||
42
tests/results/test/01_6integer_multi.json
Normal file
42
tests/results/test/01_6integer_multi.json
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"var2": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"var3": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"var4": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"var5": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"var6": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"var7": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"var8": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
}
|
||||||
7
tests/results/test/01_6integer_multi_mandatory.json
Normal file
7
tests/results/test/01_6integer_multi_mandatory.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"var": [
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
]
|
||||||
|
}
|
||||||
7
tests/results/test/01_6string_empty.json
Normal file
7
tests/results/test/01_6string_empty.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
42
tests/results/test/01_6string_multi.json
Normal file
42
tests/results/test/01_6string_multi.json
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
"var1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var2": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var3": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var4": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var5": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var6": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var7": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"var8": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
tests/results/test/01_7value_multi_doublequote.json
Normal file
7
tests/results/test/01_7value_multi_doublequote.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
tests/results/test/01_7value_multi_doublequote2.json
Normal file
7
tests/results/test/01_7value_multi_doublequote2.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
tests/results/test/01_7value_multi_quote.json
Normal file
7
tests/results/test/01_7value_multi_quote.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variable": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
tests/results/test/01_9choice_variable_multi.json
Normal file
8
tests/results/test/01_9choice_variable_multi.json
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"variable1": [
|
||||||
|
"string1",
|
||||||
|
"string2",
|
||||||
|
"string3"
|
||||||
|
],
|
||||||
|
"variable2": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/01_9choice_variable_optional.json
Normal file
3
tests/results/test/01_9choice_variable_optional.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "a"
|
||||||
|
}
|
||||||
4
tests/results/test/02_0tags.json
Normal file
4
tests/results/test/02_0tags.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
3
tests/results/test/04_0type_param.json
Normal file
3
tests/results/test/04_0type_param.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"int": 1
|
||||||
|
}
|
||||||
3
tests/results/test/04_0type_param_integer.json
Normal file
3
tests/results/test/04_0type_param_integer.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"int": 1
|
||||||
|
}
|
||||||
3
tests/results/test/04_1auto_save.json
Normal file
3
tests/results/test/04_1auto_save.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"variable": "no"
|
||||||
|
}
|
||||||
4
tests/results/test/04_1auto_save_and_calculated.json
Normal file
4
tests/results/test/04_1auto_save_and_calculated.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "no"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "yes"
|
||||||
|
}
|
||||||
3
tests/results/test/04_1auto_save_and_hidden.json
Normal file
3
tests/results/test/04_1auto_save_and_hidden.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"var": "yes"
|
||||||
|
}
|
||||||
5
tests/results/test/04_1default_calculation_hidden.json
Normal file
5
tests/results/test/04_1default_calculation_hidden.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
5
tests/results/test/04_1default_calculation_hidden_2.json
Normal file
5
tests/results/test/04_1default_calculation_hidden_2.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
4
tests/results/test/04_1default_calculation_hidden_3.json
Normal file
4
tests/results/test/04_1default_calculation_hidden_3.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "value",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
5
tests/results/test/04_1default_calculation_hidden_4.json
Normal file
5
tests/results/test/04_1default_calculation_hidden_4.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "value",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
5
tests/results/test/04_1default_calculation_hidden_5.json
Normal file
5
tests/results/test/04_1default_calculation_hidden_5.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1",
|
||||||
|
"var3": "string1"
|
||||||
|
}
|
||||||
4
tests/results/test/04_1default_calculation_hidden_6.json
Normal file
4
tests/results/test/04_1default_calculation_hidden_6.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
4
tests/results/test/04_5disabled_calculation_boolean.json
Normal file
4
tests/results/test/04_5disabled_calculation_boolean.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"condition": "string1",
|
||||||
|
"variable1": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"condition": "string1",
|
||||||
|
"var1": null,
|
||||||
|
"var2": "string1"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"condition": true,
|
||||||
|
"var1": "string1",
|
||||||
|
"var2": null,
|
||||||
|
"var3": null,
|
||||||
|
"var4": null
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue