models-dev 1.0.55__tar.gz → 1.0.57__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.
@@ -0,0 +1 @@
1
+ /.env
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: models-dev
3
- Version: 1.0.55
3
+ Version: 1.0.57
4
4
  Summary: Typed Python interface to models.dev API data
5
5
  Project-URL: Homepage, https://github.com/vklimontovich/models-dev
6
6
  Project-URL: Documentation, https://models.dev
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "models-dev"
3
- version = "1.0.55"
3
+ version = "1.0.57"
4
4
  description = "Typed Python interface to models.dev API data"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -23,6 +23,7 @@ DATA_URL = "https://models.dev/api.json"
23
23
  ROOT = Path(__file__).parent.parent.parent
24
24
  DATA_PATH = ROOT / "python" / "src" / "models_dev" / "data.json.gz"
25
25
  PYPROJECT_PATH = ROOT / "python" / "pyproject.toml"
26
+ NODE_PACKAGE_PATH = ROOT / "node" / "package.json"
26
27
 
27
28
 
28
29
  def fetch_latest() -> str:
@@ -98,7 +99,7 @@ def get_version() -> str:
98
99
 
99
100
 
100
101
  def bump_version() -> str:
101
- """Bump patch version and return new version."""
102
+ """Bump patch version in pyproject.toml and package.json. Returns new version."""
102
103
  content = PYPROJECT_PATH.read_text()
103
104
  old = get_version()
104
105
  parts = old.split(".")
@@ -106,6 +107,12 @@ def bump_version() -> str:
106
107
  new = ".".join(parts)
107
108
  content = re.sub(r'^version = ".+"', f'version = "{new}"', content, flags=re.MULTILINE)
108
109
  PYPROJECT_PATH.write_text(content)
110
+
111
+ # Update node package.json
112
+ pkg = json.loads(NODE_PACKAGE_PATH.read_text())
113
+ pkg["version"] = new
114
+ NODE_PACKAGE_PATH.write_text(json.dumps(pkg, indent=2) + "\n")
115
+
109
116
  return new
110
117
 
111
118
 
@@ -132,7 +139,11 @@ def commit(message: str) -> None:
132
139
  message = f"{message}\n\nAction: {action_url}"
133
140
 
134
141
  repo = git.Repo(ROOT)
135
- repo.index.add(["python/pyproject.toml", "python/src/models_dev/data.json.gz"])
142
+ repo.index.add([
143
+ "python/pyproject.toml",
144
+ "python/src/models_dev/data.json.gz",
145
+ "node/package.json",
146
+ ])
136
147
  repo.index.commit(message)
137
148
 
138
149
 
@@ -34,7 +34,7 @@ wheels = [
34
34
 
35
35
  [[package]]
36
36
  name = "models-dev"
37
- version = "1.0.55"
37
+ version = "1.0.57"
38
38
  source = { editable = "." }
39
39
 
40
40
  [package.dev-dependencies]
@@ -1,11 +0,0 @@
1
- .venv/
2
- __pycache__/
3
- *.pyc
4
- *.egg-info/
5
- dist/
6
- build/
7
- .pytest_cache/
8
- .ruff_cache/
9
- .idea/
10
- python/.venv/
11
- .env
File without changes
File without changes