diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 09235b6c..30741ebc 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -24,9 +24,9 @@ body: label: 🐛 Describe the bug description: | Please provide a clear and concise description of what the bug is. - + If relevant, add a minimal example so that we can reproduce the error by running the code. It is very important for the snippet to be as succinct (minimal) as possible, so please take time to trim down any irrelevant code to help us debug efficiently. We are going to copy-paste your code and we expect to get the same result as you did: avoid any external data, and include the relevant imports, etc. - + Please also paste or describe the results you observe. If you observe an error, please paste the error message including the **full** traceback of the exception. It may be relevant to wrap error messages in ```` ```triple quotes blocks``` ````. placeholder: | diff --git a/src/main.py b/src/main.py index 9921734e..f335a40f 100644 --- a/src/main.py +++ b/src/main.py @@ -21,9 +21,9 @@ _get_dependency_upper_bound_for_runtime_upgrade, ) from package_report import ( + generate_package_dependency_report, generate_package_size_report, generate_package_staleness_report, - generate_package_dependency_report ) from release_notes_generator import generate_release_notes from utils import ( diff --git a/src/package_report.py b/src/package_report.py index 4507d507..33ddc753 100644 --- a/src/package_report.py +++ b/src/package_report.py @@ -237,11 +237,8 @@ def _generate_python_package_dependency_report(image_config, base_version_dir, t # Pull package metadata from conda-forge and dump into json file search_result = conda.cli.python_api.run_command("search", str(target_match_spec_out), "--json") package_metadata = json.loads(search_result[0])[package][0] - results[package] = { - "version": package_metadata["version"], - "depends": package_metadata["depends"] - } - + results[package] = {"version": package_metadata["version"], "depends": package_metadata["depends"]} + print( create_markdown_table( ["Package", "Version in the Target Image", "Dependencies"], diff --git a/test/test_package_report.py b/test/test_package_report.py index 17e9e013..eed3c759 100644 --- a/test/test_package_report.py +++ b/test/test_package_report.py @@ -8,9 +8,9 @@ from config import _image_generator_configs from package_report import ( + _generate_python_package_dependency_report, _generate_python_package_size_report_per_image, _get_installed_package_versions_and_conda_versions, - _generate_python_package_dependency_report, ) from utils import get_match_specs, get_semver @@ -204,7 +204,9 @@ def test_generate_package_dependency_report(mock_conda_command, tmp_path, capsys 0, ) - _generate_python_package_dependency_report(_image_generator_configs[1], str(base_env_in_file_path), str(target_env_in_file_path)) + _generate_python_package_dependency_report( + _image_generator_configs[1], str(base_env_in_file_path), str(target_env_in_file_path) + ) captured = capsys.readouterr() print(captured.out) @@ -213,4 +215,4 @@ def test_generate_package_dependency_report(mock_conda_command, tmp_path, capsys # Assert existing packages not in report assert "ipykernel" not in captured.out - assert "numpy" not in captured.out \ No newline at end of file + assert "numpy" not in captured.out