本地测试吉诃德模型的脚本

dulcinee的Python项目详细描述


杜尔西尼亚

允许在本地测试吉诃德模型的脚本。

安装

pip install -r requirements.txt

如何使用Dulcinea

usage:dulcinea.py[-h]-cCONFIG_FILE-iINFO_FILE[-rROOT_DIR]moulinette_directorypositionalarguments:moulinette_directoryoptionalarguments:-h,--helpshowthishelpmessageandexit-cCONFIG_FILE,--config-fileCONFIG_FILEjsonfilecontainingtheuserinformations-iINFO_FILE,--info-fileINFO_FILEjsonfilecontainingtheinformationofthejobstoexecute-rROOT_DIR,--root-dirROOT_DIRdirectorywherethejobswillbeexecuted

conf文件示例

conf文件必须使用-c选项给出,并且包含要插入到上下文中的有用元数据,如用户信息

{"intra_user":"login_z","intra_password":"superPassSecure","gitlab_token":"superCuteToken"}

蓝图

为了在本地测试moulinette,脚本必须能够获取一些要测试的虚拟传递。

通常,这是通过使用内置的fetch.copy将获取步骤替换为“本地”获取来实现的:

importquixote.fetch.copyasfetch@quixote.fetcherdeffetch_by_copying():fetch.copy(path_to_the_dummy_delivery_folder)

The dummy delivery folder must contain a directory for each group_id specified in the info file which will act as dummy delivery for the specific job. See the documentation for fetch.copy.

信息文件示例

信息文件必须使用-i选项给出,并且应该包含所有虚拟传递的元数据。

[
    {
        "module_id": 1,
        "activity_id": 1,
        "group_id": 1
    },
    {
        "module_id": 1,
        "activity_id": 1,
        "group_id": 2
    }
]

The values for module_id and activity_id don't really matter, they are just dummy values to insert into the context. group_id however must match the directory name inside the dummy delivery folder.

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

推荐PyPI第三方库


热门话题
java如何创建Restful服务并将其部署到OSGi容器?   java如何获取用户在EditText中输入的时间并从中扣除5小时30分钟?   java用户无法注销firebase 安卓   java Undertow始终将字符集添加到ContentType头,即使它不是文本MIME类型   java LocalBroadcastManager未正确接收消息   foreach在Java中有没有比For循环更好的方法可以灵活地遍历集合?   java如何在安卓上移动球   在OSGi下的Log4j中使所有记录器异步时,java ClassNotFoundException   java未知输入字节长度转换为int   java测试工厂在使用前缀命名时抛出NPE   对象的副本(JAVA)   java SP20310:无法打开文件。sql   java Spring安全性仅为一条路径添加安全性   java在idea中获取菱形运算符的编译错误