0

我想捆绑kedro提供命令行界面 ( kedro) 的 Python 包。此外,我还想将 Python 包kedro-docker放入 snap 中。第二个包扩展了第一个包的命令行界面 ( kedro docker)。但是,当我使用以下创建快照时,snapcraft.yaml我只得到第一个包的命令行界面:

name: kedro
base: core18
version: latest
description: |
    Kedro is a development workflow framework that implements software
    engineering best-practice for data pipelines with an eye towards
    productionising machine learning models.

grade: devel
confinement: devmode

architectures:
  - build-on: [amd64]

apps:
  kedro:
    command: kedro
    plugs:
      - home
      - network
      - network-bind
      - docker
    environment: {
      LANG: C.UTF-8,
      LC_ALL: C.UTF-8
    }

parts:
  kedro:
    plugin: python
    python-version: python3
    python-packages:
      - kedro==0.15.9
      - kedro-docker==0.1.1

如何将扩展的命令行界面 ( kedro docker) 放入 snap 中?

4

1 回答 1

1

我不是专家,也从未使用过snapcraft,因此这里只是一个假设。Kedro-Docker 仅公开特定于项目的命令,除非您位于项目的根目录中,否则这些命令不会显示。因此,如果您运行kedro newthen cd <project-dir> && kedro,您应该(理想情况下)看到一docker组命令:

Global commands from Kedro
Commands:
  docs  See the kedro API docs and introductory tutorial.
  info  Get more information about kedro.
  new   Create a new kedro project.

Project specific commands from Docker
Commands:
  docker  Dockerize your Kedro project.

Project specific commands from <project-dir>/kedro_cli.py
Commands:
  activate-nbstripout  Install the nbstripout git hook to automatically...
  build-docs           Build the project documentation.
  build-reqs           Build the project dependency requirements.
  install              Install project dependencies from both...
  ipython              Open IPython with project specific variables loaded.
  jupyter              Open Jupyter Notebook / Lab with project specific...
  lint                 Run flake8, isort and (on Python >=3.6) black.
  package              Package the project as a Python egg and wheel.
  run                  Run the pipeline.
  test                 Run the test suite.
于 2020-05-01T19:52:10.510 回答