pyecore/setuptools-pyecore

Redesign user interface

Opened this issue · 0 comments

The current user interface isn't as intuitive as it should be to easily configure the code generation of multiple Ecore models. This is mainly because of the limited feature set provided by setuptools and distutils to specify config parameters (see config file doc).

Also the current user interface lacks the possibility to specify several models with equal names.

To overcome this limitations and simply the configuration the current user interface should be redesigned. The configuration should be split up in a basic configuration for default values (e.g. an output folder) and a model-specific configuration.
Basic configuration should be possible on the command line and in a config file. Model-specific configuration (e.g. specific output-folders, user-models, ...) should be limited to config files in the first place.To be as close as possible and compatible to the - ini like - configuration language used by setuptools it should be still possible to use the standard python config parser.

A very basic configuration file should look like this:

# default configuration
[pyecore]
output=gen
auto-register-package=True

# model specific configuration
[pyecore:library]
ecore-model=/path/to/library.ecore
output=gen/library
auto-register-package=False

Model specific configurations should override the default configuration. The second part of the section name (e.g. [pyecore:library] ) can be freely chosen by the user and isn't bound anymore to the root package of the Ecore model.