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
53 changes: 53 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
Thank you for contributing to AgentDocstringsGenerator!

Please provide a clear and concise description of your changes.
If your PR is a work in progress, please mark it as a draft.
-->

## Type of Change

<!--
Please check the box that best describes the nature of your change.
-->

- [ ] πŸ› **Bug Fix**: A change that fixes an issue.
- [ ] ✨ **New Feature**: A change that adds new functionality.
- [ ] ♻️ **Refactor**: A code change that neither fixes a bug nor adds a feature.
- [ ] πŸ“š **Documentation**: Changes to the documentation only.
- [ ] βš™οΈ **CI/CD**: Changes to our CI/CD configuration and scripts.
- [ ] πŸ”¨ **Build**: Changes that affect the build system or external dependencies.
- [ ] 🎨 **Style**: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
- [ ] βͺ **Revert**: Reverts a previous commit.

---

## Related Issue

<!--
If this PR addresses a specific issue, please link it here.
For example: `Fixes #123` or `Closes #123`.
If there is no related issue, please state that.
-->

- ***

## Description

<!--
Provide a clear and concise summary of the changes.
Explain the "what" and "why" of your contribution.
-->

-

## Checklist

<!--
Go over all the following points, and put an `x` in all the boxes that apply.
-->

- [ ] My code follows the style guidelines of this project.
- [ ] I have performed a self-review of my own code.
- [ ] New unit tests have been added to cover the changes.
- [ ] Manual testing has been performed
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches: [master]
pull_request_target:
branches: [master]

jobs:
test:
name: Test on Python ${{ matrix.python-version }} (beta=${{ matrix.beta }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
beta: [false, true]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Build Go parsers
run: pwsh -File ./build_goparser.ps1
shell: bash

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]

- name: CLI smoke test
run: |
agent-docstrings --version
if [ "${{ matrix.beta }}" = "true" ]; then
agent-docstrings --beta --version
fi

- name: Run tests with coverage
run: |
pytest --cov=agent_docstrings --cov-report=xml --cov-report=term-missing

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}-${{ matrix.beta }}
path: coverage.xml

report:
name: Report Coverage
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download all coverage artifacts
uses: actions/download-artifact@v4
with:
path: coverage-artifacts
pattern: coverage-*
merge-multiple: true

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage-artifacts/
fail_ci_if_error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
/git_diff.txt

# PyInstaller
# Usually these files are written by a small stub bootstrap script and should be
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Additional language support: Swift, Perl, Curl, Fortran, Visual Basic, R, PHP, Lua, Bash, SQL
- Configuration file format validation
- Switching to the Abstract Syntax Tree (AST)
- [And more...](https://github.com/Artemonim/AgentDocstrings/issues)

## [1.3.0] - 2025-06-30

### Added

- **Process Individual Files**: The CLI now accepts both directory and individual file paths, allowing for more granular control over which files are processed.
- **Expanded Keywords**: Added a comprehensive list of keywords to `pyproject.toml` to significantly improve package discoverability on PyPI and search engines.
- **Beta Features Flag**: Introduced a `--beta` command-line flag to enable experimental features that are under development.

### Changed

- **Header Text Update**: Changed the auto-generated header to "Table of content is automatically generated by Agent Docstrings {version}".
- **Streamlined Header Format**: The format of the generated "Table of Contents" has been improved. Top-level functions and classes are now presented in a single, chronologically sorted list, removing the nested "Functions" section for a cleaner, more intuitive layout.
- **Deterministic Sorting**: All discovered items (classes, methods, functions) are now strictly sorted by their line number in the source file, ensuring a consistent and predictable output every time.
- **CLI Argument Renaming**: The `DIRECTORY` argument in the CLI has been renamed to `PATH` to accurately reflect its new capability to handle both files and directories.
- **Header Version Updates**: The tool will now update the header if the generator version has changed, even if the code structure remains the same, ensuring docstrings always reflect the version of the tool that generated them.
- **Repository URLs**: Updated project URLs in `pyproject.toml` to point to the correct `AgentDocstrings` repository name.

### Fixed

- **Error Handling for Inaccessible Directories**: Fixed a crash (`PermissionError`) that occurred when scanning directories with restricted read permissions. The application will now skip such directories and print a warning, preventing unintended modifications to files that might have been excluded by an unreadable `.gitignore` or other configuration files.
- **Deleting empty lines**: Detected and fixed the removal of empty lines at the end of processed files
- **Language-Specific Indentation**: Fixed the indentation in the generated 'Table of Contents' to respect common style conventions for each language (e.g., 4 spaces for Python, 2 for JavaScript).

### Documentation

- **Complete README Overhaul**: The `README.md` has been completely rewritten to be more comprehensive, professional, and user-friendly. It now includes a clear project mission, a detailed table of contents, expanded sections on features and usage, new examples, and platform compatibility information.

## [1.2.1] - 2025-06-30

Expand Down
Binary file added Doc/AgentDocstringsExample130.mp4
Binary file not shown.
Loading