Skip to content

Commit

Permalink
Remove print statements and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
simisimon committed Oct 29, 2024
1 parent ddb972a commit 9f3991c
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'poetry.masonry.api'

[tool.poetry]
name = 'CfgNet'
version = '1.0.2'
version = '1.0.3'
description = 'A Framework for Tracking Configuration Dependencies Across a Software Project'
authors = [
'Sebastian Simon <[email protected]>',
Expand Down
5 changes: 0 additions & 5 deletions src/cfgnet/config_types/config_type_inferer.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ def get_config_type(self, option_name: str, value: str):

results.sort(key=lambda x: x[1].value, reverse=True)

print(results)
print(option_name, value)

if self.is_boolean(value):
return ConfigType.BOOLEAN

Expand All @@ -419,8 +416,6 @@ def get_config_type(self, option_name: str, value: str):
if len(results) > 1:
confidence_levels = [result[1] for result in results][:2]

print(len(confidence_levels))

if all(
confidence == confidence_levels[0]
for confidence in confidence_levels
Expand Down
1 change: 0 additions & 1 deletion src/cfgnet/network/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ def init_network(cfg: NetworkConfiguration) -> Network:
plugins, abs_file_path
)
if plugin:
print("File to parse: ", abs_file_path)
try:
plugin.parse_file(
abs_file_path=abs_file_path,
Expand Down
1 change: 0 additions & 1 deletion src/cfgnet/plugins/file_type/hadoop_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def parse_tree(self, subtree: _Element, parent_node: Node):
property_value = child.text.strip()

if property_name:
print(property_name, config_type)
option = OptionNode(
property_name, subtree.sourceline, ConfigType.UNKNOWN
)
Expand Down
1 change: 0 additions & 1 deletion tests/cfgnet/config_types/test_config_type_inferer.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,4 @@ def test_config_types(get_inferer):

for test in test_dataset:
inferred_type = inferer.get_config_type(test["option_name"], test["value"])
print(test["option_name"], test["value"], test["expected_type"], inferred_type)
assert inferred_type == test["expected_type"]
3 changes: 0 additions & 3 deletions tests/cfgnet/plugins/concept/test_docker_compose_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ def test_parse_docker_compose_file(get_plugin):
nodes = artifact.get_nodes()
ids = {node.id for node in nodes}

for id in ids:
print(id)

assert artifact is not None
assert len(nodes) == 20

Expand Down
3 changes: 0 additions & 3 deletions tests/cfgnet/plugins/concept/test_gradle_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ def test_config_types(get_plugin):
artifact = plugin.parse_file(gradle_file, "gradle.properties")
nodes = artifact.get_nodes()

for node in nodes:
print(node, node.config_type)

name_node = next(filter(lambda x: x.id == make_id("gradle.properties", "appname", "MyApp"), nodes))
boolean_node = next(filter(lambda x: x.id == make_id("gradle.properties", "org.gradle.daemon", "true"), nodes))
time_node = next(filter(lambda x: x.id == make_id("gradle.properties", "org.gradle.daemon.idletimeout", "1000"), nodes))
Expand Down
3 changes: 0 additions & 3 deletions tests/cfgnet/plugins/concept/test_maven_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ def test_parse_maven_file(get_plugin):
value_nodes = artifact.get_nodes()
ids = {node.id for node in value_nodes}

for id in ids:
print(id)

assert artifact is not None
assert len(value_nodes) == 31

Expand Down
3 changes: 0 additions & 3 deletions tests/cfgnet/plugins/concept/test_mongodb_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def test_parse_postgresql_file(get_plugin):
nodes = artifact.get_nodes()
ids = sorted(list({node.id for node in nodes}))

for node in nodes:
print(node, node.config_type, node.parent.location)

assert artifact is not None
assert len(nodes) == 9

Expand Down
3 changes: 0 additions & 3 deletions tests/cfgnet/plugins/concept/test_yarn_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ def test_config_types(get_plugin):
artifact = plugin.parse_file(yarn_file, "yarn-site.xml")
nodes = artifact.get_nodes()

for node in nodes:
print(node, node.config_type)

number_node = next(filter(lambda x: x.id == make_id("yarn-site.xml", "configuration", "property", "yarn.nodemanager.resource.cpu-vcores", "value", "4"), nodes))
name_node = next(filter(lambda x: x.id == make_id("yarn-site.xml", "configuration", "property", "yarn.resourcemanager.hostname", "value", "resourcemanager.example.com"), nodes))
size_node = next(filter(lambda x: x.id == make_id("yarn-site.xml", "configuration", "property", "yarn.nodemanager.resource.memory-mb", "value", "8192"), nodes))
Expand Down

0 comments on commit 9f3991c

Please sign in to comment.