diff --git a/ecosystem/manager.py b/ecosystem/manager.py index 8b6329783a..01622c0b37 100644 --- a/ecosystem/manager.py +++ b/ecosystem/manager.py @@ -324,7 +324,6 @@ def _run_python_tests( repo_url: str, tier: str, python_version: str, - package_to_check: str, test_type: str, ecosystem_deps: Optional[List[str]] = None, ecosystem_additional_commands: Optional[List[str]] = None, @@ -339,7 +338,6 @@ def _run_python_tests( repo_url: repository url tier: tier of project python_version: ex: py36, py37 etc - package_to_check: qiskit or qiskit-terra test_type: [dev, stable] ecosystem_deps: extra dependencies to install for tests ecosystem_additional_commands: extra commands to run before tests @@ -364,7 +362,6 @@ def _run_python_tests( ecosystem_deps=ecosystem_deps, ecosystem_additional_commands=ecosystem_additional_commands, python_version=python_version, - package_to_check=package_to_check, repo_config=repo_configuration, ) qiskit_version, results = runner.run() @@ -547,7 +544,6 @@ def python_dev_tests( repo_url=repo_url, tier=tier, python_version=python_version, - package_to_check=package, test_type=TestType.DEV_COMPATIBLE, ecosystem_deps=[], ecosystem_additional_commands=additional_commands, @@ -583,7 +579,6 @@ def python_stable_tests( repo_url=repo_url, tier=tier, python_version=python_version, - package_to_check="qiskit", test_type=TestType.STABLE_COMPATIBLE, ecosystem_deps=qiskit_latest_deps, ecosystem_additional_commands=additional_commands, @@ -614,7 +609,6 @@ def python_standard_tests( repo_url=repo_url, tier=tier, python_version=python_version, - package_to_check="qiskit", test_type=TestType.STANDARD, logs_link=logs_link, ) diff --git a/ecosystem/models/configuration.py b/ecosystem/models/configuration.py index 38b663b61b..aa783ce163 100644 --- a/ecosystem/models/configuration.py +++ b/ecosystem/models/configuration.py @@ -177,7 +177,6 @@ def default(cls) -> "PythonRepositoryConfiguration": def render_tox_file( self, ecosystem_deps: list[str] = None, - package_to_check: str = "qiskit", ecosystem_additional_commands: list[str] = None, ): """Renders tox template from configuration.""" @@ -188,7 +187,6 @@ def render_tox_file( **self.to_dict(), **{ "ecosystem_deps": ecosystem_deps, - "package_to_check": package_to_check, "ecosystem_additional_commands": ecosystem_additional_commands, }, } diff --git a/ecosystem/runners/python_tests_runner.py b/ecosystem/runners/python_tests_runner.py index e478917eaa..2504dd5bac 100644 --- a/ecosystem/runners/python_tests_runner.py +++ b/ecosystem/runners/python_tests_runner.py @@ -22,14 +22,12 @@ def __init__( ecosystem_deps: Optional[List[str]] = None, ecosystem_additional_commands: Optional[List[str]] = None, python_version: str = "py39", - package_to_check: str = "qiskit", repo_config: Optional[RepositoryConfiguration] = None, ): super().__init__( repo=repo, working_directory=working_directory, repo_config=repo_config ) self.python_version = python_version - self.package_to_check = package_to_check self.ecosystem_deps = ( ecosystem_deps if ecosystem_deps is not None else ["qiskit"] ) @@ -53,7 +51,6 @@ def workload(self) -> Tuple[str, List[CommandExecutionSummary]]: ["tox_default.ini"], ecosystem_deps=self.ecosystem_deps, ecosystem_additional_commands=self.ecosystem_additional_commands, - package_to_check=self.package_to_check, ) qiskit_version = UnknownPackageVersion diff --git a/ecosystem/runners/runner.py b/ecosystem/runners/runner.py index d62fe160ee..30db2c9c5e 100644 --- a/ecosystem/runners/runner.py +++ b/ecosystem/runners/runner.py @@ -56,7 +56,6 @@ def configure_repo( files_fault: List[str], ecosystem_deps: Optional[List[str]] = None, ecosystem_additional_commands: Optional[List[str]] = None, - package_to_check: str = "qiskit", ): """Configuring the different templates: - tox.ini @@ -68,8 +67,6 @@ def configure_repo( files_fault: list of default name replacement ecosystem_deps: list of dependencies ecosystem_additional_commands: additional commands to run before tests - package_to_check: package to check the version of qiskit - No return """ if len(files) != len(files_fault): @@ -118,7 +115,6 @@ def configure_repo( repo_config.render_tox_file( ecosystem_deps=ecosystem_deps, ecosystem_additional_commands=ecosystem_additional_commands, - package_to_check=package_to_check, ) ) elif destination_file_name == FilesTemplates.LINT_FILE_NAME: diff --git a/ecosystem/templates/configured_tox.ini b/ecosystem/templates/configured_tox.ini index 3867e12de1..0506d6b854 100644 --- a/ecosystem/templates/configured_tox.ini +++ b/ecosystem/templates/configured_tox.ini @@ -24,7 +24,7 @@ commands = {% for additional_command in ecosystem_additional_commands -%} {{ additional_command|indent(2, True) }} {% endfor %} - python -c 'import qiskit; f = open("./qiskit_version.txt", "w"); f.write(qiskit.__qiskit_version__["{{package_to_check}}"]); f.close();' + python -c 'import qiskit; f = open("./qiskit_version.txt", "w"); f.write(qiskit.__qiskit_version__["qiskit"]); f.close();' {% for command in tests_command -%} {{ command|indent(2, True) }} {% endfor -%}