本文整理汇总了Python中vilya.models.sphinx_docs.SphinxDocs.need_rebuild方法的典型用法代码示例。如果您正苦于以下问题:Python SphinxDocs.need_rebuild方法的具体用法?Python SphinxDocs.need_rebuild怎么用?Python SphinxDocs.need_rebuild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vilya.models.sphinx_docs.SphinxDocs
的用法示例。
在下文中一共展示了SphinxDocs.need_rebuild方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_need_rebuild
# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import need_rebuild [as 别名]
def test_need_rebuild(self):
prj = self._prj()
self._add(prj, 'docs/index.rst', base_index_rst)
sd = SphinxDocs(prj.name)
assert sd.need_rebuild()
sd.build_all()
assert not sd.need_rebuild()
self._add(prj, 'docs/doc1.rst', base_document1_rst)
sd = SphinxDocs(prj.name) # Bad, should not have to refresh object
assert sd.need_rebuild()
sd.build_all()
assert not sd.need_rebuild()
示例2: test_need_rebuild
# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import need_rebuild [as 别名]
def test_need_rebuild(self):
prj = self._prj()
self._add(prj, "code_config.yaml", base_yaml_conf)
self._add(prj, "index.rst", base_index_rst)
sd = SphinxDocs(prj.name)
assert sd.need_rebuild()
sd.build_all()
assert not sd.need_rebuild()
self._add(prj, "doc1.rst", base_document1_rst)
sd = SphinxDocs(prj.name) # Bad, should not have to refresh object
assert sd.need_rebuild()
sd.build_all()
assert not sd.need_rebuild()
示例3: check_sphinx_builds
# 需要导入模块: from vilya.models.sphinx_docs import SphinxDocs [as 别名]
# 或者: from vilya.models.sphinx_docs.SphinxDocs import need_rebuild [as 别名]
def check_sphinx_builds():
for proj in get_origin_projects():
try:
docs = SphinxDocs(proj.name)
except JagareError:
continue
if not docs.enabled or not docs.need_rebuild():
continue
sphinx_builds_add(docs)