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如何正确使用JdbcTemplate。用钥匙夹更新?   java如何仅在XML的根元素上声明名称空间   使用Selenium和Java可以实现多少拖放功能   java如何从一棵树构造一棵树而无需递归   java My bubble排序似乎运行了太多次,或者是向后运行   创建bean时发生java错误:没有符合条件的bean,需要一个匹配的bean,但找到了3个   java 安卓 6.0生成错误:找不到包   java从列表中创建具有多个对象类型的arraylist<object[]>   安卓重写sendevent。c从c到Java   java为什么不支持流。最大接受整数。作为输入参数进行比较?   java我能阻止RCP编辑器加载吗   java无法在将来从异常传播自定义异常   java在Android中从PHP获取数据   Java创建具有多个GUI框架的程序   java如何解决枚举或接口预期错误   在java中按从高到低的数字排序bubblesort   C++我不能理解java的普通类库的用法   java将图像发送到另一个应用程序   java为什么maven构建失败并出现错误:“包com.microsoft.jdbc.sqlserver不存在”?   python Spark安装问题,java异常