import.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:utils 作者: ReCodEx 项目源码 文件源码
def set_score_config(exercise_id, config_path, exercise_folder):
    config = Config.load(Path.cwd() / (config_path or "import-config.yml"))
    api = ApiClient(config.api_url, config.api_token)
    tests = load_codex_test_config(Path(exercise_folder) / "testdata" / "config")

    score_config = {test.name: int(test.points) for test in tests}
    api.set_exercise_score_config(exercise_id, yaml.dump({"testWeights": score_config}, default_flow_style=False))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号