Open materpillar opened 2 years ago
The idea is to import the Python4Capella project once and then reference it in your own project where you will put your own scripts. You can check the Eclipse help contents (menu: Help/Help Contents then the Python for Capella in the tree on the right) or this page for more details.
I would suggest to clarify this in the README and even provide the sample scripts in a separate Git repository within the labs4capella Github project (call it python4capella-samplescripts) that force the user to direclty use the "correct" production setup. Providing the sample scripts within the Python4Capella eclipse project leads the user on a wrong track on how to setup the project.
We did this to have a simple setup to get started. This prevent some configuration errors I think. But at the same time I totally agree with you.
The first step could be to put more light on the plugin documentation in the readme and add a link to the writing script documentation.
If we change the project setup we need to make sure that it is easy to use and no errors can be done while installing it.
Hi, I am confused by the project setup. The
New Project
wizard does not give the option to name the Python4Capella project, so always the default name will be used. I can only create one project like this or first have to rename the existing one. But then I also have to rename all the references in the scripts to the new project name. This seems unnecessary if implemented differently.Also the reference to the sample_scripts folder in the
Script Locations
preferences that is described stays unclear to me. Eventually in production I don't want to use a "sample script" folder, but my actual real folder that is under source control. So it is unclear what a proper project setup would be here. Does theScript Locations
preferences always have to point to the actual folder containing my scripts, that I want to execute? Do I only put this "sample scripts" / "my own scripts" folder under source control then? What if I want to use different repositories or Python4Capella projects? For each project I get the overhead of the "java_api, resources, simplifed_api, utilties" folders, which are additionally subject to change in newer versions I assume, so I guess they should not be part of the project.