diff --git a/.gitignore b/.gitignore index 6fdafd2..fe0e7f6 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ sonar-project.* Pipfile.lock requirements.txt +script*.py diff --git a/script.py b/script.py deleted file mode 100644 index 12ab908..0000000 --- a/script.py +++ /dev/null @@ -1,26 +0,0 @@ -import os -import re - -# Directory containing the .py files -# Ensure to replace this with the directory path you are working with -directory_path = "telnyx/api_resources" - -# Regular expressions to match class lines -class_line_regex = re.compile(r"^class (\w+)\(") - -for filename in os.listdir(directory_path): - if filename.endswith(".py"): - with open(os.path.join(directory_path, filename), "r") as file: - lines = file.readlines() - for line in lines: - class_search = class_line_regex.search(line) - if class_search: - # Extract the class name - class_name = class_search.group(1) - # Construct the template statement - template_statement = ( - f"from telnyx.api_resources.{filename[:-3]} import {class_name}" - ) - print(template_statement) - # Assuming only one class per file as per the given context - break diff --git a/script2.py b/script2.py deleted file mode 100644 index 2f4203f..0000000 --- a/script2.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -import re - -# Directory containing the .py files -# Ensure to replace this with the directory path you are working with -directory_path = "telnyx/api_resources" - -# Regular expressions to match class lines -class_line_regex = re.compile(r"^class (\w+)\(") - -# List to collect all class names -class_names = [] - -for filename in os.listdir(directory_path): - if filename.endswith(".py"): - with open(os.path.join(directory_path, filename), "r") as file: - lines = file.readlines() - for line in lines: - class_search = class_line_regex.search(line) - if class_search: - # Extract the class name - class_name = class_search.group(1) - # Add the class name to the list - class_names.append(class_name) - # Assuming one class of interest per file, but you can remove break for multiple - break - -# Sort the list of class names -class_names.sort() - -# Print the sorted class names in the desired format -for class_name in class_names: - print(f'"{class_name}",') diff --git a/script3.py b/script3.py deleted file mode 100644 index 22129f0..0000000 --- a/script3.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -import re - -# Directory containing the .py files -# Ensure to replace this with the directory path you are working with -directory_path = "telnyx/api_resources" - -# Regular expressions to match class lines -class_line_regex = re.compile(r"^class (\w+)\(") - -# Initializing a list to collect all template statements -template_statements = [] - -for filename in os.listdir(directory_path): - if filename.endswith(".py"): - with open(os.path.join(directory_path, filename), "r") as file: - lines = file.readlines() - for line in lines: - class_search = class_line_regex.search(line) - if class_search: - # Extract the class name - class_name = class_search.group(1) - # Construct the new template statement - template_statement = f"api_resources.{class_name}.OBJECT_NAME: api_resources.{class_name}," - # Instead of printing, append the statement to the list - template_statements.append(template_statement) - # Assuming only one class per file based on the given context - break - -# Sort the list of template statements alphabetically -template_statements.sort() - -# Print the sorted statements -for statement in template_statements: - print(statement) diff --git a/setup.py b/setup.py index 60cac7d..2debe32 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def run_tests(self): setup( name="telnyx", - version="2.0.0", + version="2.1.1", description="Python bindings for the Telnyx API", long_description=long_description, long_description_content_type="text/markdown",