Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
7c098d0
Create async iter wrapper to simplify loops
ayjayt Aug 20, 2025
3c94ef0
Simplify loop w/ new wrapper.
ayjayt Aug 20, 2025
056206a
Refactor kaleido.py:
ayjayt Aug 21, 2025
8725a80
Change order of functions.
ayjayt Aug 21, 2025
41133f2
Make tabs_ready public
ayjayt Aug 21, 2025
d4a5bd4
Add some types to kaleido.py
ayjayt Aug 22, 2025
0cbd7c0
Merge branch 'master' into andrew/test_coverage
ayjayt Aug 22, 2025
196aca7
Merge branch 'master' into andrew/sometypes
ayjayt Aug 22, 2025
58d8840
Merge branch 'master' into andrew/refactor-tab-api
ayjayt Aug 22, 2025
4b1ea3c
Merge branch 'andrew/sometypes' into andrew/test_coverage
ayjayt Aug 22, 2025
583b8c8
Upgrade choreographer for typing.
ayjayt Aug 22, 2025
d36dbab
Add types to __init__
ayjayt Aug 22, 2025
9838ac4
Fix some bad typing in __init__.py
ayjayt Aug 22, 2025
7d4d297
Improve page logic.
ayjayt Aug 22, 2025
5719383
Merge branch 'andrew/sometypes' into andrew/test_coverage
ayjayt Aug 22, 2025
cbd925b
Add claude run on init and public api
ayjayt Aug 22, 2025
d99bb88
Move pytest async detection to auto
ayjayt Aug 23, 2025
6d3cf13
Iterate with Claude on test_public_api
ayjayt Aug 23, 2025
e4ba49c
Make corrections to public api tests.
ayjayt Aug 23, 2025
1898bd9
Fix up test_init
ayjayt Aug 23, 2025
4147850
Add comments.
ayjayt Aug 23, 2025
7a808b4
Reorganize a bit.
ayjayt Aug 23, 2025
abcc184
Make error_log/profiler 100% optional in __init__
ayjayt Aug 23, 2025
24d0dab
Iterate with claude on public_api test.
ayjayt Aug 25, 2025
f5cc483
Parameterize public api tests for fig/to_dict()
ayjayt Aug 25, 2025
9489b71
Change to using args fixtures.
ayjayt Aug 25, 2025
824230c
Remove regex for html parsing.
ayjayt Aug 25, 2025
d152afa
Fix non-existent function
ayjayt Aug 25, 2025
ec62908
Fix whitespace errors.
ayjayt Aug 25, 2025
930f338
Add types for page_generaetor.
ayjayt Aug 25, 2025
3ddb876
Merge branch 'andrew/sometypes' into andrew/test_coverage
ayjayt Aug 25, 2025
f9175fb
Add hypothesis tests generated by Claude.
ayjayt Aug 25, 2025
2b20a3e
Fix file path ensuring error.
ayjayt Aug 26, 2025
a71a202
Add hypothesis.
ayjayt Aug 26, 2025
63332ca
Allow _ensure_path to deal with str/encoding combos
ayjayt Aug 26, 2025
d495e34
Tweak manually hypothesis tests in PageGenerator
ayjayt Aug 26, 2025
e92fca8
Rename test file
ayjayt Aug 26, 2025
6711e61
Fix bad mathjax conditional
ayjayt Aug 26, 2025
76ad595
Add more types to Kaleido
ayjayt Aug 26, 2025
cfdacc1
Add check for None value.
ayjayt Aug 26, 2025
9fd331c
Fix kaleido typing errors.
ayjayt Aug 26, 2025
e3d5a87
Iterate on kaleido.py tests claude
ayjayt Aug 26, 2025
c8afc88
Mark test skipped for after refactor.
ayjayt Aug 26, 2025
30eecca
Add further kaleido tests.
ayjayt Aug 26, 2025
8ca2ae7
Split context/noncontext tests into two
ayjayt Aug 27, 2025
84629f3
Close browser before cancelling kaleido tasks.
ayjayt Aug 27, 2025
74c8765
Reorganize so __init__ creates no tmp dir
ayjayt Aug 27, 2025
d2dd530
Fix test_kaleido tests.
ayjayt Aug 27, 2025
cc97c41
Remove forcefail
ayjayt Aug 27, 2025
fd1bb62
Type fig_tools.
ayjayt Aug 28, 2025
0adba8f
Shore up current file detecting for testing.
ayjayt Aug 28, 2025
a115723
Use tmp_path not __file__ for valid file.
ayjayt Aug 28, 2025
6f281f8
Supress unhelpful hypo health checks.
ayjayt Aug 28, 2025
be01fdb
Add faster assert to prove file existence
ayjayt Aug 28, 2025
0bca6f7
Add additional url parsing tool.
ayjayt Aug 28, 2025
a76fbad
Make special fixture for non existent file URI:
ayjayt Aug 28, 2025
719a7fd
Fix bad path definition
ayjayt Aug 28, 2025
02a1f80
Change function to str, so don't call
ayjayt Aug 28, 2025
cfb4eff
Be more explicit in path parsing.
ayjayt Aug 28, 2025
f9e7f64
Add missing function.
ayjayt Aug 28, 2025
69294ed
Add logging.
ayjayt Aug 28, 2025
5407965
Add yet more logging.
ayjayt Aug 28, 2025
33ead6d
Fix bad logic.
ayjayt Aug 28, 2025
449282b
Tone down unreasonable 20 processor test.
ayjayt Aug 28, 2025
62fcefe
Remove hypo deadlines for slow CI runners.
ayjayt Aug 28, 2025
501fb80
Organize a bit conftest.py
ayjayt Aug 28, 2025
8a15a12
Merge branch 'andrew/test_coverage' into andrew/test-utils
ayjayt Aug 28, 2025
01952f4
Organize fig_tools a bit.
ayjayt Aug 29, 2025
d69d1b2
Fix order
ayjayt Aug 29, 2025
f65f0ec
Readd figtools tests.
ayjayt Aug 29, 2025
336f479
Iterate on claude tests.
ayjayt Aug 29, 2025
c1a2f99
All tests pass
ayjayt Aug 29, 2025
b8f7185
Clear up mathjax logic.
ayjayt Aug 29, 2025
970f8b8
Test Path() as well as str() in filenotfound tests.
ayjayt Aug 29, 2025
7c70737
Fix to properly validate Path() types
ayjayt Aug 29, 2025
95e9b4b
Merge branch 'andrew/test_coverage' into andrew/test-utils
ayjayt Aug 29, 2025
9e9b9b3
Add tests for test_sync_server.
ayjayt Aug 29, 2025
88533f1
Fix CHANGELOG.txt
ayjayt Aug 29, 2025
6f21e74
Merge branch 'andrew/test-utils' into andrew/refactor-tab-api
ayjayt Sep 1, 2025
7dceec2
Do basic type fixing.
ayjayt Sep 1, 2025
71460e9
Add more types.
ayjayt Sep 1, 2025
17a0546
Connect types between __init__ and kaledio.py
ayjayt Sep 1, 2025
51262b0
Make readability changes to test_fig_tools.py
ayjayt Sep 2, 2025
3f97098
Add extraneous lines to force checks on string patches.
ayjayt Sep 2, 2025
42b8121
Add single comment.
ayjayt Sep 2, 2025
caa302e
Factor file searching out of page generator.
ayjayt Sep 2, 2025
839cedd
Add test to make sure page generator is passed a file
ayjayt Sep 2, 2025
8c66445
Change is_url to is_httpish
ayjayt Sep 2, 2025
302c306
Add tests for is_httpish/get_path
ayjayt Sep 2, 2025
f6da4da
Use _utils to simplify kaleido.
ayjayt Sep 2, 2025
6c4f8a6
Expand utils tests.
ayjayt Sep 2, 2025
9c8cc6b
Fix logic in file checker.
ayjayt Sep 2, 2025
409645a
Improve a bit the documentation.
ayjayt Sep 2, 2025
f6498c1
Improve docs and add notes:
ayjayt Sep 2, 2025
e490af7
Type and improve comments.
ayjayt Sep 2, 2025
bd49759
Add clarifying comments to _fig_tools.py
ayjayt Sep 2, 2025
0457d45
More clearly define the URL tuple type.
ayjayt Sep 2, 2025
f59af18
Clarify compatability version error.
ayjayt Sep 2, 2025
cf0e395
Remove noqa for TOOD
ayjayt Sep 2, 2025
316fe3b
Rename functions for clarity.
ayjayt Sep 2, 2025
84afca4
Refactor calc_fig in _kaleido_tab.
ayjayt Sep 2, 2025
cd6b471
Fix typing errors.
ayjayt Sep 2, 2025
beeb165
Organize _kaleido_tab exports.
ayjayt Sep 3, 2025
fed0f9f
Simplify type coercian in iterable
ayjayt Sep 9, 2025
a48fa81
Add comments.
ayjayt Sep 9, 2025
e949a9e
Change type name.
ayjayt Sep 9, 2025
4b47fb8
Refactor and split figtools
ayjayt Sep 9, 2025
4600c0a
Add type check to verification
ayjayt Sep 9, 2025
7926f04
Remove write/path from _KaleidoTab:
ayjayt Sep 9, 2025
60f6aed
Turn all renders into _from_object wrappers.
ayjayt Sep 9, 2025
f260f87
Fix conditional logic in helper library
ayjayt Sep 9, 2025
87a1402
Fix return.
ayjayt Sep 9, 2025
78f894f
Fix errors based on typing.
ayjayt Sep 9, 2025
a6203c1
Remove erroneous tuple return
ayjayt Sep 9, 2025
277c5dc
Fix tmp dir cleanup syntax
ayjayt Sep 9, 2025
ef0f5b7
Fix casting.
ayjayt Sep 9, 2025
b48eed4
Fix up is_figurish typechecks.
ayjayt Sep 9, 2025
46e55e9
Fix typing in kaleido.
ayjayt Sep 9, 2025
94ac0cd
Further remove path from calc_fig
ayjayt Sep 9, 2025
e47110f
Fix path coercian in utilities.
ayjayt Sep 9, 2025
7176caf
Factor tests to reflect package factor
ayjayt Sep 9, 2025
656bce0
Allow from_object to take single FigureDict
ayjayt Sep 9, 2025
0ec1905
Change skip to fail
ayjayt Sep 10, 2025
73f2d84
Add plotly as dependency.
ayjayt Sep 16, 2025
6488698
Use new pyproject toml format.
ayjayt Sep 16, 2025
cfaac6f
Revert to deprecatead license spec.
ayjayt Sep 16, 2025
b28b39d
Activate new choreographer custom encoder
ayjayt Sep 16, 2025
74048f4
Force use of new choreographer.
ayjayt Sep 16, 2025
0e315dd
Remove plotly dep and make import optional.
ayjayt Sep 17, 2025
a9da2ff
Fix missing () in fn call
ayjayt Sep 17, 2025
666bd99
Fix tests given new import.
ayjayt Sep 17, 2025
a975d3f
Remove now unnecesary dep check.
ayjayt Sep 17, 2025
9a01caa
Fix Changelog
ayjayt Sep 18, 2025
064e0e5
Update choreo.
ayjayt Sep 18, 2025
7972d69
Create script for pickling and caching pickles.
ayjayt Sep 18, 2025
1037810
Improve error info of ImportError.
ayjayt Sep 18, 2025
e0fd8fe
Merge branch 'andrew/fix-encoder' into andrew/refactor-tab-api-mergetest
ayjayt Sep 19, 2025
d07190d
Make unreasonable timeout test more reasonable.
ayjayt Sep 19, 2025
c4b573f
Type from_object to accept regular dicts.
ayjayt Sep 19, 2025
6a48569
Fix tests to properly test bare dictionary.
ayjayt Sep 19, 2025
3f6689d
Make variable name more clear for generators.
ayjayt Sep 19, 2025
02b51ef
Reorganize task to encapsulate all errors.
ayjayt Sep 19, 2025
fb34945
Test return values.
ayjayt Sep 19, 2025
58d2461
Influence async task order to remove race condition.
ayjayt Sep 19, 2025
20cfc58
Fix reference-before-assign
ayjayt Sep 19, 2025
60dba99
Add comments.
ayjayt Sep 19, 2025
1bb6b87
Move simple fig to session scope.
ayjayt Sep 19, 2025
2fae310
Fix up test write_fig->from_object passthrough
ayjayt Sep 20, 2025
d31ee8a
Fix mismatched scope async tests.
ayjayt Sep 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mark test skipped for after refactor.
  • Loading branch information
ayjayt committed Aug 26, 2025
commit c8afc8895f25d58de0638f31aa48fe4f50b59ad4
23 changes: 20 additions & 3 deletions src/py/tests/test_kaleido.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from unittest.mock import patch

import pytest
from hypothesis import given
from hypothesis import HealthCheck, Phase, given, settings
from hypothesis import strategies as st

from kaleido import Kaleido
Expand Down Expand Up @@ -151,6 +151,19 @@ async def test_write_fig_from_object_bare_dictionary(
)


# In the refactor, all figure generation methods are really just wrappers
# for the most flexible, tested above, generate_fig_from_object.
# So we test that one, and then test to make sure its receiving arguments
# properly for the other tests.


# Uncomment these settings after refactor.
# @settings(suppress_health_check=[HealthCheck.function_scoped_fixture])
@settings(
phases=[Phase.generate],
max_examples=1,
suppress_health_check=[HealthCheck.function_scoped_fixture],
)
@given(
path=st.text(
min_size=1,
Expand All @@ -172,7 +185,7 @@ async def test_write_fig_argument_passthrough( # noqa: PLR0913
topojson,
):
"""Test that write_fig properly passes arguments to write_fig_from_object."""

pytest.skip("Remove this failure line and the comment above after the refactor!")
test_path = tmp_path / f"{path}.{format_type}"
opts = {"format": format_type, "width": width, "height": height}

Expand Down Expand Up @@ -212,7 +225,11 @@ async def test_write_fig_argument_passthrough( # noqa: PLR0913
# Check that the values match
assert generated_args["fig"] == simple_figure_with_bytes["fig"], (
"Figure should match"
) # this should fail
)
assert str(generated_args["path"]) == str(test_path), "Path should match"
assert generated_args["opts"] == opts, "Options should match"
assert generated_args["topojson"] == topojson, "Topojson should match"


def test_forcefail():
pytest.fail("After refactor, remove this test and unskip test above.")