Skip to content

PR for v.1.11.0#224

Merged
hcpchris merged 25 commits into
masterfrom
develop
May 19, 2026
Merged

PR for v.1.11.0#224
hcpchris merged 25 commits into
masterfrom
develop

Conversation

@hcpchris

Copy link
Copy Markdown
Collaborator
  • ENHANCEMENT: Align the API to Highcharts (JS) v.12.6. In particular, this includes:

    • Added Credits.events property.
    • Added Boost.chunk_size property.
    • Added Exporting.local property.
    • Added non-Cartesian series zoom module.
    • Added Tooltip.show_delay and CrosshairOptions.show_delay properties.
    • Added Legend.max_width support.
    • Added multiple new properties to Treegraph and Treemap series types, including:
      headers, group_padding, node_size_by, traverse_to_leaf, and zoom_enabled.
    • Added Tooltip.fixed and Tooltip.position support.
  • TESTS: Added unit tests to confirm Chart.module_url support for local path.

  • ENHANCEMENT: Updated dependencies and requirements to more-recent versions to address security patches.

  • ENHANCEMENT: Major performance optimization to data point serialization. (courtesy of @dcherman)

  • BUGFIX: Fixed import error associated with requests.auth.HTTPBasicAuth. Closes BUG: HTTP basic authentication fails with "module 'requests' has no attribute 'HTTPBasicAuth'" #221

dcherman and others added 25 commits March 10, 2026 15:43
The `requires_js_object` property on data points was calling
`self.to_dict()` + `self.trim_dict()` — a full serialization round-trip —
just to determine whether a point could be represented as a JS array
(e.g. `[1, 2]`) or needed a JS object (e.g. `{x: 1, y: 2, color: "red"}`).

For large data series this was extremely slow. With ~7,500 points,
`display()` took ~17 seconds, with the vast majority spent inside
`trim_dict` performing type checks via the `validator_collection` library.
Each validator/checker call in that library is wrapped by a decorator
(`disable_on_env` / `disable_checker_on_env`) that calls `os.getenv()` on
every invocation to check whether it should be disabled — resulting in
~6 million `os.getenv()` calls per render.

The upstream `validator_collection` library
(https://github.com/insightindustry/validator-collection) has not been
updated in several years, so rather than wait for a fix there, this change
avoids triggering the expensive code path entirely.

The fix replaces the `to_dict()` + `trim_dict()` approach with a direct
inspection of `_to_untrimmed_dict()`, checking whether any non-array
properties hold non-None, non-empty values. This preserves the same
semantics while bypassing all validator overhead.

Result: `display()` drops from ~17.3s to ~0.96s (18x speedup) for a chart
with 7,500 data points.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Optimize requires_js_object to avoid expensive trim_dict serialization
@hcpchris hcpchris added this to the v.1.11.0 milestone May 19, 2026
@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.24289% with 91 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.82%. Comparing base (ec2afc0) to head (0678224).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
highcharts_core/options/tooltips.py 76.74% 25 Missing and 5 partials ⚠️
highcharts_core/options/plot_options/treegraph.py 80.68% 12 Missing and 5 partials ⚠️
highcharts_core/options/plot_options/treemap.py 84.82% 10 Missing and 7 partials ⚠️
highcharts_core/options/legend/__init__.py 85.55% 10 Missing and 3 partials ⚠️
highcharts_core/options/exporting/__init__.py 89.47% 4 Missing and 2 partials ⚠️
highcharts_core/utility_classes/events.py 93.65% 4 Missing ⚠️
highcharts_core/headless_export.py 50.00% 1 Missing ⚠️
highcharts_core/options/axes/crosshair.py 94.73% 1 Missing ⚠️
highcharts_core/options/boost.py 96.15% 1 Missing ⚠️
highcharts_core/options/credits.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
- Coverage   87.86%   87.82%   -0.05%     
==========================================
  Files         210      210              
  Lines       31316    31522     +206     
  Branches     2413     2432      +19     
==========================================
+ Hits        27516    27683     +167     
- Misses       2826     2858      +32     
- Partials      974      981       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hcpchris hcpchris merged commit e4ba750 into master May 19, 2026
4 checks passed
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.

BUG: HTTP basic authentication fails with "module 'requests' has no attribute 'HTTPBasicAuth'"

2 participants