Skip to content
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

Prettify "build" command cli output #3407

Merged
merged 7 commits into from
Jun 10, 2024
Merged

Prettify "build" command cli output #3407

merged 7 commits into from
Jun 10, 2024

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Jun 1, 2024

Should now look like below:

build-cli-ezgif com-video-to-gif-converter

image

image

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ndonkoHenri - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

sdk/python/packages/flet/src/flet/cli/commands/build.py Outdated Show resolved Hide resolved
@@ -843,7 +857,7 @@ def run(self, args, cwd, capture_output=True):
windll.kernel32.SetConsoleOutputCP(65001)

if self.verbose > 0:
print(f"\nRun subprocess: {args}")
console.print(f"\nRun subprocess: {args}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Subprocess output should be logged

Consider logging the subprocess output instead of printing it to the console. This will help in debugging and keeping a record of the operations performed.

Suggested change
console.print(f"\nRun subprocess: {args}")
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
if self.verbose > 0:
logger.info(f"Run subprocess: {args}")

sdk/python/packages/flet/src/flet/cli/commands/build.py Outdated Show resolved Hide resolved
sdk/python/packages/flet/src/flet/cli/commands/build.py Outdated Show resolved Hide resolved
sdk/python/packages/flet/src/flet/cli/commands/build.py Outdated Show resolved Hide resolved
sdk/python/packages/flet/src/flet/cli/commands/build.py Outdated Show resolved Hide resolved
@ndonkoHenri ndonkoHenri requested a review from FeodorFitsner June 1, 2024 15:34
@FeodorFitsner
Copy link
Contributor

Please fix conflicts.

# Conflicts:
#	sdk/python/packages/flet/src/flet/cli/commands/build.py
@FeodorFitsner FeodorFitsner merged commit 65e3ecd into main Jun 10, 2024
2 checks passed
@FeodorFitsner FeodorFitsner deleted the build-cli branch June 10, 2024 20:47
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* prettify "build" command cli output

* build-platform-matrix table

* consider sourcery-ai's suggestions

* new option: --show-platform-matrix | black reformat

* Set --show-platform-matrix default value to False

* refactor template_data dict
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.

2 participants