Skip to content

Commit

Permalink
docs: version bump and redefined config reader
Browse files Browse the repository at this point in the history
  • Loading branch information
jagalindo committed May 27, 2024
1 parent c015498 commit c59b103
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Configuration(VariabilityModel):
def get_extension() -> str:
return 'configuration'

def __init__(self, elements: dict[VariabilityElement, bool]) -> None:
def __init__(self, elements: dict[Any, bool]) -> None:
self.elements = elements

def get_selected_elements(self) -> list[Any]:
Expand All @@ -23,10 +23,7 @@ def __hash__(self) -> int:
return hash(frozenset(self.elements.items()))

def __str__(self) -> str:
return ', '.join([e.name for e in self.elements if hasattr(e, 'name')])
return ', '.join([str(e) for e in self.get_selected_elements()])

def __iter__(self):
return iter(self.elements)

def has(self, name: str) -> bool:
return any(name == element.name for element in self.elements.keys())
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def transform(self) -> Configuration:
csv_reader = self.get_configuration_from_csv(self._path)
elements = {}
for row in csv_reader:
elements[VariabilityElement(row[0])] = True
elements[row[0]] = True
return Configuration(elements)

def get_configuration_from_csv(self, path: str) -> list[list[str]]:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="flamapy-fw",
version="2.0.0.dev0",
version="2.0.0.dev1",
author="Flamapy",
author_email="flamapy@us.es",
description="Flamapy is a Python-based AAFM framework that takes into consideration previous AAFM tool designs and enables multi-solver and multi-metamodel support for the integration of AAFM tooling on the Python ecosystem.",
Expand Down

0 comments on commit c59b103

Please sign in to comment.