-
Notifications
You must be signed in to change notification settings - Fork 1
[HOTFIX, RELEASE] fix console object searching error, add console size adjustment feature #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 @@ | ||
| __version__ = "1.1.3" | ||
|
|
||
| import os | ||
|
|
||
| from rich.console import Console | ||
|
|
||
| if "PYTEST_CURRENT_TEST" in os.environ: | ||
| console = Console(no_color=True) | ||
| else: | ||
| console = Console() | ||
| __version__ = "1.1.5" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,4 +1,3 @@ | ||
| # TODO : add a feature to automatically fix appropriate fastkit output console size | ||
| # -------------------------------------------------------------------------- | ||
| # The Module defines main and core CLI operations for FastAPI-fastkit. | ||
| # | ||
|
|
@@ -31,6 +30,7 @@ | |
| from fastapi_fastkit.core.exceptions import CLIExceptions | ||
| from fastapi_fastkit.core.settings import FastkitConfig | ||
| from fastapi_fastkit.utils.logging import get_logger, setup_logging | ||
| from fastapi_fastkit.utils.main import console as utils_console | ||
| from fastapi_fastkit.utils.main import ( | ||
| create_info_table, | ||
| is_fastkit_project, | ||
|
|
@@ -41,7 +41,9 @@ | |
| validate_email, | ||
| ) | ||
|
|
||
| from . import __version__, console | ||
| console = utils_console | ||
|
|
||
| from . import __version__ | ||
|
|
||
|
|
||
| @click.group() | ||
|
|
@@ -97,6 +99,7 @@ def echo(ctx: Context) -> None: | |
| Deploy FastAPI app foundation instantly at your local! | ||
|
|
||
| --- | ||
|
|
||
| - Project Maintainer : [link=mailto:[email protected]]bnbong(JunHyeok Lee)[/link] | ||
| - Current Version : {__version__} | ||
| - Github : [link]https://github.com/bnbong/FastAPI-fastkit[/link] | ||
|
|
@@ -135,8 +138,7 @@ def list_templates(ctx: Context) -> None: | |
| print_warning("No available templates.") | ||
| return | ||
|
|
||
| table = create_info_table("Available Templates") | ||
|
|
||
| template_data = {} | ||
| for template in templates: | ||
| template_path = os.path.join(template_dir, template) | ||
| readme_path = os.path.join(template_path, "README.md-tpl") | ||
|
|
@@ -148,8 +150,9 @@ def list_templates(ctx: Context) -> None: | |
| if first_line.startswith("# "): | ||
| description = first_line[2:] | ||
|
|
||
| table.add_row(template, description) | ||
| template_data[template] = description | ||
|
|
||
| table = create_info_table("Available Templates", template_data) | ||
| console.print(table) | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
Tuple[int, int]from typing module instead oftuple[int, int]for better compatibility with older Python versions. The lowercase tuple annotation requires Python 3.9+.