|
9 | 9 | .md-nav--secondary .md-nav__list .md-nav__list { display: none; } |
10 | 10 | </style> |
11 | 11 |
|
| 12 | +!!! info "v1.10.0" |
| 13 | + |
| 14 | + ## **v1.10.0 - Enhance Section Validation and Update Dependencies** |
| 15 | + |
| 16 | + <!-- md:tag v1.10.0 --><br> |
| 17 | + <!-- md:date 2026-01-04 --><br> |
| 18 | + <!-- md:link [data-science-extensions/docstring-format-checker/releases/v1.10.0](https://github.com/data-science-extensions/docstring-format-checker/releases/tag/v1.10.0) --> |
| 19 | + |
| 20 | + ??? note "Release Notes" |
| 21 | + |
| 22 | + ### 📝 Summary |
| 23 | + |
| 24 | + This release focuses on improving the robustness of docstring section validation, particularly regarding case sensitivity and error reporting. Standardise section header detection to handle various capitalisation styles while preserving original casing in error messages. Modernise the project's dependency management by introducing Dependabot and upgrading several pre-commit hooks. Refactor utility scripts for better clarity and update package metadata to align with standard practices. Ensure a more consistent and user-friendly experience through these enhancements. |
| 25 | + |
| 26 | + |
| 27 | + ### 📊 Release Statistics |
| 28 | + |
| 29 | + | Attribute | Note | |
| 30 | + | ------------------------- | --------------------------------------------- | |
| 31 | + | **Version:** | [`v1.10.0`] | |
| 32 | + | **Python Support:** | `3.9`, `3.10`, `3.11`, `3.12`, `3.13`, `3.14` | |
| 33 | + | **Test Coverage:** | 100% (1035 statements, +2 from v1.9.0) | |
| 34 | + | **Pylint Score:** | 10.00/10 | |
| 35 | + | **Complexity:** | All functions ≤13 threshold | |
| 36 | + | **Functions:** | 106 (unchanged from v1.9.0) | |
| 37 | + | **Tests Passing:** | 250/250 (unchanged from v1.9.0) | |
| 38 | + | **Files Changed:** | 8 | |
| 39 | + | **Lines Added:** | 76 | |
| 40 | + | **Lines Removed:** | 53 | |
| 41 | + | **Commits:** | 10 | |
| 42 | + | **Pull Requests Merged:** | 1 (PR #29) | |
| 43 | + |
| 44 | + |
| 45 | + ### 🎯 Enhance Docstring Section Validation |
| 46 | + |
| 47 | + |
| 48 | + #### 🔍 Overview |
| 49 | + |
| 50 | + Improve the reliability of section detection and validation within docstrings. Ensure that the tool correctly identifies configured sections regardless of their case in the docstring, while providing clearer error messages. |
| 51 | + |
| 52 | + |
| 53 | + #### 🛠️ Key Improvements |
| 54 | + |
| 55 | + |
| 56 | + ##### Case-Insensitive Matching |
| 57 | + |
| 58 | + Refactor several internal methods to handle section names more robustly. Lowercase section names for configuration lookups but preserve the original case when reporting errors to the user. |
| 59 | + |
| 60 | + - Update `._validate_single_admonition()` to use a lowercased version of the section title for configuration checks. |
| 61 | + - Refactor `._validate_admonition_has_no_colon()` to ensure consistent case-insensitive lookup. |
| 62 | + - Improve `._check_non_admonition_colon_usage()` to correctly identify non-admonition sections regardless of case. |
| 63 | + - Standardise section header detection in `._detect_any_section_header()` and `._detect_section_header()`. |
| 64 | + |
| 65 | + |
| 66 | + ##### Clearer Error Reporting |
| 67 | + |
| 68 | + Update `._validate_all_required_sections()` to wrap missing section names in single quotes. This makes the error messages more readable and consistent with other validation errors. |
| 69 | + |
| 70 | + Example of new output: |
| 71 | + `Missing required section: 'summary'` |
| 72 | + |
| 73 | + |
| 74 | + ### ⚙️ Update Dependencies and CI/CD Workflows |
| 75 | + |
| 76 | + |
| 77 | + #### 🔍 Overview |
| 78 | + |
| 79 | + Modernise the development environment and automate dependency maintenance to ensure the project remains secure and up-to-date. |
| 80 | + |
| 81 | + |
| 82 | + #### 🛠️ Key Improvements |
| 83 | + |
| 84 | + |
| 85 | + ##### Automate Dependency Updates |
| 86 | + |
| 87 | + Introduce a new `.github/dependabot.yml` configuration to enable weekly automated updates for GitHub Actions. Include custom labels and designated reviewers to streamline the maintenance process. |
| 88 | + |
| 89 | + |
| 90 | + ##### Upgrade Pre-commit Hooks |
| 91 | + |
| 92 | + Bump the versions of several key pre-commit hooks to leverage the latest improvements and bug fixes: |
| 93 | + |
| 94 | + | Hook | Old Version | New Version | |
| 95 | + | --------------- | ----------- | ----------- | |
| 96 | + | `black` | `25.1.0` | `25.12.0` | |
| 97 | + | `blacken-docs` | `1.19.1` | `1.20.0` | |
| 98 | + | `isort` | `6.0.1` | `7.0.0` | |
| 99 | + | `pyupgrade` | `v3.20.0` | `v3.21.2` | |
| 100 | + | `pycln` | `v2.5.0` | `v2.6.0` | |
| 101 | + | `uv-pre-commit` | `0.8.8` | `0.9.21` | |
| 102 | + |
| 103 | + |
| 104 | + ##### Refine CI/CD Workflow |
| 105 | + |
| 106 | + Update the `.github/workflows/cd.yml` workflow to use `${{ env.VERSION }}` consistently for version references. Expose `GITHUB_TOKEN` and `REPOSITORY_NAME` to the changelog generation step to ensure it has the necessary context. |
| 107 | + |
| 108 | + |
| 109 | + ### 🧹 Refactor Utility Scripts and Metadata |
| 110 | + |
| 111 | + |
| 112 | + #### 🔍 Overview |
| 113 | + |
| 114 | + Clean up internal utility scripts and ensure package metadata is correctly defined. |
| 115 | + |
| 116 | + |
| 117 | + #### 🛠️ Key Improvements |
| 118 | + |
| 119 | + |
| 120 | + ##### Improve Script Clarity |
| 121 | + |
| 122 | + Add a comprehensive file header to `src/utils/scripts.py` that outlines its purpose, usage, and provides examples. Improve the discoverability and usability of the internal tooling. |
| 123 | + |
| 124 | + |
| 125 | + ##### Simplify Git Operations |
| 126 | + |
| 127 | + Refactor `git_fix_tag_reference()` to remove redundant comments and simplify the implementation. Fix a minor formatting issue in `git_refresh_current_branch()` by removing an extra space in the `git pull` command. |
| 128 | + |
| 129 | + |
| 130 | + ##### Update Package Metadata |
| 131 | + |
| 132 | + Refactor `src/docstring_format_checker/__init__.py` to use the correct `Author-email` metadata key. Ensure that the author's email is correctly exposed in the package metadata as `__author_email__`. |
| 133 | + |
| 134 | + |
| 135 | + ### 🧪 Improve Test Consistency |
| 136 | + |
| 137 | + |
| 138 | + #### 🔍 Overview |
| 139 | + |
| 140 | + Update the test suite to align with the improved error message formatting. |
| 141 | + |
| 142 | + |
| 143 | + #### 🛠️ Key Improvements |
| 144 | + |
| 145 | + |
| 146 | + ##### Update Assertions |
| 147 | + |
| 148 | + Refactor tests in `src/tests/test_cli.py` and `src/tests/test_core.py` to expect the new quoted format for missing section errors. Ensure that the test suite remains in sync with the core validation logic. |
| 149 | + |
| 150 | + |
| 151 | + ### What's Changed |
| 152 | + * Enhance Section Validation and Update Dependencies by @chrimaho in https://github.com/data-science-extensions/docstring-format-checker/pull/28 |
| 153 | + |
| 154 | + |
| 155 | + **Full Changelog**: https://github.com/data-science-extensions/docstring-format-checker/compare/v1.9.0...v1.10.0 |
| 156 | + |
| 157 | + [`v1.9.0`]: https://github.com/data-science-extensions/docstring-format-checker/releases/tag/v1.9.0 |
| 158 | + [`v1.10.0`]: https://github.com/data-science-extensions/docstring-format-checker/releases/tag/v1.10.0 |
| 159 | + |
| 160 | + |
| 161 | + ??? abstract "Updates" |
| 162 | + |
| 163 | + * [`b01eb27`](https://github.com/data-science-extensions/docstring-format-checker/commit/b01eb27004ecaedb795f637c8eae93921e7a4cab): Update test assertions for quoted section names<br> |
| 164 | + Standardise error message assertions for missing sections.<br> |
| 165 | + - Update the `TestCLI()` class and `TestDocstringChecker()` class to expect single quotes around section names in error strings.<br> |
| 166 | + - Match output from the `clean()` function against the revised string format for required sections like `'summary'` and `'Parameters'`. |
| 167 | + (by [chrimaho](https://github.com/chrimaho)) |
| 168 | + * [`8b285fb`](https://github.com/data-science-extensions/docstring-format-checker/commit/8b285fb0c702af25358b6a8f8d14096b2bc1a057): Standardise case-insensitivity in section lookups<br> |
| 169 | + - Use lowercase section titles for consistent matching against configuration settings<br> |
| 170 | + - Update the `DocstringChecker()` class to handle section headers regardless of their original capitalisation |
| 171 | + (by [chrimaho](https://github.com/chrimaho)) |
| 172 | + * [`58b072b`](https://github.com/data-science-extensions/docstring-format-checker/commit/58b072b63463d01f7a729370bfd93e292fc50e6d): Add Dependabot configuration for GitHub Actions<br> |
| 173 | + - Initialise weekly version updates for GitHub Actions<br> |
| 174 | + - Maintain workflow dependencies via automated tracking<br> |
| 175 | + - Streamline the review process with labels and reviewers |
| 176 | + (by [chrimaho](https://github.com/chrimaho)) |
| 177 | + * [`a322b25`](https://github.com/data-science-extensions/docstring-format-checker/commit/a322b2572b346770b57a954264538c1d0885ef60): Refactor case-insensitive section lookups<br> |
| 178 | + - Preserve original casing of section names and titles by removing immediate `.lower()` method calls.<br> |
| 179 | + - Relocate case-conversion logic to the comparison stage within `any()` function and generator expressions.<br> |
| 180 | + - Standardise matching behaviour across the `DocstringChecker()` class to ensure consistent case-insensitivity. |
| 181 | + (by [chrimaho](https://github.com/chrimaho)) |
| 182 | + * [`fff1b93`](https://github.com/data-science-extensions/docstring-format-checker/commit/fff1b93dcf2f389a9312f72c436fd4debb131986): Add quotes to missing section error message<br> |
| 183 | + - Wrap the section name in single quotes within the error message generated by the `._check_required_sections()` method.<br> |
| 184 | + - Standardise the visual formatting of missing section error reports for better clarity. |
| 185 | + (by [chrimaho](https://github.com/chrimaho)) |
| 186 | + * [`a565ffe`](https://github.com/data-science-extensions/docstring-format-checker/commit/a565ffed6c8844aceda97da4f6b1389e86050d9d): Update script utilities and documentation<br> |
| 187 | + - Add a header to the utility script to describe usage and purpose.<br> |
| 188 | + - Remove the commented-out `check_mypy()` function.<br> |
| 189 | + - Simplify the `git_fix_tag_reference()` function by removing redundant comments and documentation.<br> |
| 190 | + - Standardise whitespace in the `git_refresh_current_branch()` function. |
| 191 | + (by [chrimaho](https://github.com/chrimaho)) |
| 192 | + * [`671a10d`](https://github.com/data-science-extensions/docstring-format-checker/commit/671a10d57f98b33cabd8c8cf07873dd43857d3d8): Update package metadata retrieval<br> |
| 193 | + - Standardise the metadata variable name for the author's email<br> |
| 194 | + - Update the key used in the `metadata()` function to retrieve `Author-email`<br> |
| 195 | + - Remove the fallback default value previously used with the `.get()` method<br> |
| 196 | + - Add a header comment to delineate the package metadata section |
| 197 | + (by [chrimaho](https://github.com/chrimaho)) |
| 198 | + * [`0122020`](https://github.com/data-science-extensions/docstring-format-checker/commit/01220208e2bf6c461aee85929cb8da047428985e): Standardise variable access in CD workflow<br> |
| 199 | + - Use `${{ env.VERSION }}` instead of `${VERSION}` to ensure the GitHub Actions runner correctly interpolates variables across all steps.<br> |
| 200 | + - Provide `GITHUB_TOKEN` and `REPOSITORY_NAME` to the `Generate Changelog` step to facilitate automated updates.<br> |
| 201 | + - Pass the version correctly to the `git_update_version_cli()`, `build_versioned_docs_cli()`, and `git_fix_tag_reference_cli()` functions within the workflow. |
| 202 | + (by [chrimaho](https://github.com/chrimaho)) |
| 203 | + |
| 204 | + |
12 | 205 | !!! info "v1.9.0" |
13 | 206 |
|
14 | 207 | ## **v1.9.0 - Improve Parameter Mismatch Reporting and Test Robustness** |
|
0 commit comments