forked from petercable/grpc_requests
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from wesky93/develop
0.1.19 Additions
- Loading branch information
Showing
9 changed files
with
100 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# This script generated a simplified complexity report for a given series of | ||
# Python files, or for non-__init__.py files in the src/grpc_requests directory | ||
# if no arguments are provided. | ||
|
||
# Radon is used to generate the average Cyclomatic Complexity, Maintainability | ||
# Index, and Halstead difficulty and effort metrics for the given files. | ||
|
||
# This report is meant as a quick guide to possible weaknesses in the codebase | ||
# and not meant as a make or break test for work being undertaken. | ||
|
||
# Cyclomatic Complexity - Lower is better | ||
# Maintainability Index - Higher is better | ||
# Halstead difficulty - Lower is better | ||
# Halstead effort - Lower is better | ||
|
||
if ! command -v radon &> /dev/null; then | ||
echo "radon is not installed. Please make sure you have installed the requirements-dev.txt." | ||
exit 1 | ||
fi | ||
|
||
if [ "$#" -eq 0 ]; then | ||
TARGETS=$(find src/grpc_requests/ -name "*.py" ! -name "__init__.py") | ||
else | ||
TARGETS="${*}" | ||
fi | ||
|
||
for TARGET in $TARGETS; do | ||
echo "Report for $TARGET" | ||
echo "====================" | ||
radon cc "$TARGET" -n F -s --total-average | grep "Average" | sed "s|Average complexity|Cyclomatic Complexity|" | ||
radon mi "$TARGET" -s | sed "s|$TARGET|Maintainability Index|" | ||
radon hal "$TARGET" | grep -E "difficulty|effort" | sed "s/^[ \t]*//" | ||
echo "====================" | ||
echo | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
grpcio | ||
grpcio-reflection | ||
protobuf>=3.20.3 | ||
google-api-core>=2.9.0 | ||
cryptography>=39.0.1 | ||
grpcio >= 1.60.1 | ||
grpcio-reflection >= 1.60.1 | ||
protobuf>=3.20.3,<5.0.0dev | ||
google-api-core>=2.11.1 | ||
cryptography>=41.0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.