Skip to content

Commit

Permalink
Merge branch 'feature/twidi/domain-repository-for-code_repository-con…
Browse files Browse the repository at this point in the history
…text' into develop
  • Loading branch information
twidi committed Oct 7, 2020
2 parents bb5e73e + 34f4694 commit 21c5c2f
Show file tree
Hide file tree
Showing 28 changed files with 2,172 additions and 308 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -72,6 +72,7 @@ instance/

# Sphinx documentation
docs/_build/
docs/_build_txt/
# Doc from code
docs/source/
# Doc from bdd features
Expand Down
6 changes: 4 additions & 2 deletions docs/_static/css/gherkin.css
@@ -1,8 +1,10 @@
/* Style for doc generated by `sphinx-gherkindoc` */
div[id^="scenario-"] h2 ~ * {
div[id^="feature-"].section div[id^="scenario-"] h2 ~ *,
div[id^="feature-"].section div[id^="background-"] h2 ~ * {
margin-left: 2em !important;
}
.gherkin-scenario-content {
.gherkin-scenario-content,
.gherkin-background-content {
font-weight: normal;
}
.gherkin-step-keyword {
Expand Down
13 changes: 11 additions & 2 deletions docs/conf.py
Expand Up @@ -93,6 +93,7 @@
# -- Run apidoc when building the documentation-------------------------------

napoleon_use_ivar = True
autodoc_member_order = "bysource"
add_module_names = False


Expand Down Expand Up @@ -140,7 +141,7 @@ def run_gherkindoc(_):
"--toc-name",
"index",
"--maxtocdepth",
"5",
"4", # avoid scenarios for ``isshub.domain.contexts`` (may to too much/not enough later)
]
)

Expand All @@ -158,7 +159,15 @@ def run_gherkindoc(_):
rst_file = os.path.join(output_path, f"{base_name}-toc.rst")
with open(rst_file, "r") as file_d:
rst_lines = file_d.readlines()
rst_lines.insert(3, f".. graphviz:: {base_name}-entities.dot\n\n")
rst_lines.insert(
3,
"Diagrams\n--------\n\n"
"Entities\n~~~~~~~~\n\n"
f".. graphviz:: {base_name}-entities.dot\n\n"
"Repositories\n~~~~~~~~~~~~\n\n"
f".. graphviz:: {base_name}-repositories.dot\n\n"
"BDD features\n------------\n\n",
)
with open(rst_file, "w") as file_d:
file_d.write("".join(rst_lines))

Expand Down

0 comments on commit 21c5c2f

Please sign in to comment.