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

Default implementation of the operations #50

Open
jmhorcas opened this issue Nov 4, 2021 · 3 comments
Open

Default implementation of the operations #50

jmhorcas opened this issue Nov 4, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jmhorcas
Copy link
Contributor

jmhorcas commented Nov 4, 2021

Testing the framework as an end-user, I perform the following commands with success :)

from famapy.core.discover import DiscoverMetamodels 
dm = DiscoverMetamodels()
result = dm.use_operation_from_file(operation, filename)

However, which implementation of the operation (e.g., sat, fm, bdd) take it by default?
I am using a feature model in FeatureIDE (extension .fide), and it is taking the FM_METAMODELS operations by default in all cases.
Operations work for those that are defined in the FM plugin but not for those that are defined in other plugins but not in FM.

How can I select the specific implementation?
I've tried with the concrete name of the implementation (e.g,. Glucose3ProductsNumber), but it doesn't work, obtaining an NotImplementedError: Way to execute operation not found.

Other related minor issues:

  • Moreover, the real extension for feature models in FeatureIDE is .xml. The extension .fide is artifitial, but for .xml the default reader is the xml_reader. So, if we do not change the extension of FeatureIDE models from .xml to .fide it will fail.

  • Also, operation and filename expected str types as input. It should be documented.

@jagalindo
Copy link
Member

This is a current limitarion. I assign the issue for the latest release

@jagalindo jagalindo added the enhancement New feature or request label Mar 8, 2022
@jagalindo
Copy link
Member

I do thknk that this is already implemented by means of using a different function. Anyhow I'll take a look to it

@jagalindo
Copy link
Member

from famapy.core.discover import DiscoverMetamodels
dm = DiscoverMetamodels()
result = dm.use_operation_from_file(operation, filename)

About this. In case that you're interested in using another plugin you should rely on this style of implementation

from famapy.core.discover import DiscoverMetamodels
dm = DiscoverMetamodels()
fm=dm.use_transformation_t2m("path",'fm')
pysat=dm.use_transformation_m2m(fm,'pysat')
operation=dm.use_operation(pysat,'Valid')
print(operation.get_resutl())

We will implement this option in the command line for the end users asap

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

3 participants