Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ jobs:

check-version:
# * Only on PRs into dev: prevent accidental version bumps.
if: github.event_name == 'pull_request' && github.base_ref == 'dev'
# This check is skipped for the automated post-release merge from master back to dev.
if: github.event_name == 'pull_request' && github.base_ref == 'dev' && github.head_ref != 'master'
name: Check for accidental version bump
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- **subtitle**: describtion

## [1.3.5]

### Added

- **Placeholder-Based Line Numbering**: Implemented a new placeholder system (`OFFSET_PLACEHOLDER`) for calculating line numbers in generated headers. This ensures deterministic line numbering by first generating headers with placeholders, then calculating the actual offset based on the final header size, and finally replacing placeholders with accurate line numbers.

### Fixed

- **Deterministic Line Numbering**: Completely reworked the line number calculation algorithm to ensure consistent and accurate line numbers across multiple runs. The new approach uses a two-pass system that measures rather than guesses header sizes, ensuring deterministic results.
- **Docstring Merging Logic**: Improved the logic for merging manual docstrings with auto-generated content. Manual content is now properly preserved and formatted without adding unnecessary newlines or reformatting.
- **Multi-Pass Docstring Removal**: Enhanced the `remove_agent_docstring` function to handle complex scenarios where multiple agent-generated docstrings might be present, preventing duplication issues on repeated runs.
- **Whitespace Normalization**: Added proper whitespace handling in content comparison to prevent unnecessary file modifications when only minor whitespace differences exist.
- **Manual Content Extraction**: Improved the extraction of manual docstring content by properly handling the inner content within triple quotes, preserving original formatting and indentation.

### Testing

- **New Test Cases**: Added comprehensive test cases for placeholder usage, short manual docstring handling, and merged multiline docstring preservation to ensure the new algorithms work correctly across various scenarios.

## [1.3.4]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The release process is partially automated.
2. Update the version using `bump-my-version`:
```bash
# For a patch, minor, or major release
bump-my-version patch/minor/major
bump-my-version bump patch/minor/major
```
This command will update the version in `pyproject.toml` and update the `CHANGELOG.md`, replacing `[NextRelease]` with the new version tag.
3. Commit the version bump: `git commit -am "chore: release v.x.y.z"`
Expand Down
2 changes: 1 addition & 1 deletion agent_docstrings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
Attributes:
__version__ (str): Current version of the *agent-docstrings* package.
"""
__version__ = "1.3.4"
__version__ = "1.3.5"
Loading
Loading