Skip to content
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

Composition GUIs, Type Hints and Intersphinx Updates #43

Merged
merged 48 commits into from
Feb 15, 2025
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
69830da
typehint and intersphinx updates
chrizzFTD Dec 15, 2024
9757336
use Mapping from collections instead of typing
chrizzFTD Dec 15, 2024
0f37b45
extlink no longer used
chrizzFTD Dec 15, 2024
2827cf7
use intersphinx and doxylink references
chrizzFTD Dec 19, 2024
c640748
newline and link adjstment
chrizzFTD Dec 20, 2024
e6b35a8
use abc
chrizzFTD Dec 20, 2024
1de8ae3
newlines in long signatures
chrizzFTD Dec 21, 2024
1e022f2
margin updates
chrizzFTD Dec 21, 2024
0436720
restore Usd.PrimDefaultPredicate default in iprims
chrizzFTD Dec 21, 2024
6d8d3c2
fix malformed iprims formatted signature
chrizzFTD Dec 21, 2024
8b46490
use glossary in spawn many
chrizzFTD Dec 21, 2024
8e8820e
don't limit hoverxref to python domain
chrizzFTD Dec 21, 2024
bf075a7
ugly hack to add title to doxylink
chrizzFTD Dec 22, 2024
b7e7036
minorcleanup
chrizzFTD Dec 22, 2024
dd88517
display none rather than zero width
chrizzFTD Dec 22, 2024
e1d0540
minor wording
chrizzFTD Dec 29, 2024
14161cf
reorganize conf functions
chrizzFTD Dec 29, 2024
bbb9206
quick draft on using pcp traversal instead of composition query since…
chrizzFTD Dec 29, 2024
ff634bc
remove pcp walk
chrizzFTD Dec 29, 2024
1be7836
colorize relocates in text browser and composition tree
chrizzFTD Dec 29, 2024
5f0862b
test for spawn_many failing where parent can't be set to assembly kind
chrizzFTD Dec 29, 2024
6ee9e20
make error message more descriptive
chrizzFTD Dec 29, 2024
5c4890f
minor cleanup
chrizzFTD Dec 29, 2024
65bf5c9
restore hoverxref_domains
chrizzFTD Dec 29, 2024
59e2f73
hoverxref not linking on end to end
chrizzFTD Dec 29, 2024
a4e1dbd
Revert "hoverxref not linking on end to end"
chrizzFTD Dec 29, 2024
9215edb
update layerstack image docs
chrizzFTD Dec 31, 2024
78a9d14
revisit prim composition by walking prim index
chrizzFTD Dec 31, 2024
069547e
glossary test
chrizzFTD Dec 31, 2024
2cbb2b9
minor cleanup and bring colors to pcp dump to string brwoser
chrizzFTD Jan 1, 2025
81b8c10
title adjustment
chrizzFTD Jan 1, 2025
17c6bd9
add stats label to top of prim composition dialog
chrizzFTD Jan 2, 2025
b60a4ca
rely on future annotations for union type
chrizzFTD Jan 2, 2025
092eae4
Counter.total available in py3.10+
chrizzFTD Jan 2, 2025
b85200a
tooltips
chrizzFTD Jan 2, 2025
9bba026
minor cleanup
chrizzFTD Jan 2, 2025
568c8a8
minor word updates
chrizzFTD Jan 2, 2025
dbe0b87
update prim composition gif
chrizzFTD Jan 4, 2025
af7b305
test for inert nodes
chrizzFTD Jan 4, 2025
4a28210
update maya prim composition
chrizzFTD Jan 4, 2025
911ac26
fix image path
chrizzFTD Jan 4, 2025
0c896eb
minor wording
chrizzFTD Jan 18, 2025
2ea2dfa
use only prim index
chrizzFTD Jan 18, 2025
4cd2506
minor wording
chrizzFTD Jan 18, 2025
8b9fb70
discard glossary from index until ready
chrizzFTD Feb 15, 2025
e4ab6ed
e stands for relocates
chrizzFTD Feb 15, 2025
31927b8
RTD requires sphinx docs path now
chrizzFTD Feb 15, 2025
2ea14ca
minor word extension
chrizzFTD Feb 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reorganize conf functions
Signed-off-by: Christian López Barrón <[email protected]>
  • Loading branch information
chrizzFTD committed Dec 29, 2024

Verified

This commit was signed with the committer’s verified signature.
ppkarwasz Piotr P. Karwasz
commit 14161cf0b750304c251808a9554579778ddb1c10
40 changes: 20 additions & 20 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -248,17 +248,10 @@
}


def _handle_missing_usd_reference(app, env, node, contnode):
"""Handle missing references by redirecting to a custom URL."""
from docutils import nodes

target = node['reftarget']
if not target.startswith('pxr.'):
return None

reftitle, refuri = _get_url_for_target(app, target)
node = nodes.reference('', contnode.astext(), internal=False, refuri=refuri, reftitle=reftitle)
return node
@functools.cache
def _get_doxylink_part(text):
__, __, part = _doxylink_ext.split_explicit_title(text)
return _doxylink_ext.utils.unescape(part)


@functools.cache
@@ -268,13 +261,6 @@ def _get_usd_ref_tooltip(app):
return f"(in {proj} v{version})"


@functools.cache
def _doxylink_split_explicit_title(text):
has_explicit_title, title, part = _doxylink_ext.split_explicit_title(text)
part = _doxylink_ext.utils.unescape(part)
return has_explicit_title, title, part


@functools.cache
def _get_url_for_target(app, target):
pxr_obj_namespace = target.removeprefix('pxr.').replace(".", "")
@@ -285,13 +271,26 @@ def _get_url_for_target(app, target):
"Usd_Term": "primFlags.h",
"Usd_PrimFlagsConjunction": "primFlags.h",
}.get(pxr_obj_namespace, pxr_obj_namespace)
__, __, part = _doxylink_split_explicit_title(pxr_obj_namespace)
part = _get_doxylink_part(pxr_obj_namespace)
url = app.env.doxylink_cache[_USD_DOXYGEN_CACHE_NAME]['mapping'][part]
full_url = _doxylink_ext.join(_USD_DOXYGEN_ROOT_DIR, url.file)
reftitle = _get_usd_ref_tooltip(app)
return part + " " + reftitle, full_url


def _handle_missing_usd_reference(app, env, node, contnode):
"""Handle missing references by redirecting to a custom URL."""
from docutils import nodes

target = node['reftarget']
if not target.startswith('pxr.'):
return None

reftitle, refuri = _get_url_for_target(app, target)
node = nodes.reference('', contnode.astext(), internal=False, refuri=refuri, reftitle=reftitle)
return node


def _grill_process_signature(app, what, name, obj, options, signature, return_annotation):
if name == "grill.usd.iprims": # Target the specific function
# Prim predicates don't have a __repr__, which creates malformed signature formatting (no new lines, no links)
@@ -304,14 +303,15 @@ def _grill_process_signature(app, what, name, obj, options, signature, return_an


def _create_doxylink_role_with_title(app, *args, **kwargs):
# TODO: find a less hacky way of achieving this (aiming for consistency with intersphinx titles on hovered links)
doxylink_role = _doxylink_create_role(app, *args, **kwargs)
intersphinx_title = _get_usd_ref_tooltip(app)

def _find_doxygen_link_with_title(name, rawtext, text, *patched_args, **patched_kwargs):
inner_result = doxylink_role(name, rawtext, text, *patched_args, **patched_kwargs)
node = inner_result[0][0]

__, __, part = _doxylink_split_explicit_title(text)
part = _get_doxylink_part(text)

node.attributes['reftitle'] = part + " " + intersphinx_title
return inner_result