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 , 6 years ago
Cc: | added |
---|
comment:2 by , 6 years ago
Milestone: | → 1.0 |
---|
comment:4 by , 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 , 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.
follow-up: 6 comment:6 by , 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 , 5 years ago
Milestone: | 1.0 → 1.1 |
---|
comment:8 by , 5 years ago
Milestone: | 1.1 → 1.2 |
---|
comment:9 by , 5 years ago
Milestone: | 1.2 → 1.3 |
---|
comment:11 by , 3 years ago
Milestone: | 1.4 → 1.5 |
---|
comment:14 by , 2 years ago
Milestone: | 1.7 → 1.8 |
---|
comment:15 by , 17 months ago
Milestone: | 1.8 → 1.9 |
---|
comment:17 by , 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 , 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:20 by , 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 , 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 , 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 , 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.
comment:24 by , 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 , 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.
comment:26 by , 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:28 by , 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/*"]
comment:29 by , 13 months ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The documentation update is the fix. The files need to be installed in the right location, but the source does not need to match.
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.