Skip to content

Documentation on how to use plugin generator is not fully clear #7

@jmsanchez7

Description

@jmsanchez7

Describe the bug
When trying to create a new plugin for flamapy using the plugin generator, the docuemntation regarding it is not clear. The error happens when trying to execute the command "generate_plugin": File not found error: [Errno 2] No such file or directory: 'skel_metamodel/'.

To Reproduce
Steps to reproduce the behavior:

  1. Follow every step in https://docs.flamapy.org/developing/setting_development_environment/ , which include:
    1.1. Making a new directory for flamapy and accesing it:
mkdir ~/flamapy
cd ~/flamapy

1.2. Cloning the flamapy_fw, fm_metamodel, pysat_metamodel, bdd_metamodel repos:

git clone https://github.com/flamapy/flamapy_fw.git
git clone https://github.com/flamapy/fm_metamodel.git
git clone https://github.com/flamapy/pysat_metamodel.git
git clone https://github.com/flamapy/bdd_metamodel.git

1.3. In this case, launch a WSL terminal in flamapy folder we created.
1.4. Setting PLUGIN_PATH enviroment variable:

export PLUGIN_PATHS=/mnt/c/Users/jsanchez/Desktop/Proyectos/flamapy/fm_metamodel/:/mnt/c/Users/jsanchez/Desktop/Proyectos/flamapy/pysat_metamodel/:/mnt/c/Users/jsanchez/Desktop/Proyectos/flamapy/bdd_metamodel/

1.5. Setting developer mode using Makefile (a change has to be done in the file, changing python3.9 for python3, already reported in flamapy/flamapy_fw#104):

cd flamapy_fw
make dev
  1. Follow every step in https://docs.flamapy.org/developing/extending_with_your_plugins/ , which include:
    2.1. In our virtual enviroment, install flamapy basic package:
pip install flamapy

2.2. Create new folder for our plugin (in this case, called ts_metamodel):

cd core && mkdir ./ts_metamodel

2.3. Use "generate_plugin":

flamapy generate_plugin./ts_metamodel ts ts

2.4. Previous step (2.3) will result in an error that can be solved by changing the order of the params:

flamapy generate_plugin ts ts ./ts_metamodel

2.5. Previous step (2.4) will also result in an error that can be solved by cloning the https://github.com/flamapy/flamapy and executing "generate_plugins" in it.

cd /path/to/flamapy/folder
git clone https://github.com/flamapy/flamapy.git
cd flamapy && mkdir ./ts_metamodel
flamapy generate_plugin ts ts ./ts_metamodel

Expected behavior
Following the documentation, users should be able to create a plugin usin the plugin generator.

Screenshots
Error in step 2.3:
image

Error in step 2.4:
image

Result in step 2.5:
image

Desktop (please complete the following information):

  • OS: Windows 11 (using WSL)

Additional context
A clearer documentation on the topic could help other users to follow steps easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions