-
Notifications
You must be signed in to change notification settings - Fork 87
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
Auto generate xsd images #852
Conversation
The images in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See Limitations
in the first comment.
Thank you @t-sommer !
Ups, my bad. Working on correcting this.
I fixed the tool to produce the attributes (see dgis/xsddiagram#28)
In the light of the fix above, it is now possible to plot the attributes. Are you sure that you want to go for the semi-automated approach? It's bound to lead to inconsistencies, and I don't want to be the one doing it manually :P |
@clagms 👍 I like your approach. |
I agree with Christian: if we can reduce spacing a bit to waste less space, this is a great solution because we drop even more redundancy - a process started by TorstenS a while back. |
Yes, this option is part of the tool, but is not exposed in the command line. I can expose it. |
Commit 78327ab generates compact diagrams. |
@t-sommer I might need a bit of help with this.
And I'm still not getting the images in the zip file. So this is an already existing problem, and was not introduced by the current PR, right? EDIT: the following command seems to fix the problem:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clagms#1 removes the absolute path (being not available).
…enerate_xsd_images
…cy and avoids tricking the figure generation tool into thinking there are multiple different VendorAnnotations elements.
Nice to see that you forked xsddiagram and even prepared a release. What about downloading https://github.com/clagms/xsddiagram/releases/download/XSDDiagram_1.2_FMI/XSDDiagram_1.2_FMI.zip and extracting the binary in the powershell script for a fully automatic workflow (as I proposed earlier)? |
I do not understand what the motivation was to move the images from docs/images to docs/images/gen. If generated or obtained differently should not matter. |
Ah, I think I understand what you mean now @beutlich . Do you want to change the script to automatically download the exe file? Can you make that change? |
How would you change the script in order to avoid overwriting a generated png @beutlich ? If you can make that change, I'm fine with this! Beware that there are many other figures in the images folder, that are not generated. If you decide to create the README file, make sure that people will know which figures are generated, and make sure to keep that consistent as more generated figures are added. |
Furthermore, make script independent from working directory.
See clagms#2, where I added (and improved) it again. |
Regarding docs\images\gen. I have no strong opinion here. However, there are also drawio generated SVG files in doc\images along with their XML configuration. I had simply expected, that generate_figures.ps1 generates or regenerates all schema PNGs in doc\images and does not care if the file already exists. (We have version control for that reason.) |
Download XSDDiagram
Thank you so much @beutlich ! I've merged this!
It's a matter of personal opinion, but I'd rather be more defensive, and ensure that no override happens unintentionally. For example, if the following instructions are used:
There will be an overwrite. I'm afraid the source control will not be of much help here, since it will only show that one element has been modified. If the person who added the second instruction above does not pay close attention, an override has been made, and the doc will have two pictures which are the same, but one of those references are wrong. An alternative is to rewrite the script into accepting an array of parameter records, and checks that no duplicates are generated.
I was unaware of this. I recommend that those be put in a separate gen folder (not the same as the xdiagram one.. we can reorganize this). It's very easy to edit SVG using inkspace, so I wouldn't be surprised if at some point someone does some improvements on the generated figures. |
# Conflicts: # docs/2_2_common_schema.adoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the generated PNGs to images/schema
and remove the _schema
suffix form the file names (as discussed at the Regular Design Meeting). The rest looks good!
I am searching for the information if an element is optional. Is this visible in the images? |
... just found it |
This is a preview of the solution to #569.
Please have a look and give me feedback, so I can implement the full solution.
Changes and approach:
Advantages:
Limitations:
Note that the tools placed in ./bin/ are temporary and just so you can give me some feedback.