描述并运行系统图。
systems的Python项目详细描述
systems
`systems`是一套描述、运行和可视化
[系统图](https://lethain.com/systems thinking/)的工具。
查看[Jupyter笔记本示例](../notebooks/hiring.ipynb)示例。
ch as:
start(10)
start>;middle@2
middle>;end
8 2 0
2 6 3 1
3 4 2
这里有一个[示例笔记本](./notebooks/hiring.ipynb)。
[阅读此博客了解更多安装详细信息](https://lethain.com/systems jupyter notebook/)。
git克隆https://github.com/lethain/systems.git
cd systems
python3-m venv./env
source./env/bin/activate
python setup.py develop
run tests via:
或通过:
python3 te运行单个测试sts/test_parse.py testparse.test_parse_complex_formula
如果遇到任何问题,请打开github问题!
是的,出发
0 0 0 0 5 0
1 25 0 0 0 5 0
2 25 12 0 5 0
3 25 12 6 05 0
`systems viz`用于将模型可视化到[graphviz]中(https://www.graphviz.org/):
$cat examples/hiring.txt systems viz
///解析的
有向图{
rankdir=lr
0[label=candidates]
1[label=phonescreens]
//等等,其他一些东西,通常你会把"systems viz"的输出管道化为"dot",例如,
消息,而不是在出现错误时将标记呈现给人类。)
$cat examples/hiring.txt systems fmt
[候选项]>;phonescreens@25
phonescreens>;onsites@0.5
等
`systems lex'为给定的系统文件生成标记。
当扩展lexer
以支持新类型的功能时,这通常最有用ITY,但对于其他类型的调试也很有用:
$cat examples/hiring.txt systems lex
('lines',
[('line',
1,
[('comment',''wrap with[]表示无限库存'),
('line',2,[('comment',"不包含在每个表中]),
('line',3,[('comment',''integers are implicit stable rates')),
('line',
4,
[('infinite_u stock','candidates',('params',[]),
('flow_direction','>;'),
('stock','phonescreens',,('params',()),
('flow_delimiter','@'),
('flow','',','('params',('formula',[('whole','25'),)))),
…
]
使用分隔符:
cat examples/no_delim.txt;系统运行
line 1缺少分隔符">;":"[a]<;b@25"
无法解析:"a>;b@0..2"
grade tween
python3 setup.py sdist bdist_wheel
tween upload--repository url https://upload.pypi.org/legacy/dist/*
:)