terrastruct / TALA

A diagram layout engine designed specifically for software architecture diagrams
https://terrastruct.com/tala
Other
194 stars 4 forks source link

TALA seed in the source file #40

Open Filip-K opened 1 year ago

Filip-K commented 1 year ago

Hi! I just thought it would be nice to have the option of specifying the TALA seed in the source file. This would make diagrams created with TALA more reproducible. Now, if somebody makes a diagram and finds a seed that yields a particularly nice result, the diagram cannot be readily reproduced even in the same version of TALA (unless the author notes the seed in a comment).

mauroexe commented 5 months ago

It a great idea, have you worked on it Alixander?

I'm trying to implement your project on my entire company, it does great diagrams but needs to be refined and to have more error handling and more options in the command line.

alixander commented 5 months ago

@mauroexe you can specify the seed via command line, but it's a good idea to also be able to specify that in the source file. Now that vars configurations works, it'll be easy to add this.

error handling and more options in the command line.

Can you let me know what they are? Hoping to do some while I'm doing this.

Didas-git commented 5 months ago

+1 Would be amazing to be able to add predictability or to just force using less resources this way, and i think one great advantage that could come with this is when using --watch seeing the changes happen to make it easier to choose

mauroexe commented 5 months ago

@mauroexe you can specify the seed via command line, but it's a good idea to also be able to specify that in the source file. Now that vars configurations works, it'll be easy to add this.

error handling and more options in the command line.

Can you let me know what they are? Hoping to do some while I'm doing this.

Error Handling:

I encountered an error after running the --watch command. After several days of troubleshooting, I believe the antivirus might be blocking access to files the command needs to function properly. Unfortunately, I don't have access to the antivirus logs, so I cannot identify the specific files being blocked.

D2Lang Documentation:

While reviewing the D2Lang online documentation for the seed parameter, I noticed a discrepancy:

Online Documentation: Lists "seed" (singular)

image https://d2lang.com/tour/tala/

User Manual: Correctly uses "seeds" (plural)

image https://github.com/terrastruct/TALA/blob/master/TALA_User_Manual.pdf

This inconsistency caused some confusion, as it took me time to discover the correct usage, also the D2Lang docs doesn't mention that you can pass more than one seed; to improve the documentation, I recommend adding a direct link to the User Manual from the D2Lang online documentation, allowing users to access more detailed information.

mauroexe commented 5 months ago

Hey Alixander!

Could it be possible to show the selected seed by the algorithm as info when compiling?

alixander commented 5 months ago

@mauroexe oh good find on that flag discrepency. It was updated in a release and looks like I forgot to update the docs to reflect it.

https://github.com/terrastruct/TALA/releases/tag/v0.3.4

The docs online are just a preview, I should make it clear the canonical source is the manual.

I encountered an error after running the --watch command.

What was the error? The CLI should have sufficient logs to inform the user if it's a file permissioning issue.