Skip to content

Commit

Permalink
Run code formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-tianquaw committed Aug 13, 2024
1 parent 75fb759 commit b8fb098
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
7 changes: 2 additions & 5 deletions src/package_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
8 changes: 5 additions & 3 deletions test/test_package_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand All @@ -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
assert "numpy" not in captured.out

0 comments on commit b8fb098

Please sign in to comment.