-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-46178: Documentation fixes for new query system #1149
Conversation
8207f27
to
0709f04
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #1149 +/- ##
=======================================
Coverage 89.47% 89.47%
=======================================
Files 366 366
Lines 49115 49115
Branches 5955 5955
=======================================
Hits 43944 43944
Misses 3753 3753
Partials 1418 1418 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference, I think I prefer Sphinx's relative-name syntax (leading .
for each parent level to move up) to qualifying everything with absolute module names, and I don't consider being able to reference a name in the exact same package without qualification to be lucky; it's correctly concise and just about the only part of Sphinx's name resolution rules/syntax that works like it should.
But this is a big improvement over the previous situation that you didn't have to contribute to get your work done, so I'm certainly not going to ask you to redo it here!
This might also be a good time to see if @timj, @dhirving, and @andy-slac have different opinions on how to handle namespaced references in docs.
The problem is that this is not a matter of "preference" -- the Sphinx links simply do not, and cannot, work the way you seem to think they do. The Sphinx parser does not have access to the source code, and evaluates relative links based on the package in which the component is documented. If a component is lifted into a higher-level namespace (a decision that often happens independently of writing the docstrings), links are relative to that. If it is documented in both high-level and low-level namespaces (as is common in MW), then any relative links will work in at most one of those places. So I stand by my statement that the working links were such only through luck: many, if not most, of the links I fixed look like the writer assumed that the referenced component was in the same package when, in the context of the documentation, it wasn't. |
0709f04
to
ff20e91
Compare
I'm aware the syntax and lookup behavior is not the same as Python's actual import system (which is mind-bogglingly frustrating), but there is a relative syntax that does work, if you take into account where things are documented rather than where they are declared. |
Many links were provided unqualified (and, therefore, attempted to be resolved relative to the documentation namespace), and a few referred to types that don't actually exist. A few links previously worked by chance because they happened to be to immediate members of `daf.butler.queries`. These have been replaced with absolute links to make them more robust.
Some of the Query documentation conflated datasets with dataset types; I've tried to correct the references.
A note for Query.datasets speaks of querying multiple dataset types, even though it explicitly only supports single-type queries. I assume this text was copy-pasted from Registry.queryDatasets.
The previous description referred to table joins and other implementation details, which are not (and need not be) visible to users.
GeneralQueryResults.iter_tuple (and DatasetAssociation.from_query_result, which calls it) assume dataset_id and run columns for the dataset type(s) of interest. However, these columns do not exist unless the query call specifically asks for them.
ff20e91
to
c2c0ee8
Compare
This PR addresses various documentation issues that came up while working on lsst-dm/prompt_processing#249.
Checklist
doc/changes
configs/old_dimensions