MatejSloboda / Dijkstra_map_for_Godot

MIT License
77 stars 13 forks source link

Making documentation accessible and maintainable #88

Closed arnaudgolfouse closed 3 years ago

arnaudgolfouse commented 3 years ago

Hello,

I realized that DOCUMENTATION.md might not be up to date with the rest of the code, and in trying to update it, it became quite evident that a lot of information here is redundant with dijkstra-map-gd's documentation. I don't think this is a great system right now, because:

SimonasLetukas commented 3 years ago

I can only comment from a .NET perspective, but automatically generating API descriptions is definitely the way to go. The only catch here is that the code itself then should be commented with the example inputs and nice descriptions, basically everything that is in DOCUMENTATION.md right now. And it would still be quite a mission to check these descriptions before committing any code, so that the generated descriptions are up to date.

arnaudgolfouse commented 3 years ago

Yeah, that is why I think using DOCUMENTATION.md is not the best idea: I would rather directly use the output of cargo doc in some way, as it is much easier to maintain documentation directly written in the code (dijkstra-map-gd/src/lib.rs in this case).

MatejSloboda commented 3 years ago

Yeah, the documentation is an issue. From user perspective, the documentation should stylistically match Godot's documentation (ie. be in GDScript). That's why we originally opted to write it manually into .md file instead of using cargo doc. Rust documentation will be rather opaque to your average godot user (speaking from experience).

Perhaps we should ask guys over at gdnative rust bindings. This seems more like a general issue for all gdnative rust users, than merely our specific problem.

arnaudgolfouse commented 3 years ago

You're right, it should be as easy to read as possible to Godot users... I don't think there is a canonical way to write / distribute documentation in Godot ? (except for the engine's internal documentation)

I will ask in the gdnative rust bindings repository. I don't know if they will be able to help us, but it would be amazing to have a tool to generate this documentation automatically...

arnaudgolfouse commented 3 years ago

Done, we will see how that goes :)

arnaudgolfouse commented 3 years ago

So they pointed to a way to generate this ourselves... To be honest this seems reasonably feasible, and I would gladly do it. I won't be able to work on it for the next few weeks though.

astrale-sharp commented 3 years ago

Okay multiple thoughts :

arnaudgolfouse commented 3 years ago

Folks, it is alive ! 🎉

I made a documentation tool here, and it is now published to crates.io, which means it is ready to be used for this project ! Some adjustments will be necessary to make it work, but you can expect a PR relatively soon 🙂

PS: This is usable in (theoretically) any godot-rust project that exports to gdscript !

arnaudgolfouse commented 3 years ago

Since this is now merged and exported to the asset store, I think it's fair to say this issue was resolved 😃