generated from Java-2025Fall/final-vibevault-template
添加空的upload_metadata.py文件以避免工作流失败
This commit is contained in:
parent
1e435f08fc
commit
a132067a38
24
.autograde/upload_metadata.py
Normal file
24
.autograde/upload_metadata.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
空的元数据上传脚本,用于避免工作流因文件不存在而失败
|
||||||
|
"""
|
||||||
|
import sys
|
||||||
|
import json
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("⚠️ 这是一个空的元数据上传脚本,不会执行任何实际操作")
|
||||||
|
print("参数:", sys.argv)
|
||||||
|
# 读取并打印元数据文件内容
|
||||||
|
for i, arg in enumerate(sys.argv[1:]):
|
||||||
|
if arg == "--metadata-file" and i + 2 <= len(sys.argv):
|
||||||
|
metadata_file = sys.argv[i + 2]
|
||||||
|
try:
|
||||||
|
with open(metadata_file, 'r') as f:
|
||||||
|
metadata = json.load(f)
|
||||||
|
print(f"元数据文件 {metadata_file} 内容:", json.dumps(metadata, indent=2))
|
||||||
|
except Exception as e:
|
||||||
|
print(f"读取元数据文件失败: {e}")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
Loading…
Reference in New Issue
Block a user