-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace radio buttons with clickable buttons in Mesop UI (#302)
* wip * tests fixed * import checks added * Added error message * Added error message
- Loading branch information
1 parent
61202d8
commit a60a820
Showing
14 changed files
with
188 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: fastagency.base.Error |
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,11 @@ | ||
--- | ||
# 0.5 - API | ||
# 2 - Release | ||
# 3 - Contributing | ||
# 5 - Template Page | ||
# 10 - Default | ||
search: | ||
boost: 0.5 | ||
--- | ||
|
||
::: fastagency.helpers.check_imports |
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,3 +1,7 @@ | ||
from .client import OpenAPI | ||
from ...helpers import check_imports | ||
|
||
check_imports(["fastapi_code_generator", "fastapi", "requests"], "openapi") | ||
|
||
from .client import OpenAPI # noqa: E402 | ||
|
||
__all__ = ["OpenAPI"] |
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,15 @@ | ||
import importlib | ||
|
||
__all__ = ["check_imports"] | ||
|
||
|
||
def check_imports(package_names: list[str], target_name: str) -> None: | ||
not_importable = [ | ||
f"'{package_name}'" | ||
for package_name in package_names | ||
if importlib.util.find_spec(package_name) is None | ||
] | ||
if len(not_importable) > 0: | ||
raise ImportError( | ||
f"Package(s) {', '.join(not_importable)} not found. Please install it with:\n\npip install \"fastagency[{target_name}]\"\n" | ||
) |
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,3 +1,8 @@ | ||
from .base import AutoGenWorkflows, IOStreamAdapter | ||
from ...helpers import check_imports | ||
|
||
check_imports(["autogen"], "autogen") | ||
|
||
|
||
from .base import AutoGenWorkflows, IOStreamAdapter # noqa: E402 | ||
|
||
__all__ = ["IOStreamAdapter", "AutoGenWorkflows"] |
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,10 +1,13 @@ | ||
import sys | ||
|
||
from ...exceptions import FastAgencyCLIPythonVersionError | ||
from ...helpers import check_imports | ||
|
||
if sys.version_info < (3, 10): | ||
raise FastAgencyCLIPythonVersionError("Mesop requires Python 3.10 or higher") | ||
|
||
from .base import MesopUI | ||
check_imports(["mesop"], "mesop") | ||
|
||
from .base import MesopUI # noqa: E402 | ||
|
||
__all__ = ["MesopUI"] |
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
Oops, something went wrong.