Spaces:
Sleeping
Sleeping
wage data: genuine BLS May 2025 file + vendored-source support
Browse files- deploy.py +6 -0
- vendor/oesm25nat.zip +3 -0
deploy.py
CHANGED
|
@@ -32,9 +32,15 @@ def sources(folder):
|
|
| 32 |
"""Never accept a corrupt download or silently change a pinned release."""
|
| 33 |
folder.mkdir(parents=True, exist_ok=True)
|
| 34 |
records = json.loads((ROOT / 'sources.json').read_text())['files']
|
|
|
|
| 35 |
for item in records:
|
| 36 |
path = folder / item['name']
|
| 37 |
if not path.exists():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
print('Downloading official source:', item['name'], flush=True)
|
| 39 |
last = None
|
| 40 |
for attempt in range(3):
|
|
|
|
| 32 |
"""Never accept a corrupt download or silently change a pinned release."""
|
| 33 |
folder.mkdir(parents=True, exist_ok=True)
|
| 34 |
records = json.loads((ROOT / 'sources.json').read_text())['files']
|
| 35 |
+
vendor = ROOT / 'vendor'
|
| 36 |
for item in records:
|
| 37 |
path = folder / item['name']
|
| 38 |
if not path.exists():
|
| 39 |
+
vendored = vendor / item['name']
|
| 40 |
+
if vendored.is_file() and hashlib.sha256(vendored.read_bytes()).hexdigest() == item['sha256']:
|
| 41 |
+
print('Using vendored source:', item['name'], flush=True)
|
| 42 |
+
shutil.copyfile(vendored, path)
|
| 43 |
+
continue
|
| 44 |
print('Downloading official source:', item['name'], flush=True)
|
| 45 |
last = None
|
| 46 |
for attempt in range(3):
|
vendor/oesm25nat.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5855a37f3e03e779f6fbf173d3bbc94aeeff33426aef32fa95ce6d025bab1af
|
| 3 |
+
size 279525
|