Skip to content

Commit 58261e4

Browse files
authored
Merge pull request with v1.3.0 changes
v1.3.0
2 parents d404b29 + e8d4326 commit 58261e4

32 files changed

Lines changed: 1103 additions & 773 deletions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!--
2+
Thank you for contributing to AgentDocstringsGenerator!
3+
4+
Please provide a clear and concise description of your changes.
5+
If your PR is a work in progress, please mark it as a draft.
6+
-->
7+
8+
## Type of Change
9+
10+
<!--
11+
Please check the box that best describes the nature of your change.
12+
-->
13+
14+
- [ ] 🐛 **Bug Fix**: A change that fixes an issue.
15+
- [ ]**New Feature**: A change that adds new functionality.
16+
- [ ] ♻️ **Refactor**: A code change that neither fixes a bug nor adds a feature.
17+
- [ ] 📚 **Documentation**: Changes to the documentation only.
18+
- [ ] ⚙️ **CI/CD**: Changes to our CI/CD configuration and scripts.
19+
- [ ] 🔨 **Build**: Changes that affect the build system or external dependencies.
20+
- [ ] 🎨 **Style**: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
21+
- [ ]**Revert**: Reverts a previous commit.
22+
23+
---
24+
25+
## Related Issue
26+
27+
<!--
28+
If this PR addresses a specific issue, please link it here.
29+
For example: `Fixes #123` or `Closes #123`.
30+
If there is no related issue, please state that.
31+
-->
32+
33+
- ***
34+
35+
## Description
36+
37+
<!--
38+
Provide a clear and concise summary of the changes.
39+
Explain the "what" and "why" of your contribution.
40+
-->
41+
42+
-
43+
44+
## Checklist
45+
46+
<!--
47+
Go over all the following points, and put an `x` in all the boxes that apply.
48+
-->
49+
50+
- [ ] My code follows the style guidelines of this project.
51+
- [ ] I have performed a self-review of my own code.
52+
- [ ] New unit tests have been added to cover the changes.
53+
- [ ] Manual testing has been performed

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request_target:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
name: Test on Python ${{ matrix.python-version }} (beta=${{ matrix.beta }})
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.10", "3.11", "3.12", "3.13"]
16+
beta: [false, true]
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event.pull_request.head.sha }}
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: "1.22"
27+
28+
- name: Build Go parsers
29+
run: pwsh -File ./build_goparser.ps1
30+
shell: bash
31+
32+
- name: Set up Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install .[dev]
41+
42+
- name: CLI smoke test
43+
run: |
44+
agent-docstrings --version
45+
if [ "${{ matrix.beta }}" = "true" ]; then
46+
agent-docstrings --beta --version
47+
fi
48+
49+
- name: Run tests with coverage
50+
run: |
51+
pytest --cov=agent_docstrings --cov-report=xml --cov-report=term-missing
52+
53+
- name: Upload coverage artifact
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: coverage-${{ matrix.python-version }}-${{ matrix.beta }}
57+
path: coverage.xml
58+
59+
report:
60+
name: Report Coverage
61+
runs-on: ubuntu-latest
62+
needs: test
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v4
66+
67+
- name: Download all coverage artifacts
68+
uses: actions/download-artifact@v4
69+
with:
70+
path: coverage-artifacts
71+
pattern: coverage-*
72+
merge-multiple: true
73+
74+
- name: Upload coverage to Codecov
75+
uses: codecov/codecov-action@v4
76+
with:
77+
token: ${{ secrets.CODECOV_TOKEN }}
78+
directory: ./coverage-artifacts/
79+
fail_ci_if_error: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ share/python-wheels/
2727
.installed.cfg
2828
*.egg
2929
MANIFEST
30+
/git_diff.txt
3031

3132
# PyInstaller
3233
# Usually these files are written by a small stub bootstrap script and should be

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Additional language support: Swift, Perl, Curl, Fortran, Visual Basic, R, PHP, Lua, Bash, SQL
1313
- Configuration file format validation
1414
- Switching to the Abstract Syntax Tree (AST)
15+
- [And more...](https://github.com/Artemonim/AgentDocstrings/issues)
16+
17+
## [1.3.0] - 2025-06-30
18+
19+
### Added
20+
21+
- **Process Individual Files**: The CLI now accepts both directory and individual file paths, allowing for more granular control over which files are processed.
22+
- **Expanded Keywords**: Added a comprehensive list of keywords to `pyproject.toml` to significantly improve package discoverability on PyPI and search engines.
23+
- **Beta Features Flag**: Introduced a `--beta` command-line flag to enable experimental features that are under development.
24+
25+
### Changed
26+
27+
- **Header Text Update**: Changed the auto-generated header to "Table of content is automatically generated by Agent Docstrings {version}".
28+
- **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.
29+
- **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.
30+
- **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.
31+
- **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.
32+
- **Repository URLs**: Updated project URLs in `pyproject.toml` to point to the correct `AgentDocstrings` repository name.
33+
34+
### Fixed
35+
36+
- **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.
37+
- **Deleting empty lines**: Detected and fixed the removal of empty lines at the end of processed files
38+
- **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).
39+
40+
### Documentation
41+
42+
- **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.
1543

1644
## [1.2.1] - 2025-06-30
1745

Doc/AgentDocstringsExample130.mp4

40.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)