Consider using AsciiDoc instead of Markdown for F Prime documentation #1114
Replies: 9 comments 17 replies
-
@bocchino here you are |
Beta Was this translation helpful? Give feedback.
-
I'd like to note, we do feed Markdown formatted SDDs into our Doxygen documentation for completeness of the Code/C++ reference. We should ensure Doxygen can pull in asciidoc. |
Beta Was this translation helpful? Give feedback.
-
@LeStarch, this is the call for comments item that compelled me to comment 😄 When @zeroping and I were on lab in the spring of 2019, I believe we had a discussion with @bocchino about this very topic. Specifically, the desire to have a single source of documentation that was flexible enough to provide things like aforementioned auto-numbered sections, but not so complicated to require a specialist to write it (i'm looking at you LaTeX 😛 ). At the time, I used Pandoc to convert the MS Word formatted Users Guide to RestructuredText, and then rendered it to a local paginated html folder and a PDF. The existing PDF didn't have any bookmarks, so I was ultimately taking a long round-trip to get a document I already had albeit in a reasonably navigable format. The one Pro that I will add to the above list, is that this project already has a fair amount of Python code, and that could put slight favor towards utilizing a rich text format that is uniform across the multi-language project. Personally, I do relatively heavy Python development. My Python projects are all documented in RST because it is both the prevailing defacto standard and the Sphinx rendering engine is nicely integrated/interoperable with Python development tools. I use RST for my F Prime tools like fprime-extras and cookiecutter-fprime-deployment. We even use RST at GT for some of the mission specific README pages and SDD/RDD documents already. So, I would find it convenient to remember less rich text syntaxes. That said, Asciidoc is just as good when you look at the main concerns. It does have more expressive syntax, it is not subject to "flavored renderers", and it does have the tooling to produce multiple output formats from the same source. So, I will be happy with either choice. |
Beta Was this translation helpful? Give feedback.
-
My main concern is that the documentation be renderable on GitHub so users can easily browse the documentation. It sounds like either AsciiDoc or RST does that. If we pick one going forward, I wouldn't want to go back and redo the old Markdown. As it gets updated, we can convert it. So, I would propose developer's choice. |
Beta Was this translation helpful? Give feedback.
-
In some projects I've worked on we used ReStructured Text for more thorough documentation. We found that Markdown was great for simple to slightly advanced use cases like a README or a CHANGELOG but fell short with complex or long-form documentation. It was also annoying trying to edit Markdown in VS Code or Vim and then there were issues of some developers introducing unsupported tags or flavors into the Markdown and then have it not render correctly for everyone else. Alternatives like ReStructured Text, and by the looks of it Asciidoc, provide great functionality to create even better documentation. My vote is in support of a transition to something like ReStructured Text or Asciidoc. |
Beta Was this translation helpful? Give feedback.
-
I general I have no strong opinions on the matter, however, I am slightly biased towards markdown since we're already using markdown and in general it seems more popular than restructured text. If we wanted to convert from markdown to restructured text we may be able to use a tool to convert everything over like pandoc. I'd be strongly opposed to splitting our documentation between multiple formats.
I don't believe this pro is accurate. There are many local tools that can render markdown. For example, VSCode has a nice side by render view for markdown (including github flavored markdown. In practice most editors I've used have markdown support. Additionally, you can trivially render markdown to pdf with pandoc. I've used that for writing formal papers with markdown before. |
Beta Was this translation helpful? Give feedback.
-
Personally, I am in favor of abandoning Markdown for a more elaborate language to improve the user experience when writing documents. I must admit that I am not familiar with Asciidoc, having only worked with MD and RST. And, as I am currently overloaded with work, I don't have the time to conduct a thorough research on this technology. What saddens me is losing the real-time side-by-side rendering functionality we have in VS Code with Mardkdown. According to the discussions, this real-time rendering functionality is not supported? Side note: I would like to share the use case of F Prime that we have in my company/team. I think it might be interesting to know how a stakeholder uses it in a private/industrial context. My anecdote applies to any open source repository, on GitHub, GitLab, etc. Since my company has very limited access to the internet (including GitHub), we cannot clone GitHub repositories directly to our development machines using "git clone". We use Tuleap ALM (https://www.tuleap.org/fr/) internally to manage our projects and software, and this tool only supports Markdown rendering, which gives us a relatively similar user experience to GitHub for Markdown documentation. However, these are issues specific to my company and its infrastructure. This should not hinder the evolution of the F Prime project; it is up to the stakeholders to adapt in my opinion, at least for this topic. Especially since we are currently using it for PoC rather than marketable projects. |
Beta Was this translation helpful? Give feedback.
-
I was unable to find any support in Doxygen for importing asciidoc nor restructuredText. I followed the above links/discussions but is seems like nothing came of the disucssions. Currently it looks like only Markdown and Doxygen comments are support through Doxygen. The effect of this means we would be unable to generate documentation for our code using Doxygen. Currently, we run Doxygen on the C++ code and it brings in the Mardown-formatted SDDs for the components. This gives us fairly good code documentation for little overhead. That is, we get the SDDs and C++/API documentation in a standard package. I would be hesitant to adopt a different format for these SDDs, because we'd then need to maintain a new tool/workflow for producing the SDD/API documentation we need, which would still require doxygen for the C++ comments as that is our established style. Markdown, for all its irritations, has always won-through thus far because it always has support in XYZ tooling that saves us maintenance or other costs. |
Beta Was this translation helpful? Give feedback.
-
Due to the showstopper-type issues raised by Michael, for now I have converted the Math tutorial from AsciiDoc to Markdown. :^| Here is the PR: It is an interesting case study in using ad-hoc scripts to work around Markdown limitations. Maybe scripts like this can be a solution, until we can get the tools to support AsciiDoc. We just need some way to write documents with basic features such as numbered sections, hyperlinked tables of contents, and proper internal cross links that are checked for validity. |
Beta Was this translation helpful? Give feedback.
-
Pros
Cons
Alternatives
ReStructured Text is another popular choice for documentation. It’s similar to AsciiDoc, with similar pros and cons vs. Markdown. It’s widely used in the Python community.
Beta Was this translation helpful? Give feedback.
All reactions