diff --git a/docs/project_overview.md b/docs/project_overview.md index e688409ba2..6c72b79df6 100644 --- a/docs/project_overview.md +++ b/docs/project_overview.md @@ -79,6 +79,9 @@ Example of `ecosystem.json`: "extra_dependencies": [ "pytest" ], + "debian_dependencies": [ + "jq" + ], "language": { "name": "python", "versions": ["3.9"] diff --git a/ecosystem/models/configuration.py b/ecosystem/models/configuration.py index e08fe4ec0c..eee5a5a404 100644 --- a/ecosystem/models/configuration.py +++ b/ecosystem/models/configuration.py @@ -66,6 +66,8 @@ class RepositoryConfiguration(JsonSerializable): ex: for python `requirements.txt` extra_dependencies: list of extra dependencies for project to install during tests run ex: for python it might be `qiskit==0.19` + debian_dependencies: list of debian dependenies for project to install during tests run + ex: jq tests_command: list of commands to run tests ex: for python `python -m unittest -v` styles_check_command: list of commands to run style checks @@ -77,6 +79,7 @@ class RepositoryConfiguration(JsonSerializable): language: LanguageConfiguration = field(default_factory=PythonLanguageConfiguration) dependencies_files: list[str] = new_list() extra_dependencies: list[str] = new_list() + debian_dependencies: list[str] = new_list() tests_command: list[str] = new_list() styles_check_command: list[str] = new_list() coverages_check_command: list[str] = new_list() @@ -99,6 +102,7 @@ def from_dict(cls, dictionary: dict): language=language, dependencies_files=config.dependencies_files, extra_dependencies=config.extra_dependencies, + debian_dependencies=config.debian_dependencies, tests_command=config.tests_command, styles_check_command=config.styles_check_command, coverages_check_command=config.coverages_check_command, @@ -126,6 +130,7 @@ def load(cls, path: str) -> "RepositoryConfiguration": language=language, dependencies_files=config.dependencies_files, extra_dependencies=config.extra_dependencies, + debian_dependencies=config.debian_dependencies, tests_command=config.tests_command, styles_check_command=config.styles_check_command, coverages_check_command=config.coverages_check_command, @@ -168,6 +173,7 @@ def default(cls) -> "PythonRepositoryConfiguration": language=PythonLanguageConfiguration(), dependencies_files=["requirements.txt"], extra_dependencies=["pytest", "coverage"], + debian_dependencies=["jq"], tests_command=["pytest"], # -W error::DeprecationWarning styles_check_command=["pylint -rn . tests"], coverages_check_command=[ diff --git a/ecosystem/templates/configured_tox.ini b/ecosystem/templates/configured_tox.ini index 0506d6b854..f0e94e935a 100644 --- a/ecosystem/templates/configured_tox.ini +++ b/ecosystem/templates/configured_tox.ini @@ -10,6 +10,10 @@ setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US LC_ALL=en_US.utf-8 +debian_deps = +{% for dep_debian in debian_dependencies -%} + {{ dep_debian|indent(7, True) }} +{% endfor -%} deps = pytest {% for dep_file in dependencies_files -%} {{"-r"|indent(7, True)}} {{ dep_file }} diff --git a/requirements.txt b/requirements.txt index 2958efd84f..647dcfc7d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ requests==2.31.0 coloredlogs==15.0.1 mdformat==0.7.10 toml==0.10.2 +tox-DEBIAN==0.3 diff --git a/tests/resources/configured_python_repository/ecosystem.json b/tests/resources/configured_python_repository/ecosystem.json index ffce99bde9..4a1c6d2cda 100644 --- a/tests/resources/configured_python_repository/ecosystem.json +++ b/tests/resources/configured_python_repository/ecosystem.json @@ -6,6 +6,9 @@ "extra_dependencies": [ "pytest" ], + "debian_dependencies": [ + "jq" + ], "language": { "name": "python", "versions": ["3.6"]