pretty-release-notes 1.4.0__tar.gz → 1.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. pretty_release_notes-1.4.2/.cursorignore +1 -0
  2. pretty_release_notes-1.4.2/.github/workflows/lint.yml +20 -0
  3. pretty_release_notes-1.4.2/.github/workflows/publish.yml +23 -0
  4. pretty_release_notes-1.4.2/.github/workflows/release.yml +30 -0
  5. pretty_release_notes-1.4.2/.github/workflows/tests.yml +26 -0
  6. pretty_release_notes-1.4.2/.gitignore +18 -0
  7. pretty_release_notes-1.4.2/.pre-commit-config.yaml +40 -0
  8. pretty_release_notes-1.4.2/.releaserc +8 -0
  9. pretty_release_notes-1.4.2/CHANGELOG.md +167 -0
  10. pretty_release_notes-1.4.2/CLAUDE.md +760 -0
  11. pretty_release_notes-1.4.2/CONTRIBUTING.md +111 -0
  12. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/PKG-INFO +32 -29
  13. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/README.md +27 -24
  14. pretty_release_notes-1.4.2/config.toml.example +76 -0
  15. pretty_release_notes-1.4.2/docs/adr/001-multi-mode-architecture.md +115 -0
  16. pretty_release_notes-1.4.2/docs/adr/002-user-directory-database-storage.md +107 -0
  17. pretty_release_notes-1.4.2/docs/adr/003-toml-configuration.md +126 -0
  18. pretty_release_notes-1.4.2/examples/library_usage.py +146 -0
  19. pretty_release_notes-1.4.2/img/modified.png +0 -0
  20. pretty_release_notes-1.4.2/img/original.png +0 -0
  21. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/__init__.py +3 -1
  22. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/generator.py +8 -3
  23. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/main.py +6 -1
  24. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes.egg-info/PKG-INFO +32 -29
  25. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes.egg-info/SOURCES.txt +24 -0
  26. pretty_release_notes-1.4.2/pretty_release_notes.egg-info/scm_file_list.json +73 -0
  27. pretty_release_notes-1.4.2/pretty_release_notes.egg-info/scm_version.json +8 -0
  28. pretty_release_notes-1.4.2/prompt.txt +34 -0
  29. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pyproject.toml +6 -7
  30. pretty_release_notes-1.4.2/tests/__init__.py +0 -0
  31. pretty_release_notes-1.4.2/tests/pull_request.py +68 -0
  32. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_main.py +43 -0
  33. pretty_release_notes-1.4.2/uv.lock +3935 -0
  34. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/LICENSE +0 -0
  35. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/__main__.py +0 -0
  36. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/adapters/__init__.py +0 -0
  37. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/adapters/cli_progress.py +0 -0
  38. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/api.py +0 -0
  39. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/core/__init__.py +0 -0
  40. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/core/config.py +0 -0
  41. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/core/config_loader.py +0 -0
  42. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/core/execution.py +0 -0
  43. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/core/interfaces.py +0 -0
  44. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/database.py +0 -0
  45. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/github_client.py +0 -0
  46. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/__init__.py +0 -0
  47. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/_utils.py +0 -0
  48. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/change.py +0 -0
  49. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/commit.py +0 -0
  50. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/issue.py +0 -0
  51. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/pull_request.py +0 -0
  52. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/release_notes.py +0 -0
  53. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/release_notes_line.py +0 -0
  54. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/models/repository.py +0 -0
  55. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/openai_client.py +0 -0
  56. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/prompt.txt +0 -0
  57. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/py.typed +0 -0
  58. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/setup_command.py +0 -0
  59. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/ui.py +0 -0
  60. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/web/__init__.py +0 -0
  61. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/web/app.py +0 -0
  62. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes/web/server.py +0 -0
  63. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes.egg-info/dependency_links.txt +0 -0
  64. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes.egg-info/entry_points.txt +0 -0
  65. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes.egg-info/requires.txt +0 -0
  66. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/pretty_release_notes.egg-info/top_level.txt +0 -0
  67. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/setup.cfg +0 -0
  68. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_api.py +0 -0
  69. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_core.py +0 -0
  70. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_database.py +0 -0
  71. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_database_threading.py +0 -0
  72. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_execution.py +0 -0
  73. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_generator.py +0 -0
  74. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_models_utils.py +0 -0
  75. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_openai_client.py +0 -0
  76. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_pull_request.py +0 -0
  77. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_release_notes.py +0 -0
  78. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_setup_command.py +0 -0
  79. {pretty_release_notes-1.4.0 → pretty_release_notes-1.4.2}/tests/test_web_api.py +0 -0
@@ -0,0 +1 @@
1
+ .env
@@ -0,0 +1,20 @@
1
+ name: Lint
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ pre-commit:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.11"
18
+
19
+ - name: Run pre-commit
20
+ uses: pre-commit/action@v3.0.1
@@ -0,0 +1,23 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ pypi:
9
+ name: Publish to PyPI
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write # trusted publishing, no API token needed
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ ref: ${{ github.event.release.tag_name }}
17
+ fetch-depth: 0 # setuptools-scm reads the version from the tag
18
+
19
+ - uses: astral-sh/setup-uv@v5
20
+
21
+ - run: uv build
22
+
23
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,30 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ concurrency:
8
+ group: release
9
+ cancel-in-progress: false
10
+
11
+ jobs:
12
+ release:
13
+ name: Create GitHub release
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ fetch-depth: 0
19
+ persist-credentials: false
20
+
21
+ - uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "lts/*"
24
+
25
+ # RELEASE_TOKEN is a PAT, not GITHUB_TOKEN: releases created with the
26
+ # default token do not trigger the publish workflow.
27
+ - name: Run semantic-release
28
+ env:
29
+ GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
30
+ run: npx --yes semantic-release
@@ -0,0 +1,26 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.11", "3.12"]
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Python ${{ matrix.python-version }}
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+
22
+ - name: Install dependencies
23
+ run: pip install -e .[dev,web]
24
+
25
+ - name: Run tests
26
+ run: pytest --cov=pretty_release_notes --cov-report=term-missing
@@ -0,0 +1,18 @@
1
+ .env
2
+ env/
3
+ stored_lines.csv
4
+ stored_lines.sqlite
5
+ *.egg-info/
6
+ __pycache__/
7
+ *.pyc
8
+ .vscode/
9
+ .cursor/
10
+ .claude/
11
+ .pytest_cache/
12
+ .ruff_cache/
13
+ .mypy_cache/
14
+ .coverage
15
+ htmlcov/
16
+ build/
17
+ .omc/
18
+ dist/
@@ -0,0 +1,40 @@
1
+ default_stages: [pre-commit]
2
+ default_install_hook_types: [pre-commit]
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v5.0.0
7
+ hooks:
8
+ - id: trailing-whitespace
9
+ - id: check-merge-conflict
10
+ - id: check-ast
11
+ - id: check-json
12
+ - id: check-toml
13
+ - id: check-yaml
14
+ - id: debug-statements
15
+
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.8.4
18
+ hooks:
19
+ - id: ruff
20
+ name: "Run ruff import sorter"
21
+ args: ["--select=I", "--fix"]
22
+
23
+ - id: ruff
24
+ name: "Run ruff linter"
25
+
26
+ - id: ruff-format
27
+ name: "Run ruff formatter"
28
+
29
+ - repo: https://github.com/pre-commit/mirrors-mypy
30
+ rev: v1.14.1
31
+ hooks:
32
+ - id: mypy
33
+ additional_dependencies: ['types-requests']
34
+
35
+ - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
36
+ rev: v9.22.0
37
+ hooks:
38
+ - id: commitlint
39
+ stages: [commit-msg]
40
+ additional_dependencies: ['conventional-changelog-conventionalcommits']
@@ -0,0 +1,8 @@
1
+ {
2
+ "branches": ["main"],
3
+ "plugins": [
4
+ "@semantic-release/commit-analyzer",
5
+ "@semantic-release/release-notes-generator",
6
+ "@semantic-release/github"
7
+ ]
8
+ }
@@ -0,0 +1,167 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [v1.4.1 - 2026-08-23]
9
+
10
+ ### Fixed
11
+
12
+ - **PyPI page rendering**: README images and repository links used relative paths, which broke outside GitHub. They now use absolute URLs.
13
+ - **Project links**: The `[project.urls]` metadata pointed at a repository that does not exist publicly.
14
+ - **Packaging**: `dynamic = ["version"]` had no matching `[tool.setuptools.dynamic]` table, so the package could not be built.
15
+
16
+ ## [v1.3.0 - 2026-04-17]
17
+
18
+ ### Added
19
+
20
+ - **Automated polling**: New `pretty-release-notes poll` command that checks GitHub for new releases and generates notes automatically. Supports `--seed` to initialize state and `--install-cron` to set up a cron job.
21
+ - **`--yes` / `-y` flag**: Skip the confirmation prompt and update release notes on GitHub directly.
22
+
23
+ ### Changed
24
+
25
+ - **Grouping enabled by default**: `group_by_type` now defaults to `true` across CLI, library, config loaders, and interactive setup.
26
+
27
+ ## [1.2.0 - 2026-03-10]
28
+
29
+ ### Added
30
+
31
+ - **Multi-provider LLM support**: AI generation now runs through `any-llm`, allowing provider-qualified model values such as `openai:o3` and `anthropic:claude-sonnet-4-5`.
32
+ - **Unified LLM configuration**: Added canonical `[llm]` config support, `llm_key` and `llm_model` request fields for the web API, and a new `ReleaseNotesBuilder.with_llm()` method for library usage.
33
+
34
+ ### Changed
35
+
36
+ - **Default model handling**: Default model selection is now centralized across config loaders, interactive setup, examples, and runtime behavior, and provider-qualified `provider:model` values are now the preferred format.
37
+ - **Backward compatibility**: Legacy OpenAI-style names such as `[openai]`, `openai_key`, `openai_model`, and `with_openai()` are still accepted and continue to map to the new LLM configuration flow.
38
+ - **Default model value**: New configurations now default to `openai:o3` after the LLM integration refactor.
39
+
40
+ ## [1.1.0 - 2026-02-14]
41
+
42
+ ### Added
43
+
44
+ - Breaking changes are now detected and grouped in their own section.
45
+
46
+ ### Fixed
47
+
48
+ - The New Contributors section is now preserved when grouping by type.
49
+
50
+ ## [1.0.0]
51
+
52
+ ### Added
53
+ - **TOML Configuration**: New TOML-based configuration format stored in `~/.pretty-release-notes/config.toml`. Provides structured, human-readable configuration with sections for GitHub, OpenAI, database, and filters.
54
+ - **Interactive Setup Command**: New `pretty-release-notes setup` command with interactive prompts for creating and updating configuration files. Shows existing values as defaults and validates all inputs.
55
+ - **Configuration Migration**: Setup command can migrate from legacy `.env` files using the `--migrate-env` flag.
56
+
57
+ ### Changed
58
+ - **Database Storage Location**: Database files are now stored in `~/.pretty-release-notes/` by default instead of the project directory. This provides better separation between user data and application code, follows platform conventions, and avoids permission issues.
59
+ - **Configuration Format**: TOML is now the default configuration format. The `.env` format is still supported via `EnvConfigLoader` but is considered legacy.
60
+
61
+ ### Fixed
62
+ - **Empty String Defaults**: Setup command now correctly handles empty strings in existing config files, falling back to proper defaults instead of keeping empty values.
63
+
64
+ ### Migration Guide
65
+
66
+ #### Migrating to TOML Configuration
67
+
68
+ If you're currently using a `.env` file for configuration, you have two options:
69
+
70
+ **Option 1: Automated Migration (Recommended)**
71
+ ```bash
72
+ # Run the interactive setup with migration flag
73
+ pretty-release-notes setup --migrate-env
74
+ ```
75
+
76
+ This will:
77
+ - Read your existing `.env` file
78
+ - Show all values as defaults in interactive prompts
79
+ - Create the new TOML config at `~/.pretty-release-notes/config.toml`
80
+ - Optionally delete the old `.env` file
81
+
82
+ **Option 2: Manual Migration**
83
+ 1. Copy the example config:
84
+ ```bash
85
+ mkdir -p ~/.pretty-release-notes
86
+ cp config.toml.example ~/.pretty-release-notes/config.toml
87
+ ```
88
+
89
+ 2. Edit the file with your credentials:
90
+ ```bash
91
+ nano ~/.pretty-release-notes/config.toml
92
+ ```
93
+
94
+ 3. Map your `.env` variables to TOML sections:
95
+ ```toml
96
+ # .env: GH_TOKEN → TOML:
97
+ [github]
98
+ token = "your_token_here"
99
+
100
+ # .env: OPENAI_API_KEY → TOML:
101
+ [openai]
102
+ api_key = "your_key_here"
103
+ ```
104
+
105
+ **No migration needed if:**
106
+ - Your application uses the Library API with programmatic configuration
107
+ - You're passing configuration via `DictConfigLoader`
108
+ - You want to continue using `.env` (still supported via `EnvConfigLoader`)
109
+
110
+ #### Moving Existing Database Files
111
+
112
+ If you have existing database files in your project directory and want to preserve your cached release note summaries, follow these steps:
113
+
114
+ **For SQLite databases (default):**
115
+ ```bash
116
+ # Create the new directory if it doesn't exist
117
+ mkdir -p ~/.pretty-release-notes
118
+
119
+ # Move your existing database file
120
+ mv /path/to/your/project/stored_lines.sqlite ~/.pretty-release-notes/
121
+
122
+ # Or if your database has a custom name
123
+ mv /path/to/your/project/your_db_name.sqlite ~/.pretty-release-notes/
124
+ ```
125
+
126
+ **For CSV databases:**
127
+ ```bash
128
+ # Create the new directory if it doesn't exist
129
+ mkdir -p ~/.pretty-release-notes
130
+
131
+ # Move your existing CSV file
132
+ mv /path/to/your/project/stored_lines.csv ~/.pretty-release-notes/
133
+ ```
134
+
135
+ **Alternatively, continue using your old location:**
136
+
137
+ If you prefer to keep your database in its current location, you can specify an absolute path in your configuration:
138
+
139
+ ```toml
140
+ # In config.toml
141
+ [database]
142
+ name = "/absolute/path/to/your/database/stored_lines"
143
+ ```
144
+
145
+ Or in `.env` (legacy):
146
+ ```bash
147
+ DB_NAME=/absolute/path/to/your/database/stored_lines
148
+ ```
149
+
150
+ The tool will automatically detect absolute paths and use them as-is.
151
+
152
+ #### Why This Change?
153
+
154
+ 1. **Cleaner separation**: User data is separated from application code
155
+ 2. **Platform conventions**: Follows standard practice for user data storage
156
+ 3. **No permission issues**: User home directory is always writable
157
+ 4. **Multi-user support**: Each user can maintain their own cache
158
+ 5. **Version control safe**: No risk of accidentally committing database files
159
+
160
+ #### Configuration Reference
161
+
162
+ The `DB_NAME` configuration variable now behaves as follows:
163
+
164
+ - **Relative path** (default): `DB_NAME=stored_lines` → `~/.pretty-release-notes/stored_lines.sqlite`
165
+ - **Absolute path**: `DB_NAME=/var/cache/prn/db` → `/var/cache/prn/db.sqlite`
166
+
167
+ No changes are required to existing configuration files. The default behavior has simply changed to use the user directory.