Giter Club home page Giter Club logo

Comments (4)

TheMaverickProgrammer avatar TheMaverickProgrammer commented on July 16, 2024 1

I like option 2. I think I speak for other breathe users when I say I don't use any other features in all the tools besides generating nice web docs from my doxygen. A lot of examples and user projects online I've looked at use the bare bones default output breathe/sphinx anyway. There's not many 'robust' layout designers for sphinx and Exhale already brings a lot to the table in this sphere because it creates separate pages.

Being able to customize even the .rts outputs just slightly would make this the Exhale/Breathe/Sphinx/Doxygen stack for documentation imo.

from exhale.

svenevs avatar svenevs commented on July 16, 2024

Currently no. You just mean at the dump at the bottom, not the hierarchy part right?

The main hurdle with that is Sphinx will emit warnings for every page not included in a toctree. So even though it's still linked in the hierarchy.....Sphinx doesn't understand this.

Presumably you have a larger code base? If so the number of warnings incurred will equal the number of files + directories :/

I will reresearch if there's a way to suppress these warnings. Sphinx 2.0 may have enabled this? Not sure :/

from exhale.

svenevs avatar svenevs commented on July 16, 2024

I do not need it to display Files in the project when I already have a file hierarchy tree. #65 (comment)

I have on paper a writer API for consumers which would allow you to write your own python code as a hook that exhale would use, but quite a lot needs to happen before that can become a reality. I'm currently finishing a thesis from hell...so that has priority unfortunately.

I don't think I can get around the "document not included in any toctree" warning, but I see two options

Option 1

Add a config variable "excludeFromUnabridged": ["file", "dir", ...] (open to different / clearer name choices btw). So list all kinds that you want excluded from the unabridged api.

Instead of putting those in the unabridged_api.rst, I think we can get away with generating an orphan.rst page and put all of the toctree for the file pages exhale generates there. The result being that instead of a warning for every file / directory not included, we should get just one warning about orphan.rst not being included in any toctree.

Option 2

Since files and directories specifically are the problem here, we could change the layout of unabridged api altogether. For things like functions / enums, it is advantageous for them to show up on the library root page. It makes it easy to find things that don't show up in the class hierarchy. But for files and directories specifically, we can add a layer of indirection here. The difference would be currently we have something like this

Functions
=========

...

[begin snip]

Directories
===========

...

Files
=====

...

[end snip]

We can take the [begin snip] up to [end snip] and dump them into a layout.rst document. Then at the bottom of the unabridged api, we can do

Layout
======

.. toctree::
   :max-depth: 1

   layout.rst

It'll give a short listing at the bottom of the unabridged API still, but it will be just two bullet points

Layout

- Directories
- Files
  1. No warnings about "document not included in toctree".
  2. Much cleaner presentation, I agree that dumping all the directories / files isn't really helpful given the file hierarchy on the same page.

Default title of Layout up for debate (can also add a config option to customize it).

What are people's thoughts? I like (2) better because I'd rather not deliberately introduce warnings, and will be easier to implement (read: I can roll that out quickly). (1) is better left for 1.x with the writer API I think (but again, that's a ways off...).

from exhale.

TheMaverickProgrammer avatar TheMaverickProgrammer commented on July 16, 2024

However we could also just do option 1 for now as a hotfix until option 2 is complete. Then mark option 1 flag as deprecated when it builds.

from exhale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.