moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Review function names and file names #102

Open moodymudskipper opened 2 years ago

moodymudskipper commented 2 years ago

The file structure is not readable and it's not clear what functions are used where.

I'd like to to experiment with a new naming convention:

Though we already mostly established the hierarchy with our numbered files names, it would be nice to use {flow} itself should be used to draw this map.

A way to do it is to :

That would be useful when starting to contribute on an existing package, would be interesting to test on dm, dplyr, unglue, flow.

moodymudskipper commented 2 years ago

This gives us the flow of all exported functions, so should include every function, we might support something like flow_view_deps("{flow}") or flow_view_deps({flow}) to do the following :

exportedfuns <- getNamespaceExports("flow") body <- str2lang(paste0( "{", paste0("flow::", exported_funs, collapse = ";"), "}" )) flow <- as.function(list(body_)) all_funs <- paste0("flow:::", ls(asNamespace("flow")), "`") flow::flow_view_deps(flow, promote = all_funs, out = "png", show_imports = "none")