Skip to content

Commit

Permalink
Redesign "materialization" of data specs (#10235)
Browse files Browse the repository at this point in the history
* Explicitly define glyph coordinates

* Use NumberArray.set() in ImageURL

* Add default values

* Don't check for nulls in MultiLine._index_data()

* Wrap only plain object default values

* Make data projection explicit

* Clean up HexTile._set_data()

* Add support for ragged arrays

* Encode dimension in coordinate specs

* Explicit data materialization

* Update incomplete unit tests

* Update graph layout providers

* Fail safe when a column is missing

* Update incomplete glyph tests

* Assert number arrays in corner cases

* Fix glyphs' defaults

* Explicit defaults in {V,H}Bar glyphs

* Respect packed colors in webgl backend

* Unify handling of colors and alpha

* Use CoordinateSeqSeqSeqSpec for multi polygons

* Make toStringTag static

* Increase pixel allowance

* Respect glyph protocol in graph renderer

* Ignore early glyph positional defaults

* Mark export selenium tests as flaky
  • Loading branch information
mattpap committed Jul 9, 2020
1 parent 253bc4e commit 06be48a
Show file tree
Hide file tree
Showing 43 changed files with 881 additions and 734 deletions.
12 changes: 7 additions & 5 deletions bokeh/models/glyph.py
Expand Up @@ -66,19 +66,21 @@ def parameters(cls):
'''
arg_params = []
no_more_defaults = False

for arg in cls._args:
for arg in reversed(cls._args):
descriptor = cls.lookup(arg)
default = descriptor.class_default(cls)
if default is None:
no_more_defaults = True
param = Parameter(
name=arg,
kind=Parameter.POSITIONAL_OR_KEYWORD,

# for positional arg properties, default=None means no default
default=Parameter.empty if default is None else default
# For positional arg properties, default=None means no default.
default=Parameter.empty if no_more_defaults else default
)
typ = descriptor.property._sphinx_type()
arg_params.append((param, typ, descriptor.__doc__))
arg_params.insert(0, (param, typ, descriptor.__doc__))

# these are not really useful, and should also really be private, just skip them
omissions = {'js_event_callbacks', 'js_property_callbacks', 'subscribed_events'}
Expand Down

0 comments on commit 06be48a

Please sign in to comment.