Conversation
Neocky
left a comment
There was a problem hiding this comment.
All in all it is really good and just some minor features/cleanup and one bug fix. :)
There was a problem hiding this comment.
Thanks for the explanation but you can remove this file as there is already a README.md in this project.
You can add however your explanation in the actual README.md for example in Chapter 3 😃
| clear_console() | ||
| print_logo() | ||
| check_for_pluGET_update() | ||
| # check_for_pluGET_update() |
There was a problem hiding this comment.
Why did you remove the updatecheck for pluGET?
There was a problem hiding this comment.
Please use indention with 4 spaces instead of tab :)
| and exit the programm | ||
| """ | ||
| if not os.path.isfile("pluGET_config.yaml"): | ||
| if not os.path.isfile("config.yaml"): |
There was a problem hiding this comment.
We need to change this also in the README.md guide
| if config.connection not in accepted_values[0]: | ||
| console.print(f"Error in Config! Accepted values for key 'Connection' are {accepted_values[0]}", | ||
| style="bright_red") | ||
| exit_afterwards = False |
There was a problem hiding this comment.
Remove this line and instead of if else just sys.exit() to not make the code this abomination of indented lines :D
| """ | ||
| input_command = None | ||
| print("\n'STRG + C' to exit") | ||
| # print("\n'STRG + C' to exit") |
There was a problem hiding this comment.
Is this self explanatory or why did you remove it?
| server_list = {} | ||
| active_server = None No newline at end of file |
There was a problem hiding this comment.
Can you add code comments which explain it a little bit more?
| # from src.handlers.handle_config import config_value | ||
| from src.utils.console_output import rich_print_error | ||
| from src.handlers.handle_sftp import sftp_create_connection, sftp_upload_server_jar | ||
| from src.handlers.handle_ftp import ftp_create_connection, ftp_upload_server_jar | ||
| # from src.handlers.handle_sftp import sftp_create_connection, sftp_upload_server_jar | ||
| # from src.handlers.handle_ftp import ftp_create_connection, ftp_upload_server_jar |
There was a problem hiding this comment.
Remove the commented lines as they are not needed anymore
There was a problem hiding this comment.
Can you rename this file to test_all_configured_servers or something like that?
| def check_requirements() -> None: | ||
| """ | ||
| Check if the plugin folders are available | ||
| """ | ||
| config_values = config_value() | ||
| match config_values.connection: | ||
| case "local": | ||
| check_local_plugin_folder(config_values) | ||
| case "sftp": | ||
| sftp_create_connection() | ||
| case "ftp": | ||
| ftp_create_connection() | ||
| return None | ||
| # def check_requirements() -> None: | ||
| # """ | ||
| # Check if the plugin folders are available | ||
| # """ | ||
| # match config_values.connection: | ||
| # case "local": | ||
| # check_local_plugin_folder(config_values) | ||
| # case "sftp": | ||
| # sftp_create_connection() | ||
| # case "ftp": | ||
| # ftp_create_connection() | ||
| # return None |
Hey @Sowgro,thank you so much for your PR. :) |
|
I am glad you got a chance to look at this. I will look through your comments later this week. This was the first time I ever wrote code in python, so my apologies for any weird formatting. |
This adds support for multiple servers with a switch server command
As well as a new config file config.yaml, similar to what was proposed in #58