From b247a41d59e1c04b31712a26d7f23f4e620df8fd Mon Sep 17 00:00:00 2001 From: Poiuy7312 Date: Tue, 19 Sep 2023 11:34:55 -0400 Subject: [PATCH] Added special character back --- chasten/main.py | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/chasten/main.py b/chasten/main.py index 702f1b14..1909dbee 100644 --- a/chasten/main.py +++ b/chasten/main.py @@ -1,4 +1,4 @@ -"""Chasten checks the AST of a Python program.""" +"""💫 Chasten checks the AST of a Python program.""" import sys from pathlib import Path @@ -115,7 +115,7 @@ def validate_file( # perform the validation of the configuration file (validated, errors) = validate.validate_configuration(yml_data_dict, json_schema) output.console.print( - f"Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" + f":sparkles: Validated {configuration_file_str}? {util.get_human_readable_boolean(validated)}" ) # there was a validation error, so display the error report if not validated: @@ -123,7 +123,9 @@ def validate_file( # validation worked correctly, so display the configuration file else: output.opt_print_log(verbose, newline="") - output.opt_print_log(verbose, label=f"Contents of {configuration_file_str}:\n") + output.opt_print_log( + verbose, label=f":sparkles: Contents of {configuration_file_str}:\n" + ) output.opt_print_log(verbose, config_file=configuration_file_yml) return validated @@ -159,7 +161,7 @@ def validate_configuration_files( application_author=constants.chasten.Application_Author, ) output.console.print( - "Configuration directory:" + ":sparkles: Configuration directory:" + constants.markers.Space + chasten_user_config_dir_str + constants.markers.Newline @@ -281,7 +283,7 @@ def display_serve_or_publish_details( @cli.command() def interact(ctx: typer.Context) -> None: - """Interactively configure and run.""" + """🚀 Interactively configure and run.""" # construct a Trogon object; this will create a # terminal-user interface that will allow the # person using chasten to pick a mode and then @@ -320,7 +322,7 @@ def configure( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Manage chasten's configuration.""" + """🪂 Manage chasten's configuration.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -363,7 +365,7 @@ def configure( # noqa: PLR0913 ) # display diagnostic information about the completed process output.console.print( - f"Created configuration directory and file(s) in {created_directory_path}" + f":sparkles: Created configuration directory and file(s) in {created_directory_path}" ) # cannot re-create the configuration directory, so display # a message and suggest the use of --force the next time; @@ -438,7 +440,7 @@ def analyze( # noqa: PLR0913, PLR0915 verbose: bool = typer.Option(False, help="Enable verbose mode output."), save: bool = typer.Option(False, help="Enable saving of output file(s)."), ) -> None: - """Analyze the AST of Python source code.""" + """💫 Analyze the AST of Python source code.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -516,7 +518,7 @@ def analyze( # noqa: PLR0913, PLR0915 valid_directories = [input_path] # output the list of directories subject to checking output.console.print() - output.console.print(f"Analyzing Python source code in: {input_path}") + output.console.print(f":sparkles: Analyzing Python source code in: {input_path}") # output the number of checks that will be performed output.console.print() output.console.print(f":tada: Performing {len(check_list)} check(s):") @@ -662,7 +664,7 @@ def analyze( # noqa: PLR0913, PLR0915 ) # output the name of the saved file if saving successfully took place if saved_file_name: - output.console.print(f"\nSaved the file '{saved_file_name}'") + output.console.print(f"\n:sparkles: Saved the file '{saved_file_name}'") # confirm whether or not all of the checks passed # and then display the appropriate diagnostic message all_checks_passed = all(check_status_list) @@ -708,7 +710,7 @@ def integrate( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Integrate files and make a database.""" + """🚧 Integrate files and make a database.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -721,7 +723,7 @@ def integrate( # noqa: PLR0913 ) # output the list of directories subject to checking output.console.print() - output.console.print("Combining data file(s) in:") + output.console.print(":sparkles: Combining data file(s) in:") output.console.print() output.print_list_contents(json_path) # extract all of the JSON dictionaries from the specified files @@ -734,7 +736,7 @@ def integrate( # noqa: PLR0913 ) # output the name of the saved file if saving successfully took place if combined_json_file_name: - output.console.print(f"\nSaved the file '{combined_json_file_name}'") + output.console.print(f"\n:sparkles: Saved the file '{combined_json_file_name}'") # "flatten" (i.e., "un-nest") the now-saved combined JSON file using flatterer # create the SQLite3 database and then configure the database for use in datasett combined_flattened_directory = filesystem.write_flattened_csv_and_database( @@ -745,7 +747,7 @@ def integrate( # noqa: PLR0913 # output the name of the saved file if saving successfully took place if combined_flattened_directory: output.console.print( - f"\nCreated this directory structure in {Path(combined_flattened_directory).parent}:" + f"\n:sparkles: Created this directory structure in {Path(combined_flattened_directory).parent}:" ) combined_directory_tree = filesystem.create_directory_tree_visualization( Path(combined_flattened_directory) @@ -797,7 +799,7 @@ def datasette_serve( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Start a local datasette server.""" + """🏃 Start a local datasette server.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -808,7 +810,7 @@ def datasette_serve( # noqa: PLR0913 metadata=metadata, ) # display diagnostic information about the datasette instance - label = "Starting a local datasette instance:" + label = ":sparkles: Starting a local datasette instance:" display_serve_or_publish_details( label, database_path, metadata, port, publish=False ) @@ -866,7 +868,7 @@ def datasette_publish( # noqa: PLR0913 ), verbose: bool = typer.Option(False, help="Display verbose debugging output"), ) -> None: - """Publish a datasette to Fly or Vercel.""" + """🌎 Publish a datasette to Fly or Vercel.""" # output the preamble, including extra parameters specific to this function output_preamble( verbose, @@ -880,7 +882,7 @@ def datasette_publish( # noqa: PLR0913 f":wave: Make sure that you have previously logged into the '{datasette_platform.value}' platform" ) # display details about the publishing step - label = f"Publishing a datasette to {datasette_platform.value}:" + label = f":sparkles: Publishing a datasette to {datasette_platform.value}:" display_serve_or_publish_details(label, database_path, metadata, publish=True) # publish the datasette instance using fly.io; # this passes control to datasette and then to @@ -895,7 +897,7 @@ def datasette_publish( # noqa: PLR0913 @cli.command() def log() -> None: - """Start the logging server.""" + """🦚 Start the logging server.""" # display the header output.print_header() # display details about the server @@ -911,4 +913,4 @@ def log() -> None: # --- # End region: Command-line interface functions }}} -# --- +# --- \ No newline at end of file