Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make gendocs git friendly #209

Merged
merged 2 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bin/gendocs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ if [ -d venv ]; then
source venv/bin/activate
fi

# Ensure git friendly files are generated by enforcing version
if ! pip3 freeze | grep -q "json-schema-for-humans==0.39.1"; then
grafnu marked this conversation as resolved.
Show resolved Hide resolved
echo "Ensure Python3 module json-schema-for-humans version 0.39.1 is installed"
exit 2
fi

rm -rf $OUTPUT_DIR
mkdir -p $OUTPUT_DIR

Expand All @@ -33,7 +39,7 @@ mkdir -p $TMP_DIR
cp -r schema/. $TMP_DIR

# Remove file: prefix from references so document generator works
find $TMP_DIR -type f -exec sed -i 's/file://' {} \;
find $TMP_DIR -type f -exec sed -i 's/file://' {} \;
grafnu marked this conversation as resolved.
Show resolved Hide resolved

schemas="state event_system event_pointset event_discovery config metadata envelope"

Expand Down
3 changes: 2 additions & 1 deletion bin/gendocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
config = GenerationConfiguration(copy_css=True,
expand_buttons=True,
minify=False,
link_to_reused_ref=False)
link_to_reused_ref=False,
footer_show_time=False)

schema = sys.argv[1]
source_dir = sys.argv[2]
Expand Down
1,275 changes: 1,269 additions & 6 deletions gencode/docs/config.html

Large diffs are not rendered by default.

238 changes: 237 additions & 1 deletion gencode/docs/envelope.html

Large diffs are not rendered by default.

287 changes: 285 additions & 2 deletions gencode/docs/event_discovery.html

Large diffs are not rendered by default.

285 changes: 280 additions & 5 deletions gencode/docs/event_pointset.html

Large diffs are not rendered by default.

434 changes: 428 additions & 6 deletions gencode/docs/event_system.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gencode/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ <h1>UDMI Schema</h1>
<br>
<div class="card"><a href="state.html">state</a></div> <div class="card"><a href="event_system.html">event_system</a></div> <div class="card"><a href="event_pointset.html">event_pointset</a></div> <div class="card"><a href="event_discovery.html">event_discovery</a></div> <div class="card"><a href="config.html">config</a></div> <div class="card"><a href="metadata.html">metadata</a></div> <div class="card"><a href="envelope.html">envelope</a></div><!--SCHEMALINK-->
</body>
</html>
</html>
2,248 changes: 2,238 additions & 10 deletions gencode/docs/metadata.html

Large diffs are not rendered by default.

2,286 changes: 2,267 additions & 19 deletions gencode/docs/state.html

Large diffs are not rendered by default.