Conversation
…ad_env_files function
… and updating fallback logic
PR Review 🔍
|
PR Code Suggestions ✨
|
There was a problem hiding this comment.
Pull Request Overview
This PR refactors configuration and authentication handling by moving dependency and credential management from a custom JSON file to standard .env files while introducing a Pipfile for improved dependency management.
- Introduces a Pipfile with updated dependencies.
- Refactors configuration commands to load and save settings via .env files with enhanced priority rules.
- Enhances authentication handling to first target .env file storage in git repositories, with fallback to a global config.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| penify_hook/config_command.py | Renamed and updated subcommand names and usage in config commands. |
| penify_hook/commands/config_commands.py | Refactored functions to use .env files for storing config and tokens. |
| penify_hook/commands/auth_commands.py | Updated save_credentials to prioritize .env file storage in git repos. |
| Pipfile | Added for dependency management with updated package version specs. |
Comments suppressed due to low confidence (1)
penify_hook/commands/config_commands.py:116
- The os module is used in get_env_var_or_default but is not imported in the function or at the module level. Consider adding an 'import os' statement to ensure proper functionality.
return os.environ.get(env_var, default)
|
|
||
| # Config subcommand: llm | ||
| llm_config_parser = parser.add_parser("llm", help="Configure LLM settings.") | ||
| llm_config_parser = parser.add_parser("llm-cmd", help="Configure LLM settings.") |
There was a problem hiding this comment.
[nitpick] The renaming of subcommands to 'llm-cmd' and 'jira-cmd' may confuse users expecting traditional names. Consider updating the documentation and help text to clearly communicate these changes.
| llm_config_parser = parser.add_parser("llm-cmd", help="Configure LLM settings.") | |
| llm_config_parser = parser.add_parser("llm-cmd", help="Configure LLM settings via command-line arguments. Use this for direct configuration.") |
Description
Pipfilefor better dependency management..envfile for saving API tokens..envfiles.coverage.xml.Changes walkthrough 📝
Pipfile
Introduced Pipfile for Dependency ManagementPipfile
Pipfile.requests,gitpython, andpython-dotenv.requirements.txt
Updated Requirements for Environment Supportrequirements.txt
python-dotenvto requirements for environment variable support.coverage.xml
Updated Coverage Metricscoverage.xml
auth_commands.py
Improved Credential Management Logicpenify_hook/commands/auth_commands.py
.envfile.config_commands.py
Enhanced Configuration Managementpenify_hook/commands/config_commands.py
.envfiles..env.config_command.py
Refined Configuration Command Structurepenify_hook/config_command.py