Opened 6 years ago

Closed 13 months ago

#2689 closed enhancement (fixed)

Add bundle_info.xml tag for documentation file locations

Reported by: Conrad Huang Owned by: Greg Couch
Priority: moderate Milestone: 1.9
Component: Documentation Version:
Keywords: Cc: chimera-staff@…, Tristan Croll
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Instead of enforcing a particular directory structure for documentation in bundles (currently docs/{user,devel,tools,etc}, let developers specify the documentation file locations in bundle_info.xml. If none is provided, fall back to the current scheme.

Change History (29)

comment:1 by Tristan Croll, 6 years ago

Cc: Tristan Croll added

comment:2 by Elaine Meng, 6 years ago

Milestone: 1.0

comment:3 by Eric Pettersen, 6 years ago

It would also be useful if, as part of this change, it were possible to specify that certain tools should not be included in the tools index. Most typically useful for simple, "obvious", tools like Show Volume Menu and Show Sequence Viewer.

Last edited 6 years ago by Eric Pettersen (previous) (diff)

comment:4 by Greg Couch, 6 years ago

In the Show Volume Menu case, is there an alternative? It acts like a preference, and is sticky across invocations of ChimeraX. I'm not a fan of menus appearing and disappearing. I'd rather have the menu entries grayed-out if they're not applicable.

comment:5 by Eric Pettersen, 6 years ago

I don't think anyone wants a _top level_ greyed-out menu. That would just be weird and mystifying -- and added clutter to users that don't use volume data.

in reply to:  6 ; comment:6 by goddard@…, 6 years ago

The Volume menu is just an optional menu.  It could have a configuration setting.  The Show Volume Menu in Tools / Volume Data is just a convenient way for people to discover this option.  That menu entry sets the currently hidden configuration settings, so future sessions will show the top level Volume menu too.

comment:7 by Greg Couch, 5 years ago

Milestone: 1.01.1

comment:8 by Scooter Morris, 5 years ago

Milestone: 1.11.2

comment:9 by Greg Couch, 5 years ago

Milestone: 1.21.3

comment:10 by Greg Couch, 4 years ago

Milestone: 1.31.4

Won't make 1.3.

comment:11 by Greg Couch, 3 years ago

Milestone: 1.41.5

comment:12 by Greg Couch, 3 years ago

Milestone: 1.51.6

Not going to make 1.5 unfortunately.

comment:13 by Tom Goddard, 2 years ago

Milestone: 1.61.7

Ticket retargeted after milestone closed

comment:14 by Greg Couch, 2 years ago

Milestone: 1.71.8

comment:15 by Greg Couch, 17 months ago

Milestone: 1.81.9

comment:16 by Zach Pearson, 13 months ago

I would advocate against this and in favor of standardization.

comment:17 by Eric Pettersen, 13 months ago

Maybe we should de-milestone this and wait for it to become an issue in practice? If wheel files supported symbolic links then this issue would be completely moot, but AFAICT wheel files do not support symbolic links.

comment:18 by Zach Pearson, 13 months ago

Isn't this kind of superseded by extra-files? You can have your docs in any tree you want them to be in as long as you direct them to src/docs right?

comment:19 by Eric Pettersen, 13 months ago

What does "direct them to src/docs" mean exactly?

comment:20 by Zach Pearson, 13 months ago

It's where we imply users should put documentation in tutorials such as the Qt Tool tutorial. In that tutorial, the sample files section puts documentation under src/docs/user/commands

comment:21 by Eric Pettersen, 13 months ago

If a tool has a "help" attribute whose value is "help:user/tools/mytool.html" then the help system automatically looks in the bundle's "docs" subdirectory for it. Maybe I'm missing something, but you can't have the actual documentation live in some other tree since wheels do not support symbolic links.

comment:22 by Zach Pearson, 13 months ago

I mean that with extra-files you can have them anywhere you want and they'll be bundled in the correct location if you set the target destination correctly. extra-files copies the files into your wheel.

comment:23 by Eric Pettersen, 13 months ago

Well, probably ExtraDir rather than ExtraFile, but I see what you mean. Now I recommend just closing this ticket until some kind of actual problematic use case shows up.

Last edited 13 months ago by Eric Pettersen (previous) (diff)

comment:24 by Greg Couch, 13 months ago

The help code effectively does a virtual filesystem overlay to find a bundle's documentation. So it requires that user documentation be in docs/user/{commands,tools}/ in the provided package.

I believe this ticket was a request to support, in bundle_info.xml, a way to eliminate one or two levels of that documentation directory hierarchy in the bundle's source. If the ExtraFiles mechanism can do already do that, then it just needs to be documented.

comment:25 by Eric Pettersen, 13 months ago

No ExtraDir does not eliminate the hierarchy requirement. But the work to implement this does not seem worth the minor upside. At the very least, this ticket should not be milestoned.

Version 0, edited 13 months ago by Eric Pettersen (next)

comment:26 by Tristan Croll, 13 months ago

No problem here (I see I added myself as cc to the ticket way back, but
this stopped being an issue for me years ago). For what it’s worth, I keep
my Sphinx source files in a separate tree, then just have it build the
completed html into the correct directory in the source tree. Apart from
the annoying need to do “make app-install; make docs; make app-install” to
populate the API documentation (a Sphinx evil, not specific to ChimeraX) it
works fine.

On Wed, 18 Sep 2024 at 21:52, ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
wrote:

>
>

comment:27 by Zach Pearson, 13 months ago

I'll write the documentation

comment:28 by Zach Pearson, 13 months ago

I've added the following clause to writing_bundles.rst:

Bundle Documentation
--------------------

Your bundle's documentation can be found and shown by ChimeraX's
help tool. The help tool will look for documentation in
``docs/user/commands`` or ``docs/user/tools``. 

You can store your documentation in your bundle's ``src`` tree, or
next to it as long as you use the appropriate ``ExtraDir`` (XML)
attributes to package them in the correct locations: ::

  src/docs/user/commands/
  src/docs/user/tools/

For example, if your bundle had these folders: ::

  src docs/user/commands docs/user/tools

Then you would put the following in your ``bundle_info.xml`` ::

  <ExtraFiles>
    <ExtraDir source='docs'/>
  </ExtraFiles>

If you use ``pyproject.toml``, you can put your documentation in
any tree structure you like. For example, if your folder structure
was ::

  src docs/commands docs/tools

Then your TOML would include: ::

  [chimerax.extra-files]
  "src/docs/user/commands" = ["docs/commands/*"]
  "src/docs/user/tools" = ["docs/tools/*"]
Last edited 13 months ago by Zach Pearson (previous) (diff)

comment:29 by Greg Couch, 13 months ago

Resolution: fixed
Status: assignedclosed

The documentation update is the fix. The files need to be installed in the right location, but the source does not need to match.

Note: See TracTickets for help on using tickets.