-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor logging levels and Info class Moved LOGGING_LEVELS and Info class definitions from cli module to utils module for better code organization. Also removed an unused import from cli/env.py. * Add support for setting a default database configuration Implemented a method to set default configurations for database services if none is provided. Updated CLI to include a command for setting default configurations and adjusted related utilities to utilize the new default setting functionality. * Add config path option to handle custom config locations Introduced a `config_path` option to support specifying custom configuration file paths across CLI commands and internal utilities. This enhancement ensures all related functions, tests, and utilities properly account for the new parameter, enabling greater flexibility and ease of use. * Add utility functions for test configuration paths. Created `testUtils.py` to centralize common test utilities and updated relevant test files to use these utilities. This refactor improves code maintainability by reducing redundancy across test cases. Additionally, enhanced error handling messages in `DbUtils.py` for better clarity. * Add utility functions for test configuration paths. Created `testUtils.py` to centralize common test utilities and updated relevant test files to use these utilities. This refactor improves code maintainability by reducing redundancy across test cases. Additionally, enhanced error handling messages in `DbUtils.py` for better clarity. * Improve default database configuration handling Enhance handling of default database configurations by adding informative messages and updating the logic to fetch and set default values. Extend test coverage to include scenarios for setting and querying default database configurations. * Refactor database utilities and enhance CLI query execution Refactored `DbUtils` to include a new `execute_query` function for better modularity. Enhanced CLI operations in `db.py` with `yaspin` spinner and warning suppression. Updated tests and configs to reflect the changes for cleaner and more readable code. * Refactor database utilities and enhance CLI query execution Refactored `DbUtils` to include a new `execute_query` function for better modularity. Enhanced CLI operations in `db.py` with `yaspin` spinner and warning suppression. Updated tests and configs to reflect the changes for cleaner and more readable code. * Enhance test_configure with additional imports and config listing Add necessary imports and include a call to `list_config` in the `test_configure_db` function to improve coverage. This ensures comprehensive testing of configuration settings and utilities. * Refactor: Remove unnecessary blank line in test file Eliminated an unneeded blank line in `test_configure.py` to enhance code readability and maintain consistency with the project's style guidelines. This change does not affect * Update config references and improve command descriptions Revised documentation and code to standardize the config file path as `~/.hckrcfg`. Enhanced command descriptions and examples for clarity. * Improve documentation for default database configuration Clarify instructions on how database configurations are applied when the -c/--config flag is not provided. This helps users understand the implications of the default settings in command executions. * Refactor imports for readability in DbUtils and test_configure Reorganized imports in DbUtils.py to improve readability and maintain consistency. Removed an unused import in test_configure.py for cleaner code. * Refactor import statements in test_configure.py Consolidate imports for better readability and maintainability. This change ensures that related import statements are grouped together logically. * Capitalize first word of configure command description Improve readability of CLI help text by capitalizing the first word in the description of the 'configure' command. This aligns it with the format used for other command descriptions. * Capitalize first word of configure command description Improve readability of CLI help text by capitalizing the first word in the description of the 'configure' command. This aligns it with the format used for other command descriptions. * Update version to 0.5.0 Removed the "dev1" suffix from the version number to mark the transition from a development version to a stable release. This change ensures clarity in versioning for releases. * Add click module and improve error formatting Included the click module to manage command-line interface interactions. Enhanced the error message formatting to display errors in red for better readability. Updated the pyproject.toml to ensure consistent package management. * Fix grammar in test comment Corrected a minor grammatical error in a comment within the test_configure_set_default_db function. Changed "configure sqlite database" to "configure a sqlite database" to improve readability and clarity. * Remove redundant code in test_configure.py The call to list_config() was unnecessary and has been removed to clean up the test code. This streamlines the test and maintains its functionality, ensuring clarity and efficiency.
- Loading branch information
Showing
22 changed files
with
469 additions
and
257 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,3 +120,6 @@ _build/ | |
out/ | ||
*.sqlite | ||
!docs/source/commands/env | ||
|
||
# config | ||
.hckrcfg |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2024-present Ashish Patel <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
__version__ = "0.5.0.dev1" | ||
__version__ = "0.5.0" |
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
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.