Loading csst_dfs_client/level1.py +4 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ def update_prc_status(level1_id: str, file_type: str, prc_status: int, batch_id: """ return request.put(f"/api/level1/prc_status/{level1_id}", {'file_type': file_type, 'prc_status': prc_status, 'batch_id': batch_id}) def write(local_file: Union[IO | str], def write(local_file: Union[IO, str], module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'], level0_id: Optional[str | None], level1_id: Optional[str | None], Loading @@ -168,7 +168,7 @@ def write(local_file: Union[IO | str], 将本地的1级数据文件写入到DFS中其他参数如rss_id, cube_id等,可通过extra_kwargs传入 Args: local_file (Union[IO | str]): 文件路径或文件对象 local_file (Union[IO, str]): 文件路径或文件对象 module_id ['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC']其中一个,代表: 模块ID level0_id (Optional[str | None]): 0级数据的ID默认为 None level1_id (Optional[str | None]): 1级数据的ID默认为 None Loading Loading @@ -199,6 +199,8 @@ def write(local_file: Union[IO | str], if not dataset or not batch_id: raise ValueError("dataset and batch_id is required") params.update(extra_kwargs) if local_file is None: raise ValueError("local_file is required") if isinstance(local_file, str): if not os.path.exists(local_file): raise FileNotFoundError(local_file) Loading csst_dfs_client/level2.py +4 −2 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ def update_prc_status_by_file_name(file_name: str, prc_status: int, batch_id: st """ return request.put(f"/api/level2/prc_status/file/{file_name}", {'prc_status': prc_status, 'batch_id': batch_id}) def write(local_file: Union[IO | str], def write(local_file: Union[IO, str], module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'], level0_id: Optional[str | None], level1_id: Optional[str | None], Loading Loading @@ -195,6 +195,8 @@ def write(local_file: Union[IO | str], 'batch_id': batch_id } params.update(extra_kwargs) if local_file is None: raise ValueError("local_file is required") if isinstance(local_file, str): if not os.path.exists(local_file): raise FileNotFoundError(local_file) Loading Loading
csst_dfs_client/level1.py +4 −2 Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ def update_prc_status(level1_id: str, file_type: str, prc_status: int, batch_id: """ return request.put(f"/api/level1/prc_status/{level1_id}", {'file_type': file_type, 'prc_status': prc_status, 'batch_id': batch_id}) def write(local_file: Union[IO | str], def write(local_file: Union[IO, str], module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'], level0_id: Optional[str | None], level1_id: Optional[str | None], Loading @@ -168,7 +168,7 @@ def write(local_file: Union[IO | str], 将本地的1级数据文件写入到DFS中其他参数如rss_id, cube_id等,可通过extra_kwargs传入 Args: local_file (Union[IO | str]): 文件路径或文件对象 local_file (Union[IO, str]): 文件路径或文件对象 module_id ['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC']其中一个,代表: 模块ID level0_id (Optional[str | None]): 0级数据的ID默认为 None level1_id (Optional[str | None]): 1级数据的ID默认为 None Loading Loading @@ -199,6 +199,8 @@ def write(local_file: Union[IO | str], if not dataset or not batch_id: raise ValueError("dataset and batch_id is required") params.update(extra_kwargs) if local_file is None: raise ValueError("local_file is required") if isinstance(local_file, str): if not os.path.exists(local_file): raise FileNotFoundError(local_file) Loading
csst_dfs_client/level2.py +4 −2 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ def update_prc_status_by_file_name(file_name: str, prc_status: int, batch_id: st """ return request.put(f"/api/level2/prc_status/file/{file_name}", {'prc_status': prc_status, 'batch_id': batch_id}) def write(local_file: Union[IO | str], def write(local_file: Union[IO, str], module_id: Literal['MSC', 'IFS', 'MCI', 'HSTDM', 'CPIC'], level0_id: Optional[str | None], level1_id: Optional[str | None], Loading Loading @@ -195,6 +195,8 @@ def write(local_file: Union[IO | str], 'batch_id': batch_id } params.update(extra_kwargs) if local_file is None: raise ValueError("local_file is required") if isinstance(local_file, str): if not os.path.exists(local_file): raise FileNotFoundError(local_file) Loading