DrMarkusVoss / pumla

pumla - systematic re-use of model elements described with PlantUML
GNU General Public License v3.0
102 stars 10 forks source link

pumla CLI initialisation method to deal with the path to the pumla_macros.puml #9

Closed DrMarkusVoss closed 3 years ago

DrMarkusVoss commented 3 years ago

Is your feature request related to a problem? Please describe. When you use pumla for different projects on your computer, these may be in very different locations of your computers directory structure. When you just have one installation of pumla, the include paths of your projects may look very long. Furthermore, projects that are stored within a VCS like git, can be checked out at different locations and on each computer where it gets checked out pumla may be installed at a different location. That would end up in patching all pumla files after e.g. a git clone.

Describe the solution you'd like Create an initialization routine like e.g. catkin_init or something like that. So a call like pumla init called in the root directory of your project using pumla should lead to a "jumper-file" called "pumla_macros.puml" that includes the "pumla_macros_main.puml" that is stored in the pumla source/installation folder. The new "pumla_macros.puml" would then include the "pumla_macros_main.puml" by absolute or relative path, as the concrete locations are well known when the "init" is called. The generated "pumla_macros.puml" should not be checked in into the VCS, but everytime at checkout/clone be generated first (git hook?) at the same root location.

Describe alternatives you've considered Alternative is that all projects do not include the pumla_macros.puml from a local pumla installation on the hard disk, but always refer to the original raw files on GitHub, e.g. including like that:

!include https://raw.githubusercontent.com/DrMarkusVoss/pumla/main/pumla_macros.puml

But then the user or the using company is pretty dependent on an external source.

Additional context Add any other context or screenshots about the feature request here.