Spark Networks DevOps编码挑战

sparkd的Python项目详细描述


Spark Networks DevOps编码挑战

https://gitlab.com/askainet/spark-networks-code-challenge

要求

  • python=3.4

安装

来自公共pypi存储库:

pip install sparkd

演示

docker build . -t sparkd

docker run -it -e RETRIES=5 sparkd demo.sh

用法

usage: sparkd [-h] [--version] [-l LOGFILE]
              [--command-logfile COMMAND_LOGFILE] [-n NAME] [-v] [-d]
              [-r RETRIES] [-i RETRY_INTERVAL] [-c CHECK_INTERVAL]
              [command] [arguments [arguments ...]]

Run any command as a daemon and supervise it

positional arguments:
  command               The command to run as a daemon to supervise
  arguments             Arguments to the command

optional arguments:
  -h, --help            show this help message and exit
  --version             Show version
  -l LOGFILE, --logfile LOGFILE
                        Set the logfile for the Sparkd supervisor
  --command-logfile COMMAND_LOGFILE
                        Set the logfile for the command to supervise
  -n NAME, --name NAME  Set the name of this Sparkd instance
  -v, --verbose         Enable verbose logging
  -d, --debug           Enable debug logging
  -r RETRIES, --retries RETRIES
                        Number of retries to restart the process
  -i RETRY_INTERVAL, --retry-interval RETRY_INTERVAL
                        Seconds to wait between retries to restart the process
  -c CHECK_INTERVAL, --check-interval CHECK_INTERVAL
                        Seconds to wait between checking process status

开发

测试

添加了一些基本测试,以便只覆盖Process类, 只是演示如何在python中使用unittest

make test

起毛

使用pylint进行linting,以保持代码良好和健康。

make lint

发布到pypi

打包并发布到pypi存储库。

make dist

从源安装

make install

文件

文档是基于代码中的docstring使用sphinx构建的。

readthedocs集成配置为自动生成和上载 文档到https://sparkd.readthedocs.io/en/latest/更新到主分支。

可以运行make docs

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

推荐PyPI第三方库


热门话题
java当我点击MainActivity中的按钮以显示其他活动时,它不起作用   java游戏!框架:在请求之间获取控制器的组件/字段/对象   JavaBlackBerry:调用计算器并检索值?   java Struts2 jQuery插件提交按钮   java无法将更新的画布绘制到活动   java如何将Gson值放入HashMap   使用截取时出现java错误:RecyclerView:未连接适配器;跳过布局   java组织。冬眠HibernateException:在Hibernate搜索中编制索引时出错(在事务完成之前)   java Swagger服务器存根生成工作流   java JInternalFrame底部阴影问题   java nio缓冲区类中limit()的用法是什么   java水平回收器视图内部选项卡布局   java Maven无法找到依赖项   java如何管理不同应用程序实例的权限文件?