Skip to content

Make docs live for 6.6.0#5530

Merged
LiamConnors merged 93 commits intodoc-prodfrom
make-docs-live-6-6-0
Mar 3, 2026
Merged

Make docs live for 6.6.0#5530
LiamConnors merged 93 commits intodoc-prodfrom
make-docs-live-6-6-0

Conversation

@LiamConnors
Copy link
Member

No description provided.

codeflash-ai bot and others added 30 commits October 30, 2025 04:46
The optimization achieves a **58x speedup** by eliminating the major performance bottleneck in pandas DataFrame processing. 

**Key optimizations:**

1. **Pre-fetch column data as numpy arrays**: The original code used `df.iloc[index][key]` for each cell access, which triggers pandas' slow row-based indexing mechanism. The optimized version extracts all column data upfront using `df[key].values` and stores it in a dictionary, then uses direct numpy array indexing `columns[key][index]` inside the loop.

2. **More efficient key validation**: Replaced the nested loop checking for missing keys with a single list comprehension `missing_keys = [key for key in REQUIRED_GANTT_KEYS if key not in df]`.

3. **Use actual DataFrame columns**: Instead of iterating over the DataFrame object itself (which includes metadata), the code now uses `list(df.columns)` to get only the actual column names.

**Why this is dramatically faster:**
- `df.iloc[index][key]` creates temporary pandas Series objects and involves complex indexing logic for each cell
- Direct numpy array indexing `columns[key][index]` is orders of magnitude faster
- The line profiler shows the original `df.iloc` line consumed 96.8% of execution time (523ms), while the optimized dictionary comprehension takes only 44.9% (4.2ms)

**Performance characteristics:**
- **Large DataFrames see massive gains**: 8000%+ speedup on 1000-row DataFrames
- **Small DataFrames**: 40-50% faster 
- **List inputs**: Slight slowdown (3-13%) due to additional validation overhead, but still microsecond-level performance
- **Empty DataFrames**: Some slowdown due to upfront column extraction, but still fast overall

This optimization is most beneficial for DataFrame inputs with many rows, where the repeated `iloc` calls created a severe performance bottleneck.
Co-authored-by: Cameron DeCoster <cameron.decoster@gmail.com>
…e_gantt-mhcxyu68

⚡️ Speed up function `validate_gantt` by 58x
- Check template.data.<trace_type> for marker.color or line.color before falling back to template.layout.colorway
- Handle timeline special case (maps to bar trace type)
- Use marker colors first, fall back to line colors if no markers found
- Fixes issue #5416
- Modify apply_default_cascade to check template.data.<trace_type> for marker.color or line.color
- Fallback to template.layout.colorway if trace-specific colors not found
- Add comprehensive tests for trace-specific color sequences
- Handle timeline special case (maps to bar trace type)
- Follow existing patterns for symbol_sequence and line_dash_sequence

Fixes #5416
- Modify apply_default_cascade to read colors from template.data.<trace_type>
- Prioritize trace-specific colors over layout.colorway
- Add special case for timeline constructor (maps to bar trace type)
- Add comprehensive tests for trace-specific color sequences
- Test trace type isolation, fallback behavior, and timeline special case
…plates

fix: Update GitHub issue templates
- Make constructor parameter required (was optional with None default)
- Refactor trace-specific color extraction to only assign when colors are found
- Improve code clarity by checking for non-empty color list before assignment
- Remove redundant check that was setting color_discrete_sequence to None
- The check is unnecessary since we only assign trace_specific_colors when any() is True
- Fallback logic to layout.colorway and qualitative.D3 remains intact
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
[Fix] Support trace-specific color sequences in Plotly Express via templates
LiamConnors and others added 28 commits February 17, 2026 09:58
Update example to use geodatasets
write_image() defaulted engine='auto' and passed it to to_image(),
which treats any non-None engine value as explicitly user-specified
and emits a deprecation warning. By defaulting to None (matching
to_image's expected interface), the warning only appears when the
user actually passes an engine argument.

Fixes #5512
…-warning

Fix spurious engine deprecation warning in write_image
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
Update docs to latest plotly.py version
Update API reference doc version
@LiamConnors LiamConnors merged commit 4cfec3d into doc-prod Mar 3, 2026
7 checks passed
@LiamConnors LiamConnors deleted the make-docs-live-6-6-0 branch March 3, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.