sunstone-py 0.5.0__py3-none-any.whl → 0.5.2__py3-none-any.whl
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.
- sunstone/_release.py +26 -32
- {sunstone_py-0.5.0.dist-info → sunstone_py-0.5.2.dist-info}/METADATA +3 -5
- {sunstone_py-0.5.0.dist-info → sunstone_py-0.5.2.dist-info}/RECORD +7 -7
- {sunstone_py-0.5.0.dist-info → sunstone_py-0.5.2.dist-info}/WHEEL +0 -0
- {sunstone_py-0.5.0.dist-info → sunstone_py-0.5.2.dist-info}/entry_points.txt +0 -0
- {sunstone_py-0.5.0.dist-info → sunstone_py-0.5.2.dist-info}/licenses/LICENSE +0 -0
- {sunstone_py-0.5.0.dist-info → sunstone_py-0.5.2.dist-info}/top_level.txt +0 -0
sunstone/_release.py
CHANGED
|
@@ -13,6 +13,17 @@ import sys
|
|
|
13
13
|
from datetime import date
|
|
14
14
|
from pathlib import Path
|
|
15
15
|
|
|
16
|
+
try:
|
|
17
|
+
import tomllib
|
|
18
|
+
except ModuleNotFoundError:
|
|
19
|
+
import tomli as tomllib # type: ignore[import-not-found,no-redef]
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
import tomli_w
|
|
23
|
+
except ModuleNotFoundError:
|
|
24
|
+
print("Error: tomli_w not found. Install with: uv add --dev tomli-w", file=sys.stderr)
|
|
25
|
+
sys.exit(1)
|
|
26
|
+
|
|
16
27
|
|
|
17
28
|
def get_root_dir() -> Path:
|
|
18
29
|
"""Get the root directory (where pyproject.toml lives)."""
|
|
@@ -164,29 +175,12 @@ def get_last_tag() -> str | None:
|
|
|
164
175
|
def generate_changelog_from_git() -> str:
|
|
165
176
|
"""Generate changelog entries from git commits since last tag using Claude."""
|
|
166
177
|
last_tag = get_last_tag()
|
|
167
|
-
if last_tag:
|
|
168
|
-
|
|
169
|
-
else:
|
|
170
|
-
commit_range = "HEAD"
|
|
171
|
-
|
|
172
|
-
# Get commits since last tag
|
|
173
|
-
result = run_git("log", commit_range, "--pretty=format:%s")
|
|
174
|
-
if result.returncode != 0 or not result.stdout.strip():
|
|
175
|
-
return ""
|
|
176
|
-
|
|
177
|
-
commits = result.stdout.strip()
|
|
178
|
-
|
|
179
|
-
prompt = f"""Convert these git commit messages into Keep a Changelog format entries.
|
|
180
|
-
Categorize under: Added, Changed, Fixed, Removed, Security (only include categories that apply).
|
|
181
|
-
Be concise. Skip merge commits, version bump commits, and release commits.
|
|
182
|
-
Output ONLY the markdown entries with ### headers for categories, nothing else.
|
|
183
|
-
|
|
184
|
-
Commits:
|
|
185
|
-
{commits}"""
|
|
178
|
+
if last_tag is None:
|
|
179
|
+
last_tag = "HEAD~1"
|
|
186
180
|
|
|
187
181
|
print("Generating changelog entries with Claude...")
|
|
188
182
|
claude_result = subprocess.run(
|
|
189
|
-
["claude", "-p", "
|
|
183
|
+
["claude", "-p", f"/generate-changelog {last_tag}"],
|
|
190
184
|
capture_output=True,
|
|
191
185
|
text=True,
|
|
192
186
|
cwd=get_root_dir(),
|
|
@@ -233,12 +227,13 @@ def confirm_release(new_version: str) -> bool:
|
|
|
233
227
|
def get_current_version() -> str:
|
|
234
228
|
"""Get the current version from pyproject.toml."""
|
|
235
229
|
pyproject_path = get_root_dir() / "pyproject.toml"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
230
|
+
with open(pyproject_path, "rb") as f:
|
|
231
|
+
data = tomllib.load(f)
|
|
232
|
+
version = data.get("project", {}).get("version")
|
|
233
|
+
if not version:
|
|
239
234
|
print("Error: Could not find version in pyproject.toml", file=sys.stderr)
|
|
240
235
|
sys.exit(1)
|
|
241
|
-
return
|
|
236
|
+
return str(version)
|
|
242
237
|
|
|
243
238
|
|
|
244
239
|
def bump_version(version: str, bump: str) -> str:
|
|
@@ -261,14 +256,13 @@ def bump_version(version: str, bump: str) -> str:
|
|
|
261
256
|
def update_pyproject_version(new_version: str) -> None:
|
|
262
257
|
"""Update the version in pyproject.toml."""
|
|
263
258
|
pyproject_path = get_root_dir() / "pyproject.toml"
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
pyproject_path.write_text(new_content)
|
|
259
|
+
with open(pyproject_path, "rb") as f:
|
|
260
|
+
data = tomllib.load(f)
|
|
261
|
+
|
|
262
|
+
data["project"]["version"] = new_version
|
|
263
|
+
|
|
264
|
+
with open(pyproject_path, "wb") as f:
|
|
265
|
+
tomli_w.dump(data, f)
|
|
272
266
|
|
|
273
267
|
|
|
274
268
|
def update_changelog(new_version: str) -> None:
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sunstone-py
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: Python library for managing datasets with lineage tracking in Sunstone projects
|
|
5
5
|
Author-email: Sunstone Institute <stig@sunstone.institute>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/sunstoneinstitute/sunstone-py
|
|
8
8
|
Project-URL: Documentation, https://sunstoneinstitute.github.io/sunstone-py/
|
|
9
9
|
Project-URL: Repository, https://github.com/sunstoneinstitute/sunstone-py
|
|
10
|
-
Classifier: Development Status ::
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Science/Research
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
-
Requires-Python: >=3.
|
|
17
|
+
Requires-Python: >=3.12
|
|
20
18
|
Description-Content-Type: text/markdown
|
|
21
19
|
License-File: LICENSE
|
|
22
20
|
Requires-Dist: frictionless>=5.18.1
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sunstone/__init__.py,sha256=LC0ZtmxP26eXPLKejbg7UStcHOnE_lwttNTL4m3F4yM,2032
|
|
2
|
-
sunstone/_release.py,sha256=
|
|
2
|
+
sunstone/_release.py,sha256=MQNaUD7mSK6h8vu6EIgJuaMlAxuFxv82NQwHgBpLZm4,14907
|
|
3
3
|
sunstone/dataframe.py,sha256=UJgQx7auiNb6hSIvhB8EQs2afu-7S22xdWL5DZUr29g,23602
|
|
4
4
|
sunstone/datasets.py,sha256=LdHk3Vkfc7QH2VxhSskRCm9wUFSkldCmgS_1c2KDAPA,21142
|
|
5
5
|
sunstone/exceptions.py,sha256=fiixXazur3LtQGy21bGEaSr356DObFcYxQJ3FvOxNec,623
|
|
@@ -7,9 +7,9 @@ sunstone/lineage.py,sha256=B9GKMu5-v8Izos5G40K_EvsCPJL3Z2Tg1T_Fc7ezSMI,5240
|
|
|
7
7
|
sunstone/pandas.py,sha256=CLEqIIgTbMmpH73TPy_vDUPxQa37Hpmqn4r6No8PJwo,8188
|
|
8
8
|
sunstone/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
sunstone/validation.py,sha256=1356vcUc72a1zGBUe9Xjrcb5h41Xo53PaK2nnQ_FuSM,8286
|
|
10
|
-
sunstone_py-0.5.
|
|
11
|
-
sunstone_py-0.5.
|
|
12
|
-
sunstone_py-0.5.
|
|
13
|
-
sunstone_py-0.5.
|
|
14
|
-
sunstone_py-0.5.
|
|
15
|
-
sunstone_py-0.5.
|
|
10
|
+
sunstone_py-0.5.2.dist-info/licenses/LICENSE,sha256=pB6VuR4QRjwjMjy8RSNGho-N1SUdu07ntIhT5lrhkzU,1078
|
|
11
|
+
sunstone_py-0.5.2.dist-info/METADATA,sha256=uR8iPIENJBiPVFhtr5EXT3V6VAmLiju0CfFjm6oQubI,9460
|
|
12
|
+
sunstone_py-0.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
sunstone_py-0.5.2.dist-info/entry_points.txt,sha256=0h6E88rH9a_503BAzXvFPR-UfmkrRFjcOf29DXgJNjk,51
|
|
14
|
+
sunstone_py-0.5.2.dist-info/top_level.txt,sha256=A2fW-7JO10rlx_L28Bc4FVvWt2R8kgvS8_TGPBhQp3c,9
|
|
15
|
+
sunstone_py-0.5.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|