Add project baseconfig - #147
Conversation
There was a problem hiding this comment.
commmit_message_history 的功能和正常的 commit_template 你觉得是互斥的吗?
个人感觉从效果上两种模式的互斥的,会相互干扰。
There was a problem hiding this comment.
需要讨论一下,得出一个结论,因为如果是互斥着,意味着这部分的逻辑和对应的单测需要更新一下 @Luffy2004-c
|
…obtaining configuration, and optimize the command help information.
…avoid accidental modifications.
…tion priority and create guidelines for project-level configuration.
…-c/gcop into add-project-baseconfig
…n logic to use the new configuration.
|
|
||
| def check_model_config(self) -> bool: | ||
| if ( | ||
| self.model_name == "provider/name,eg openai/gpt-4o" |
There was a problem hiding this comment.
如果你 default config 是一个 py 变量的话,而不是 json 文件,这里就可以直接用 if self.model_name == DEFAULT_CONF.model_name
- Rename `default_config` to `DEFAULT_CONFIG` for consistency - Remove JSON file handling and replace with direct dictionary definition - Enhance documentation and structure of `GcopConfig` and `ModelConfig` - Improve configuration loading and merging logic These changes aim to make the configuration management system more maintainable and easier to understand, without changing its core functionality.
- Delete default_config.json file - Remove unused configuration settings This change is part of a cleanup effort to remove outdated or unused configuration files, simplifying the project structure and reducing potential confusion.
…-c/gcop into add-project-baseconfig
TestGru AssignmentSummary
Files
Tip You can |
|
@Luffy2004-c can use https://github.com/Undertone0809/conftier to refactor it. |
- Implement ModelConfig class for AI model configuration - Add GcopConfig class for overall application configuration - Include validation method for model configuration These classes provide a structured way to manage application configuration with proper type hints and default values. The ModelConfig includes validation to ensure example values are not used in production.
| - Version control information (latest tag, branch count, untracked files) | ||
| - Advanced details (submodules, latest merge commit, file type statistics) | ||
|
|
||
| ### `gcop init-project` |
There was a problem hiding this comment.
Seems I have not found the detail use cases of project and user cases. You can create a new case of custom git commit message template when a team need to use.
It seems that I haven't found the detailed use cases of the [The advantages of project config] use cases yet.
When the team needs to use it, you can create a new custom git commit message template. --> This case can be displayed in docs.
| typer.echo("No project config found") | ||
|
|
||
|
|
||
| @app.command(name="set-config") |
There was a problem hiding this comment.
Need to assert schema for every key.
- Implement is_key_in_config function to check nested keys - Validate keys in set_config command before processing - Improve error handling for invalid config keys This change prevents setting invalid configuration keys by validating them against the config schema first. It handles both dataclass attributes and dictionary keys for nested config structures.
…-c/gcop into add-project-baseconfig
- Added `install-docs` target to Makefile for easier documentation setup. - Renamed `run-docs` to `start-docs` for clarity. - Expanded documentation on project-based configuration, including a real-world example for standardizing commit messages. - Improved configuration display in the `show_config` function to include merged effective configuration and better error handling for missing configs. - Updated test descriptions for clarity and consistency.
2412432 to
21d6173
Compare
691a9d7 to
6d5dc9b
Compare
Undertone0809
left a comment
There was a problem hiding this comment.
Current situation: If project config is not written with model config, I will give me a default config
Ideally: project config If model config is not written, project model config should be empty, or there is no model field
Description
Add project baseconfig
Related Issue
#126
Type of Change
Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.make codestyle.