pgdevkit 0.7.1__py3-none-any.whl → 0.7.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.
pgdevkit/testdb/naming.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import hashlib
4
+ import os
4
5
  import re
5
6
  import subprocess
6
7
  from pathlib import Path
@@ -25,7 +26,15 @@ def slugify(value: str) -> str:
25
26
 
26
27
 
27
28
  def current_branch(cwd: Path | None = None) -> str:
28
- """Return the branch checked out in the git worktree rooted at cwd."""
29
+ """Return the branch checked out in the git worktree rooted at cwd.
30
+
31
+ PGDEVKIT_TESTDB_BRANCH overrides this when set -- lets concurrent CI
32
+ checkouts (which all otherwise resolve to detached-HEAD "HEAD") get
33
+ distinct database names on a shared test-DB container.
34
+ """
35
+ override = os.environ.get("PGDEVKIT_TESTDB_BRANCH")
36
+ if override:
37
+ return override
29
38
  result = subprocess.run(
30
39
  ["git", "rev-parse", "--abbrev-ref", "HEAD"],
31
40
  cwd=cwd,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pgdevkit
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: A helper for developing with Postgres
5
5
  Requires-Python: >=3.14
6
6
  Requires-Dist: docker>=7.1.0
@@ -32,7 +32,7 @@ pgdevkit/testdb/api.py,sha256=13YgTz6hPcYWfsUlQJhJ7k20-W_4hzepedVaT8gWhxI,9709
32
32
  pgdevkit/testdb/config.py,sha256=NyeskDeThUgwOuxiMgHVnUOiHW-xVO9s2lJQoJcQwW4,2839
33
33
  pgdevkit/testdb/constants.py,sha256=oykc7xoX2R0ykhjXpqIdwkZoeHcScme8S2UPYvi_d_w,1718
34
34
  pgdevkit/testdb/container.py,sha256=PD2xUksIlAWXXus2VtAil_8UnwlG5DUcyUvbZx0eZTg,3123
35
- pgdevkit/testdb/naming.py,sha256=R7zEZaqFqwqlXS8rkfh1zGnuD3jnzdt1A7aCibSnSpM,4060
35
+ pgdevkit/testdb/naming.py,sha256=iHZVYdBQjHOD5sihgmZFe2qOC1djgBb6iP6R8wLUfL0,4377
36
36
  pgdevkit/testdb/query.py,sha256=iYpy_EoYIq5USfwr6pNktmDjcGi_yQx0vHvjHZNGRr0,3854
37
37
  pgdevkit/testdb/schema.py,sha256=XYBK3xyay98a5gzFW6SAQ336Jge-NhOQhildSQDOaf4,15101
38
38
  pgdevkit/testdb/mssql/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
@@ -43,7 +43,7 @@ pgdevkit/docs/database-layout.md,sha256=j9N8GuT63D2oVf9rIOEv8GTWs4yTtjZTGH-zM5Wr
43
43
  pgdevkit/skills/pgdevkit/SKILL.md,sha256=ADqEaQtMJPUUAiieqokzUUmIf27bWWJNB1ZvsfgiKAE,12205
44
44
  pgdevkit/skills/pgdevkit/references/dynamic-sql.md,sha256=aTR1sx81moiTwaMaiOecaqk-9rT8y5Zxz7W1BoC3vK0,2774
45
45
  pgdevkit/skills/pgdevkit/references/temporal-tables.md,sha256=LwZnItvQWI7bB0oRHxIfUc0ynnq7N0V5Mnv-QHvFN3Q,1364
46
- pgdevkit-0.7.1.dist-info/METADATA,sha256=lzpwrwpnLpOzO25-aTrq_C6wtwHFGbKaXMFaz1E8UzQ,20367
47
- pgdevkit-0.7.1.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
48
- pgdevkit-0.7.1.dist-info/entry_points.txt,sha256=FK2P55lf0WaGlOZJIINOGgCt8WB7ep0OnPsgnrp80bg,42
49
- pgdevkit-0.7.1.dist-info/RECORD,,
46
+ pgdevkit-0.7.2.dist-info/METADATA,sha256=6LQs_7tl-vQ-I8WnTSpl7uRIesuDropRBTL8fcE22GE,20367
47
+ pgdevkit-0.7.2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
48
+ pgdevkit-0.7.2.dist-info/entry_points.txt,sha256=FK2P55lf0WaGlOZJIINOGgCt8WB7ep0OnPsgnrp80bg,42
49
+ pgdevkit-0.7.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.0
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any