huak
huak copied to clipboard
Basic doc command
Run huak doc
to auto-generate documentation for your Python project.
By this did you mean to make a CLI feature just like rust doc
which generates automatic docs and we can preview in the browser?
If yes, I would like to know the strategy, so that I can help with this PR (:
Yea this would just add a first-pass PoC implementation (can wrap an existing tool).
huak doc
Generates documentation in something like doc/build/ (open to ideas).
Then
huak doc --open
Could build (if not already) and open it in the browser. So pretty much the same behavior as cargo doc
.
Can I be assigned to this issue? And do you want me to write a custom parser/generator for this? Could be an interesting project for me.
Hey! So I'm trying to build huak in steps. Small steps. I want to give us enough of a buffer to design a good tool. So I'd prefer to tackle this in steps too.
The first iteration of this should wrap an existing project if there's something lean enough/makes sense to wrap.
The second pass we can start thinking about our own implementation. I agree that will be an interesting project.
Doing this will allow us to ship it as part of the PoC. With enough features we can then figure out what makes most sense to prioritize.
With that said, this is an open source project, so if after our first-pass wrapped doc command you want to work on that be my guest :).
Well then, this is really easy. Just call pydoc
and be done with it, ha. I believe thats the standard tool for creating documentation these days?
It might be. Idk when I started the habit of using pdoc, but pdoc would not be ideal for this imo. I haven't used pydoc unfortunately. But yea it should be basic to wrap something like that just to get it done. When that's in then we can look into our own thing.
I think there's going to be a lot to come from Huak that in the future may even be nice to pull out into its own crate. Similar to how maturin
created pyproject-toml-rs
.
I don't know anything about the viability of this idea, but I actually considered if I should make a Rust project to parse python projects for documentation and have a "modern" feel, and a project like this could depend on such a project. Just a random idea, but I could defo implement a wrapper
Yea that's exactly what I mean. IMO it's probably better to do it as part of Huak, refine it as Huak matures (dogfooding), then when it feels robust enough pull it out into its own crate and make it a dep used by huak.
But that's totally up to you. I just don't want to have you go do that and then we end up on different pages with its design/use.
Well what do you have in mind for a more matured Huak doc tool? I have a basic idea so far thats somewhat similar to Rust's docs but in a PEP 8 compliant way
I haven't put too much thought into the details yet. My main requirements as of now would be
- PEP compliant
- fast
Honestly that aligns with my current requirements too, pep8 compliance and speed is essential, which Rust is equipped to handle.