Skip to content

fix: handle NaN colors in plotly create_tile - #266

Merged
lmmentel merged 2 commits into
masterfrom
fix/plotly-nan-fillcolor
Jul 26, 2026
Merged

fix: handle NaN colors in plotly create_tile#266
lmmentel merged 2 commits into
masterfrom
fix/plotly-nan-fillcolor

Conversation

@lmmentel

Copy link
Copy Markdown
Owner

Closes #249

  • create_tile(): add default_color param, fallback when element color is NaN/None
  • periodic_table_plotly(): pass missing through as default_color to create_tile()
  • Remove nbsphinx_allow_errors = True workaround from conf.py
  • Add 5 unit tests for create_tile (valid color, NaN default, NaN custom, None, bounds)

lmmentel added 2 commits July 26, 2026 20:15
- add default_color param to create_tile, fallback when element[color] is NaN/None
- pass missing→default_color from periodic_table_plotly to create_tile
- remove nbsphinx_allow_errors workaround from conf.py
- add TestCreateTile with 5 tests (valid, NaN, custom default, None, bounds)
- rewrite create_tile tests as plain functions (no class)
- AGENTS.md: add pytest-style convention note
- CONTRIBUTING.md: add Writing Tests section with examples
@lmmentel lmmentel self-assigned this Jul 26, 2026
@lmmentel
lmmentel merged commit c8afce9 into master Jul 26, 2026
20 checks passed
@lmmentel
lmmentel deleted the fix/plotly-nan-fillcolor branch July 26, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notebook error: periodic_table(colorby="jmol_color") fails due to NaN fill color in plotly

1 participant