Replies: 1 comment
-
Hi @egerlach, Thanks for trying out 1.0.0rc1, and for the ideas. Feel free to create issues for anything that you feel is reasonably coherent and well-defined. PluginsI don't have a lot of experience designing or developing plugins/plugin systems, so any advice or ideas here are welcome. I have seen that many other libraries that support plugins use pluggy, but I don't have a very solid mental model for plugins, so I found the pluggy documentation to be somewhat hard to grok. If you know if any resources that discuss design patterns for plugins conceptually, that would be appreciated. I'm open to the ideas of having more robust and expansive extendability through plugins, though I am also wary of maintenance surface area. From searching GitHub on how people are using erdantic, I've only ever seen people use it for Pydantic models and with entirely default settings. JSON SchemaI've never worked with JSON Schema, so I don't have an especially well-informed perspective here. However, it does seem reasonable that if you can read a JSON Schema document into a runtime object and write a predicate function and a field extractor function for it, then it feels like it could fit into erdantic. |
Beta Was this translation helpful? Give feedback.
-
I just used
erdantic==1.0.0rc1
to do an ERD for a small set of Pydantic models. It turned out to be easier than creating a diagram from the JSON Schema, which surprised me (there's no good tools for diagramming a JSON Schema...)I'm putting all my thoughts in a discussion for now, because I don't want to file issues for them when you're this close to 1.0.
I noticed that you've created an input plugin system that allows you to support
attrs
, etc. How would you feel about having an input plugin like something for JSON Schema? It's not auditing the code, but I think you might be able to get similar information out of it.I also came across #50 about PlantUML. I think that would be an excellent potential output format as well, especially because it could be a step towards having your dependency on
pygraphviz
be optional. That, of course, makes me start thinking that output plugins might be an option to going down that road.So then last, have you thought about using pluggy for managing your plugins? I've done it both ways, and I find pluggy to be way easier to manage.
Again, I see all of this as post-1.0 stuff. I don't know yet how much I'd be able to contribute myself as I'll have to clear it with my employer, but if I can and I keep using
erdantic
I can help with the above.Beta Was this translation helpful? Give feedback.
All reactions