patched-codes / patchwork

Automate code reviews, patching and documentation with LLM workflows.
https://patched.codes
GNU Affero General Public License v3.0
164 stars 10 forks source link

Fix docstring prompt and logging #348

Closed CTY-git closed 1 week ago

patched-admin commented 1 week ago
The code change in `user_config.py` involved replacing the `logging` module with `patchwork.logger.logger` for logging, specifically changing log messages for failure to persist or read user configurations from `logging.error` to `logger.debug`. Additionally, the prompt in the JSON file for a system role was revised to emphasize generating a docstring based on a code snippet rather than altering code, while keeping the instruction on providing responses in a specific format unchanged. Lastly, the version of the tool "patchwork-cli" in the pyproject.toml file was updated from 0.0.27 to 0.0.28. ------
* File changed: [patchwork/common/utils/user_config.py](https://github.com/patched-codes/patchwork/pull/348/files#diff-568fa22e3a3dbdce79fc68eeb0ebdf5114e69503c22db3c1733551c871e5726e) [The `logging` module has been removed and replaced with `patchwork.logger.logger` for logging in the `user_config.py` file. Log messages for failure to persist or read user configurations have been changed from `logging.error` to `logger.debug`.](https://github.com/patched-codes/patchwork/pull/348/files#diff-568fa22e3a3dbdce79fc68eeb0ebdf5114e69503c22db3c1733551c871e5726e)
* File changed: [patchwork/patchflows/GenerateDocstring/prompt.json](https://github.com/patched-codes/patchwork/pull/348/files#diff-8b9898b7cedd598cb399fb88e4e88c35e09caeaf9b6b5ee8678ea1ffd2dc2015) [The prompt in the JSON file for a system role was updated to clarify that the user should generate a docstring based on a code snippet, rather than changing the code itself. The instruction about providing a response only in a specific format was retained in the updated prompt.](https://github.com/patched-codes/patchwork/pull/348/files#diff-8b9898b7cedd598cb399fb88e4e88c35e09caeaf9b6b5ee8678ea1ffd2dc2015)
* File changed: [pyproject.toml](https://github.com/patched-codes/patchwork/pull/348/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711) [The version of the tool "patchwork-cli" in the pyproject.toml file has been updated from 0.0.27 to 0.0.28.](https://github.com/patched-codes/patchwork/pull/348/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711)