()
| 264 | return entries |
| 265 | |
| 266 | def cli_entrypoint(): |
| 267 | import argparse |
| 268 | parser = argparse.ArgumentParser() |
| 269 | parser.add_argument('-a', '--all', action='store_true', |
| 270 | help='Print changelogs for all versions to docs/changelogs') |
| 271 | parser.add_argument('-c', '--check', action='store_true', |
| 272 | help='Check that all entries are printed') |
| 273 | args = parser.parse_args() |
| 274 | |
| 275 | entries = generate_changelog(all=args.all) |
| 276 | |
| 277 | if args.check: |
| 278 | with open(os.path.join(DOCS_ROOT, 'changelogs/news.rst')) as f: |
| 279 | content_stable = f.read() |
| 280 | with open(os.path.join(DOCS_ROOT, 'changelogs/news-dev.rst')) as f: |
| 281 | content_dev = f.read() |
| 282 | for entry in entries: |
| 283 | for description in entry.children: |
| 284 | if not entry.dev_only and description not in content_stable: |
| 285 | print('stable missing: ' + description) |
| 286 | if description not in content_dev: |
| 287 | print('dev missing: ' + description) |
| 288 | |
| 289 | |
| 290 | def sphinx_entrypoint(app, config): |
no test coverage detected