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.
- models_dev-1.0.57/.gitignore +1 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/PKG-INFO +1 -1
- {models_dev-1.0.55 → models_dev-1.0.57}/pyproject.toml +1 -1
- {models_dev-1.0.55 → models_dev-1.0.57}/scripts/update.py +13 -2
- models_dev-1.0.57/src/models_dev/data.json.gz +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/uv.lock +1 -1
- models_dev-1.0.55/.gitignore +0 -11
- models_dev-1.0.55/src/models_dev/data.json.gz +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/LICENSE +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/README.md +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/src/models_dev/__init__.py +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/src/models_dev/_loader.py +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/src/models_dev/_types.py +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/src/models_dev/py.typed +0 -0
- {models_dev-1.0.55 → models_dev-1.0.57}/tests/test_data.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/.env
|
|
@@ -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
|
|
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([
|
|
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
|
|
|
Binary file
|
models_dev-1.0.55/.gitignore
DELETED
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|