没有项目描述

wcm的Python项目详细描述


WCM-Wings组件管理器

Build StatusPyPI versionPython 3.5DownloadsLicense

安装

pip install wcm

cli

wcmwings组件管理器是一个cli实用程序,用于publishdownloadwings组件到wings实例。

$ wcm --help
Usage: wcm [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbose
  --help         Show this message and exit.

Commands:
  configure  Configure credentials
  download   Download a component from the wings server.
  init       Initialize a directory for a new component.
  list       Lists all the components in the current wings instance
  publish    Deploy the pacakge to the wcm.
  version    Show wcm version.

configure子命令用于设置wcm用于与wings服务器交互的凭据。

$ wcm configure --help
Usage: wcm configure [OPTIONS]

  Configure credentials

Options:
  -p, --profile <profile-name>
  --help              Show this message and exit.

init子命令用于初始化文件系统上的新wings组件。

$ wcm init --help
Usage: wcm init [OPTIONS][COMPONENT]

  Initialize a directory for a new component.

Options:
  -y, --yes
  --help     Show this message and exit.

publish子命令将组件发布到wings服务器。

$ wcm publish --help
Usage: wcm publish [OPTIONS][COMPONENT]

  Deploy the pacakge to the wcm.

Options:
  -d, --debug / -nd, --no-debug
  -n, --dry-run
  --help                         Show this message and exit.

download子命令将从当前wings服务器下载组件。

$ wcm download --help
Usage: wcm download [OPTIONS] COMPONENT_ID
Download a component from wings server. Data stored in .yaml file and source code downloaded to folder within same directory. file-path can be specified to download into a specific directory

Options:
   -p, --profile <profile-name>
   -f, --file-path TEXT
   --help                        Show this message and exit.

list子命令列出当前Wings服务器中所有组件的名称

$ wcm list --help
Usage: wcm list [OPTIONS]
Lists all the components in the current wings instance

Options:
-p, --profile <profile-name>
--help                        Show this message and exit.

示例用法

一旦安装了wcm,请将您的凭据配置为使用wings服务器

C:\Users\Admin>wcm configure
WINGS Server URL: 
WINGS Export URL: http://localhost:8080
WINGS User: myUsername
WINGS Password:
WINGS Domain: wings-domain
Success 

现在您可以开始使用wcm了。首先列出您在凭据上指定的wings实例上的组件

C:\Users\Admin>wcm list
[Economic]
  └─┐
    ├─ economic-v6
    ├─ economictest-v5
    ├─ economicnodata-v6
    ├─ economic-different-data-v6
    └─ economicwcmtest 
                                                                                                                                                                                                                 
[Hydrological]
   └─┐                                                                                                                   
     ├─ HAND-1
     ├─ hand_final-v1
     ├─ hand-v1
     └─ handnodata-v1.0.1 

Done

接下来,您可以下载其中一个组件。让我们选择经济型V6。首先,您需要导航到要将组件下载到的目录。或者,也可以使用-f<;filepath>;参数指定要下载到的组件的文件路径

C:\Users\Admin\Desktop\down>ls

C:\Users\Admin\Desktop\down>wcm download economic-v5
2019-08-13 14:52:02,082 root         INFO     Downloading component
2019-08-13 14:52:02,226 root         INFO     Generated YAML 
2019-08-13 14:52:02,256 root         INFO     Download complete
Download complete  

C:\Users\Admin\Desktop\down>ls
economic-v6       

当你下载一个组件时,它有三个部分。存储组件数据的wings-component.yaml文件。存储排序代码的src文件夹。数据文件夹,目前只是一个占位符

下载economic-v5组件后,可以编辑一些源代码。要上载新版本(示例中为6.1),请使用publish命令

C:\Users\Admin\Desktop\down>ls
economic-v6.1

C:\Users\Admin\Desktop\down>wcm publish economic-v6.1
2019-08-13 15:04:08,540 root         INFO     Publishing component
Success                                                                                                                 

现在让我们检查list命令以确保它已发布

C:\Users\Admin\Desktop\down>wcm list
[Economic]
  └─┐
    ├─ economic-v6
    ├─ economictest-v5
    ├─ economicnodata-v6
    ├─ economic-different-data-v6
    ├─ economicwcmtest
    └─ economic-v6.1

[Hydrological]
  └─┐
    ├─ HAND-1
    ├─ hand_final-v1
    ├─ hand-v1
    └─ handnodata-v1.0.1

Done

现在,Economic-V6.1组件已上载到Wings

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java在Jpanel上显示信息   安卓中java文本到pdf的转换   java响应在设置DeferredResult setResult方法后很晚才发送回   java如何在servlet应用程序中更改用户的tomcat密码?   java在另一个图像的某个点绘制图像   Java JCA AES加密,检测消息是否被篡改   java字符串拆分并获取一些数据   java如何从计时器运行方法调用另一个方法。安卓   java在刻录到磁盘后无法加载字体   java如何触发事件?   多线程使用线程理解Java并发性   java如何在cardView中间实现锯齿状视图   java导入外部jar文件   java为Drools配置Eclipse   java组织。springframework。网状物绑定MissingServletRequestParameterException:所需的字符串参数“全文”不存在。我正在尝试添加博客   java BigInteger。对于非常大的数字,valueOf()是什么?   java调试JConsole连接失败