-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix exports, snapshot public api (#3836)
Fix some exports that made it into the public API. snapshot the test to warn when the api does change
- Loading branch information
Showing
22 changed files
with
197 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from marimo._ai.llm._impl import anthropic, google, groq, openai | ||
|
||
__all__ = ["openai", "anthropic", "google", "groq"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
# Copyright 2024 Marimo. All rights reserved. | ||
from __future__ import annotations | ||
|
||
__all__ = [ | ||
"MarimoIslandGenerator", | ||
"MarimoIslandStub", | ||
] | ||
|
||
from marimo._islands.island_generator import ( | ||
from marimo._islands._island_generator import ( | ||
MarimoIslandGenerator, | ||
MarimoIslandStub, | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
App | ||
Cell | ||
Html | ||
MarimoIslandGenerator | ||
MarimoStopError | ||
Thread | ||
accordion | ||
ai | ||
ChatAttachment | ||
ChatMessage | ||
ChatModelConfig | ||
llm | ||
anthropic | ||
groq | ||
openai | ||
app_meta | ||
as_html | ||
audio | ||
cache | ||
callout | ||
capture_stderr | ||
capture_stdout | ||
carousel | ||
center | ||
cli_args | ||
create_asgi_app | ||
defs | ||
doc | ||
download | ||
hstack | ||
icon | ||
iframe | ||
image | ||
islands | ||
MarimoIslandGenerator | ||
MarimoIslandStub | ||
latex | ||
lazy | ||
left | ||
lru_cache | ||
md | ||
mermaid | ||
mpl | ||
interactive | ||
nav_menu | ||
notebook_dir | ||
notebook_location | ||
output | ||
append | ||
clear | ||
replace | ||
replace_at_index | ||
persistent_cache | ||
plain | ||
plain_text | ||
query_params | ||
redirect_stderr | ||
redirect_stdout | ||
refs | ||
right | ||
routes | ||
running_in_notebook | ||
show_code | ||
sidebar | ||
sql | ||
stat | ||
state | ||
status | ||
progress_bar | ||
spinner | ||
toast | ||
stop | ||
style | ||
tabs | ||
tree | ||
ui | ||
altair_chart | ||
anywidget | ||
array | ||
batch | ||
button | ||
chat | ||
checkbox | ||
code_editor | ||
data_explorer | ||
dataframe | ||
date | ||
date_range | ||
datetime | ||
dictionary | ||
dropdown | ||
experimental_data_editor | ||
file | ||
file_browser | ||
form | ||
microphone | ||
multiselect | ||
number | ||
panel | ||
plotly | ||
radio | ||
range_slider | ||
refresh | ||
run_button | ||
slider | ||
switch | ||
table | ||
tabs | ||
text | ||
text_area | ||
video | ||
vstack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
from __future__ import annotations | ||
|
||
import inspect | ||
from typing import Any, Optional, Set | ||
|
||
from tests.mocks import snapshotter | ||
|
||
snapshot = snapshotter(__file__) | ||
|
||
|
||
def _explore_module( | ||
module: Any, indent: int = 0, visited: Optional[Set[int]] = None | ||
) -> list[str]: | ||
""" | ||
Recursively explore a module and print all public exported items. | ||
Args: | ||
module: The module or object to explore | ||
indent: Current indentation level (for pretty printing) | ||
visited: Set[int] = set() | ||
""" | ||
if visited is None: | ||
visited = set() | ||
|
||
# Skip if we've already visited this object | ||
if id(module) in visited: | ||
return [] | ||
|
||
visited.add(id(module)) | ||
|
||
results: list[str] = [] | ||
# Get all attributes of the module | ||
for name, obj in inspect.getmembers(module): | ||
# Skip private/special attributes (starting with _) | ||
if name.startswith("_"): | ||
continue | ||
|
||
# Create indentation string | ||
indent_str = " " * indent | ||
|
||
# Print the current item | ||
results.append(f"{indent_str}{name}") | ||
|
||
# Recursively explore if it's a module, class, or other container type | ||
if inspect.ismodule(obj) and obj.__name__.startswith(module.__name__): | ||
# Only recurse into submodules of the original module | ||
results.extend(_explore_module(obj, indent + 1, visited)) | ||
|
||
return results | ||
|
||
|
||
def test_api(): | ||
import marimo as mo | ||
|
||
results = _explore_module(mo) | ||
assert len(results) > 0 | ||
snapshot("api.txt", "\n".join(results)) |