跳转到主要内容

AiiDA Transport/Scheduler插件,用于与FirecREST接口。

项目描述

aiida-firecrest [开发中]

AiiDA Transport/Scheduler插件,用于与FirecREST接口

安装

(pip尚未提供)

pip install aiida-firecrest

或用于开发

git clone
cd aiida-firecrest
pip install -e .

CLI使用

$ aiida-firecrest-cli --help
Usage: aiida-firecrest-cli [OPTIONS] COMMAND [ARGS]...

  FireCrest CLI.

Options:
  --config PATH  Path to the connection file (default: .firecrest-
                 config.json).
  --help         Show this message and exit.

Commands:
  fs      File system operations.
  slurm   Slurm operations.
  stat    Status operations.

配置文件应如下所示

{
    "url": "https://firecrest.cscs.ch",
    "token_uri": "https://auth.cscs.ch/auth/realms/cscs/protocol/openid-connect/token",
    "client_id": "username-client",
    "client_secret": "xyz",
    "machine": "daint",
    "scratch_path": "/scratch/snx3000/username"
}

scratch_path 是可选的。如果指定,所有操作都将相对于此路径。

$ aiida-firecrest-cli stat
Usage: aiida-firecrest-cli stat [OPTIONS] COMMAND [ARGS]...

  Status operations.

Options:
  --help  Show this message and exit.

Commands:
  parameters  Get parameters that can be configured in environment files.
  service     Information about a service.
  services    List available services.
  system      Information about a system.
  systems     List available systems.
$ aiida-firecrest-cli fs
Usage: aiida-firecrest-cli fs [OPTIONS] COMMAND [ARGS]...

  File system operations.

Options:
  --help  Show this message and exit.

Commands:
  cat      Get the contents of a file.
  chmod    Change the mode of a file.
  cwd      Get the current working directory.
  ls       List files in a path.
  putfile  Upload file to the remote.
  stat     Get information about a file.
$ aiida-firecrest-cli slurm
Usage: aiida-firecrest-cli slurm [OPTIONS] COMMAND [ARGS]...

  Slurm operations.

Options:
  --help  Show this message and exit.

Commands:
  sacct   Retrieve information for all jobs.
  squeue  Retrieves information for queued jobs.
  submit  Submit a job script.

代码样式

要格式化代码并执行代码检查,请运行 pre-commit

pre-commit run --all-files

测试

建议通过 tox 运行测试。

tox

默认情况下,测试使用模拟的FirecREST服务器(在临时文件夹中)运行。您也可以提供连接到真实FirecREST服务器的连接详细信息

tox -- --firecrest-config=".firecrest-config.json"

.firecrest-config.json 文件的格式为

{
    "url": "https://firecrest.cscs.ch",
    "token_uri": "https://auth.cscs.ch/auth/realms/cscs/protocol/openid-connect/token",
    "client_id": "username-client",
    "client_secret": "xyz",
    "machine": "daint",
    "scratch_path": "/scratch/snx3000/username"
}

项目详细信息


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源分布

aiida_firecrest-0.1.0a1.tar.gz (11.5 kB 查看哈希值)

上传时间 源代码

构建版本

aiida_firecrest-0.1.0a1-py3-none-any.whl (10.0 kB 查看哈希值)

上传时间 Python 3