Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readers and writers for sample of configurations #123

Open
jmhorcas opened this issue Aug 5, 2024 · 2 comments
Open

Readers and writers for sample of configurations #123

jmhorcas opened this issue Aug 5, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jmhorcas
Copy link
Contributor

jmhorcas commented Aug 5, 2024

Is your feature request related to a problem? Please describe.
Need of reading and writing sample (lists) of configurations in a file.

Describe the solution you'd like
I provide two different readers and two different writers available here:

  1. Configurations CSV Writer: This writes a list of configurations to a CSV file in the following format:
Element1, Element2, Element3,..., ElementN
True, True, False,..., True
True, False, False,..., False
True, True, True,..., True
...
  1. Configurations CSV Reader: This reads a list of configurations from a CSV file in the previous format.

  2. Configurations List Writer: This writes a list of configurations to a txt file in the folllowing format:

['Element1', 'Element2',..., 'ElementX']
['Element1', 'Element2',..., 'ElementY']
['Element1', 'Element2',..., 'ElementZ']
...

where each list represents the selected elements in a configuration.
4. Configurations List Reader: This reads a list of configurations in a txt file in the previous format.

Describe alternatives you've considered

  • All the transformations are developed with no dependencies with other plugins, so they can be incorporated to flamapy_fw safely, if desired.
  • The CSV reader provides a configuration parameter to store only the selected elements.
  • The four transformations have been tested.

Additional context

  • These solutions are the advantages that can include in the same file information about each configuration such as "attributes configurations" (e.g., Price of the configuration, Performance of the configuration,...).
    In the case of the CSV solution, each attribute can be easily added as a new column. In the text file, attributes can also be incorporated as column (in a CSV like format), or as lists.

I just have also available a readers/writers for attributes in configurations. Let me know if you are interested in these other attributes readers/writers. See ConfigurationsAttributesReader

@jmhorcas jmhorcas added the enhancement New feature or request label Aug 5, 2024
@jagalindo
Copy link
Member

@jmhorcas how this differs from the currently available csvreader in the core? If the configurations are not fm configurations (the attributes one are). In other words they are just key value pairs, they belong to the core within the configuration metamodel. Otherwise, they belong to the fm metamodel.

@jmhorcas
Copy link
Contributor Author

jmhorcas commented Aug 6, 2024

The different with the current CSVReader in the core is that it only reads one configuration per file. Thus, if you have 50 configurations you need 50 files.
The readers I propose read a sample of configurations from a single file.

All the readers/writers I propose (including the attributes reader which is based on key-value pairs) are based on string "str" or "Any" types.
Thus, the configuration are not FM configurations, nor the attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants