Skip to content
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

TALA seed in the source file #40

Open
Filip-K opened this issue Mar 10, 2023 · 6 comments
Open

TALA seed in the source file #40

Filip-K opened this issue Mar 10, 2023 · 6 comments

Comments

@Filip-K
Copy link

Filip-K commented Mar 10, 2023

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).

@alixander alixander transferred this issue from terrastruct/d2 Mar 10, 2023
@mauroexe
Copy link

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
Copy link
Contributor

@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
Copy link

+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
Copy link

mauroexe commented Apr 1, 2024

@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
Copy link

mauroexe commented Apr 2, 2024

Hey Alixander!

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

@alixander
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

4 participants