JacquesCarette / Drasil

Generate all the things (focusing on research software)
https://jacquescarette.github.io/Drasil
BSD 2-Clause "Simplified" License
142 stars 26 forks source link

Making dependency graphs for data types in drasil #2612

Open Ant13731 opened 3 years ago

Ant13731 commented 3 years ago

Referring to the emails about creating new introduction documents, I think something that would be good to have is a graphical and a visual set (venn diagram-like) way of showing type dependencies. I was originally planning to use tikz (as I am somewhat familiar with it), but after looking at Nathaniel's work and the drasil website dependency graphs, I was wondering if using latex is a good way to go about doing something like this. Graphviz could be nicer as it has more colours/options for displaying, but I'm not really sure how to start something. Does it have node/bubble size control options? Is there a good source that I could read to learn more, or should I stick with Tikz? I'll continue looking on my own, but I didn't know if there was a method that's already been done here.

JacquesCarette commented 3 years ago

Definitely dot is going to give you the most flexibility.

There are 3 big pieces of information:

The latter is what I asked Nathaniel to generate in those giant spreadsheets. The most important ones to focus on are the ones in drasil-lang. These are the core of Drasil. All 3 of the above, when drawn, would yield some information about oddities in what we have. [There are known oddities, so we know that we should be able to see at least those; @Awurama-N is actively working on fixing one at the data-structure level.]

Ant13731 commented 3 years ago

Okay, I see. I just made a new branch that should start to cover the first piece, but it's still a WIP.

JacquesCarette commented 3 years ago

I saw all the .dot files. Do you have scripts to automatically render them?

balacij commented 3 years ago

@Ant13731 Regarding DTG_Config.txt, does code-base and metadata need to be added to the DTG_Config.txt file under the scripts folder? If so, do you know what the comment "(lowercase, space separated, in order of display in output file)" means from the file? I'm not quite sure I understand what "output file" it's referring to.

Ant13731 commented 3 years ago

I think the comment means that the order in which the folder names are given is the order the folders will appear on the type/class dependency .csv file that Nathaniel generated (its a giant spreadsheet that records types, classes, and instances that generates in the analysis folder). DTG_Config.txt is used when make analysis is called. I think those two new folders should be added, but I don't think the order really matters to the program, its just so we can change which folder appears first on the spreadsheet.

balacij commented 3 years ago

Thanks! I'll make a PR for it then.

Ant13731 commented 3 years ago

Just a quick update on this issue:

We now have graphs related to the class-instance relations and the data type relations, but we still need dependency graphs for relations between classes. See the Analysis section of the Drasil website to view the graphs.

Improving the existing graphs might include #2209, since the current hand-made source code reader is definitely not perfect. There are also some printers under scripts/DataPrinters that may benefit from using a pretty printer rather than manually outputting each line.