machow / plotnine-docs-demo

MIT License
0 stars 2 forks source link

Cleaning up references to aliases in _quarto.yml #23

Open machow opened 1 year ago

machow commented 1 year ago

In plotnine aliases are created using this code...

alias("scale_colour_manual", scale_color_manual)

Currently, we need to use a somewhat verbose syntax to refer to aliases:

name: path.to.alias.name
dynamic: path.to.target.name

If we change the plotnine syntax to use something like this...

alias("scale_colour_manual", scale_color_manual)

Testing

We can test it using this code, which should give us the stuff from scale_color_manual (the target, not the alias)

from quartodoc import get_object

obj = get_object("plotnine.scales.scale_manual.scale_colour_manual", dynamic=True)
obj.docstring.value
obj.is_function