未验证 提交 d188f49b 编写于 作者: J Jiajie Zhong 提交者: GitHub

[doc] Dir development should not ref other dirs content (#9812)

For now, development dir deploy in other place instead
of docs dir https://dolphinscheduler.apache.org/en-us/development/development-environment-setup.html
so could not ref markdown doc from other docs dir
上级 ed425d2d
......@@ -39,6 +39,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Run Dev Relative Reference
run: python img_utils.py -v dev-syntax
- name: Run Image Check
run: python img_utils.py -v check
dead-link:
......
......@@ -37,7 +37,7 @@ There are two ways to configure the DolphinScheduler development environment, st
> **_Note:_** Use standalone server only for development and debugging, because it uses H2 Database as default database and Zookeeper Testing Server which may not be stable in production.
> Standalone is only supported in DolphinScheduler 1.3.9 and later versions.
> Standalone server is able to connect to external databases like mysql and postgresql, see [Standalone Deployment](../guide/installation/standalone.md) for instructions.
> Standalone server is able to connect to external databases like mysql and postgresql, see [Standalone Deployment](https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/guide/installation/standalone.html) for instructions.
### Git Branch Choose
......
......@@ -31,6 +31,8 @@ log.addHandler(logging.StreamHandler())
root_dir: Path = Path(__file__).parent
img_dir: Path = root_dir.joinpath("img")
doc_dir: Path = root_dir.joinpath("docs")
dev_en_dir: Path = doc_dir.joinpath("en", "development")
dev_zh_dir: Path = doc_dir.joinpath("zh", "development")
def get_files_recurse(path: Path) -> Set:
......@@ -122,6 +124,17 @@ def prune() -> None:
del_empty_dir_recurse(img_dir)
def dev_syntax() -> None:
"""Check temp whether temporary do not support syntax in development."""
pattern = re.compile("(\\(\\.\\.[\\w./-]+\\))")
dev_files_path = get_files_recurse(dev_en_dir) | get_files_recurse(dev_zh_dir)
get_files_recurse(dev_en_dir)
for path in dev_files_path:
content = path.read_text()
find = pattern.findall(content)
assert not find, f"File {str(path)} contain temporary not support syntax: {find}."
def build_argparse() -> argparse.ArgumentParser:
"""Build argparse.ArgumentParser with specific configuration."""
parser = argparse.ArgumentParser(prog="img_utils")
......@@ -150,6 +163,11 @@ def build_argparse() -> argparse.ArgumentParser:
)
parser_prune.set_defaults(func=prune)
parser_prune = subparsers.add_parser(
"dev-syntax", help="Check whether temporary does not support syntax in development directory."
)
parser_prune.set_defaults(func=dev_syntax)
# TODO Add subcommand `reorder`
return parser
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册