Version 1.3.4 (#1757)
* bumping to version 1.3.4 * updating changelog * fixing generation of implementation coverage
This commit is contained in:
parent
a420064621
commit
ba9e795394
6 changed files with 50 additions and 108 deletions
|
|
@ -6,6 +6,9 @@ from botocore.session import Session
|
|||
import boto3
|
||||
|
||||
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
def get_moto_implementation(service_name):
|
||||
if not hasattr(moto, service_name):
|
||||
return None
|
||||
|
|
@ -72,20 +75,22 @@ def write_implementation_coverage_to_file(coverage):
|
|||
except OSError:
|
||||
pass
|
||||
|
||||
for service_name in sorted(coverage):
|
||||
implemented = coverage.get(service_name)['implemented']
|
||||
not_implemented = coverage.get(service_name)['not_implemented']
|
||||
operations = sorted(implemented + not_implemented)
|
||||
implementation_coverage_file = "{}/../IMPLEMENTATION_COVERAGE.md".format(script_dir)
|
||||
# rewrite the implementation coverage file with updated values
|
||||
print("Writing to {}".format(implementation_coverage_file))
|
||||
with open(implementation_coverage_file, "a+") as file:
|
||||
for service_name in sorted(coverage):
|
||||
implemented = coverage.get(service_name)['implemented']
|
||||
not_implemented = coverage.get(service_name)['not_implemented']
|
||||
operations = sorted(implemented + not_implemented)
|
||||
|
||||
if implemented and not_implemented:
|
||||
percentage_implemented = int(100.0 * len(implemented) / (len(implemented) + len(not_implemented)))
|
||||
elif implemented:
|
||||
percentage_implemented = 100
|
||||
else:
|
||||
percentage_implemented = 0
|
||||
if implemented and not_implemented:
|
||||
percentage_implemented = int(100.0 * len(implemented) / (len(implemented) + len(not_implemented)))
|
||||
elif implemented:
|
||||
percentage_implemented = 100
|
||||
else:
|
||||
percentage_implemented = 0
|
||||
|
||||
# rewrite the implementation coverage file with updated values
|
||||
with open("../IMPLEMENTATION_COVERAGE.md", "a+") as file:
|
||||
file.write("\n")
|
||||
file.write("## {} - {}% implemented\n".format(service_name, percentage_implemented))
|
||||
for op in operations:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue