From b4e7b57a0709dfbf4d22e7f589252e39519b458b Mon Sep 17 00:00:00 2001 From: Corey Oordt Date: Sat, 4 May 2024 08:52:00 -0500 Subject: [PATCH] Migrated docs to use MkDocs --- .gitignore | 4 - .../_includes/example-composition.yaml | 0 .../_includes/interactive-create.txt | 0 .../_includes/rendered-composition.yaml | 0 .../_includes/tutorial-composition-1.yaml | 0 .../_includes/tutorial-composition-2.yaml | 0 .../_includes/tutorial-composition-3.yaml | 0 docs/assets/css/cards.css | 200 +++++++++++++ docs/assets/css/custom.css | 12 + docs/assets/css/field-list.css | 34 +++ docs/assets/css/mkdocstrings.css | 39 +++ .../assets}/img/authorize-composer.png | Bin .../assets}/img/authorize-done.png | Bin .../assets}/img/composer-logo.svg | 0 .../assets}/img/compositions.png | Bin .../assets}/img/device-activation.png | Bin .../_static => docs/assets}/img/layers.png | Bin .../assets}/img/sandwiches.png | Bin docs/changelog.md | 6 + docs/contributing.md | 6 + docs/gen_doc_stubs.py | 51 ++++ .../how-to/access-private-templates.md | 12 +- docs/how-to/index.md | 1 + docs/index.md | 8 + {docsrc => docs}/installation.md | 0 docs/reference/cli.md | 6 + .../topic-guides/composition-files.md | 25 +- docs/topic-guides/index.md | 1 + .../tutorial/composable-templates.md | 0 {docsrc => docs}/tutorial/compositions.md | 27 +- .../tutorial/incrementally-layering.md | 0 docs/tutorial/index.md | 1 + docsrc/Makefile | 20 -- docsrc/_static/css/custom.css | 11 - docsrc/_templates/autosummary/base.rst | 9 - docsrc/_templates/autosummary/class.rst | 11 - docsrc/_templates/autosummary/module.rst | 72 ----- docsrc/api.rst | 22 -- .../cookie_composer.authentication.rst | 61 ---- .../cookie_composer.cc_overrides.rst | 102 ------- .../cookie_composer/cookie_composer.cli.rst | 86 ------ .../cookie_composer.commands.add.rst | 46 --- .../cookie_composer.commands.authn.rst | 45 --- .../cookie_composer.commands.create.rst | 46 --- .../cookie_composer.commands.link.rst | 29 -- .../cookie_composer.commands.rst | 20 -- .../cookie_composer.commands.update.rst | 37 --- .../cookie_composer.composition.rst | 100 ------- .../cookie_composer.data_merge.rst | 147 ---------- .../cookie_composer/cookie_composer.diff.rst | 79 ----- .../cookie_composer.exceptions.rst | 101 ------- .../cookie_composer.git_commands.rst | 124 -------- .../cookie_composer/cookie_composer.io.rst | 141 --------- .../cookie_composer.layers.rst | 274 ------------------ .../cookie_composer.matching.rst | 37 --- .../cookie_composer.merge_files.ini_file.rst | 45 --- .../cookie_composer.merge_files.json_file.rst | 37 --- .../cookie_composer.merge_files.rst | 52 ---- .../cookie_composer.merge_files.toml_file.rst | 29 -- .../cookie_composer.merge_files.yaml_file.rst | 29 -- .../cookie_composer/cookie_composer.rst | 62 ---- .../cookie_composer.templates.git_repo.rst | 62 ---- .../cookie_composer.templates.rst | 19 -- .../cookie_composer.templates.source.rst | 45 --- .../cookie_composer.templates.types.rst | 221 -------------- ...cookie_composer.templates.zipfile_repo.rst | 61 ---- .../cookie_composer/cookie_composer.utils.rst | 69 ----- docsrc/apidocs/index.rst | 11 - docsrc/changelog.md | 2 - docsrc/cli.rst | 6 - docsrc/conf.py | 95 ------ docsrc/contributing.md | 2 - docsrc/how-to/index.md | 8 - docsrc/index.md | 27 -- docsrc/make.bat | 36 --- docsrc/topic-guides/index.md | 8 - docsrc/tutorial/index.md | 10 - mkdocs.yml | 117 ++++++++ .../python/material/docstring/attributes.html | 90 ++++++ .../python/material/docstring/parameters.html | 98 +++++++ .../python/material/docstring/raises.html | 72 +++++ .../python/material/docstring/returns.html | 94 ++++++ overrides/partials/comments.html | 51 ++++ 83 files changed, 905 insertions(+), 2606 deletions(-) rename {docsrc => docs}/_includes/example-composition.yaml (100%) rename {docsrc => docs}/_includes/interactive-create.txt (100%) rename {docsrc => docs}/_includes/rendered-composition.yaml (100%) rename {docsrc => docs}/_includes/tutorial-composition-1.yaml (100%) rename {docsrc => docs}/_includes/tutorial-composition-2.yaml (100%) rename {docsrc => docs}/_includes/tutorial-composition-3.yaml (100%) create mode 100644 docs/assets/css/cards.css create mode 100644 docs/assets/css/custom.css create mode 100644 docs/assets/css/field-list.css create mode 100644 docs/assets/css/mkdocstrings.css rename {docsrc/_static => docs/assets}/img/authorize-composer.png (100%) rename {docsrc/_static => docs/assets}/img/authorize-done.png (100%) rename {docsrc/_static => docs/assets}/img/composer-logo.svg (100%) rename {docsrc/_static => docs/assets}/img/compositions.png (100%) rename {docsrc/_static => docs/assets}/img/device-activation.png (100%) rename {docsrc/_static => docs/assets}/img/layers.png (100%) rename {docsrc/_static => docs/assets}/img/sandwiches.png (100%) create mode 100644 docs/changelog.md create mode 100644 docs/contributing.md create mode 100755 docs/gen_doc_stubs.py rename {docsrc => docs}/how-to/access-private-templates.md (85%) create mode 100644 docs/how-to/index.md create mode 100644 docs/index.md rename {docsrc => docs}/installation.md (100%) create mode 100644 docs/reference/cli.md rename {docsrc => docs}/topic-guides/composition-files.md (73%) create mode 100644 docs/topic-guides/index.md rename {docsrc => docs}/tutorial/composable-templates.md (100%) rename {docsrc => docs}/tutorial/compositions.md (90%) rename {docsrc => docs}/tutorial/incrementally-layering.md (100%) create mode 100644 docs/tutorial/index.md delete mode 100644 docsrc/Makefile delete mode 100644 docsrc/_static/css/custom.css delete mode 100644 docsrc/_templates/autosummary/base.rst delete mode 100644 docsrc/_templates/autosummary/class.rst delete mode 100644 docsrc/_templates/autosummary/module.rst delete mode 100644 docsrc/api.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.authentication.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.cc_overrides.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.cli.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.commands.add.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.commands.authn.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.commands.create.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.commands.link.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.commands.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.commands.update.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.composition.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.data_merge.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.diff.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.exceptions.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.git_commands.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.io.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.layers.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.matching.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.merge_files.ini_file.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.merge_files.json_file.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.merge_files.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.merge_files.toml_file.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.merge_files.yaml_file.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.templates.git_repo.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.templates.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.templates.source.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.templates.types.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.templates.zipfile_repo.rst delete mode 100644 docsrc/apidocs/cookie_composer/cookie_composer.utils.rst delete mode 100644 docsrc/apidocs/index.rst delete mode 100644 docsrc/changelog.md delete mode 100644 docsrc/cli.rst delete mode 100644 docsrc/conf.py delete mode 100644 docsrc/contributing.md delete mode 100644 docsrc/how-to/index.md delete mode 100644 docsrc/index.md delete mode 100644 docsrc/make.bat delete mode 100644 docsrc/topic-guides/index.md delete mode 100644 docsrc/tutorial/index.md create mode 100644 mkdocs.yml create mode 100644 overrides/mkdocstrings/python/material/docstring/attributes.html create mode 100644 overrides/mkdocstrings/python/material/docstring/parameters.html create mode 100644 overrides/mkdocstrings/python/material/docstring/raises.html create mode 100644 overrides/mkdocstrings/python/material/docstring/returns.html create mode 100644 overrides/partials/comments.html diff --git a/.gitignore b/.gitignore index 70f1629..a95eaf3 100644 --- a/.gitignore +++ b/.gitignore @@ -75,10 +75,6 @@ instance/ # Scrapy stuff: .scrapy -# Sphinx documentation -docsrc/_build/ -docs -docsrc/_autosummary # PyBuilder .pybuilder/ diff --git a/docsrc/_includes/example-composition.yaml b/docs/_includes/example-composition.yaml similarity index 100% rename from docsrc/_includes/example-composition.yaml rename to docs/_includes/example-composition.yaml diff --git a/docsrc/_includes/interactive-create.txt b/docs/_includes/interactive-create.txt similarity index 100% rename from docsrc/_includes/interactive-create.txt rename to docs/_includes/interactive-create.txt diff --git a/docsrc/_includes/rendered-composition.yaml b/docs/_includes/rendered-composition.yaml similarity index 100% rename from docsrc/_includes/rendered-composition.yaml rename to docs/_includes/rendered-composition.yaml diff --git a/docsrc/_includes/tutorial-composition-1.yaml b/docs/_includes/tutorial-composition-1.yaml similarity index 100% rename from docsrc/_includes/tutorial-composition-1.yaml rename to docs/_includes/tutorial-composition-1.yaml diff --git a/docsrc/_includes/tutorial-composition-2.yaml b/docs/_includes/tutorial-composition-2.yaml similarity index 100% rename from docsrc/_includes/tutorial-composition-2.yaml rename to docs/_includes/tutorial-composition-2.yaml diff --git a/docsrc/_includes/tutorial-composition-3.yaml b/docs/_includes/tutorial-composition-3.yaml similarity index 100% rename from docsrc/_includes/tutorial-composition-3.yaml rename to docs/_includes/tutorial-composition-3.yaml diff --git a/docs/assets/css/cards.css b/docs/assets/css/cards.css new file mode 100644 index 0000000..95d2e5c --- /dev/null +++ b/docs/assets/css/cards.css @@ -0,0 +1,200 @@ +/************* + Grid Modification +*/ + +.md-typeset .grid.wide-gap { + gap: 1rem; +} + +/************* + Cards +*/ +.card-container { + background-color: white; + color: rgba(0, 0, 0, 0.87); + border-radius: 4px; + box-shadow: rgba(0, 0, 0, 0.2) 0 2px 1px -1px, rgba(0, 0, 0, 0.14) 0 1px 1px 0, rgba(0, 0, 0, 0.12) 0 1px 3px 0; + overflow: hidden; +} + +.card-container.depth-0 { + box-shadow: none; +} + +/************* + Cards - Header +*/ + +.card-header { + padding: 16px 16px 24px; + background: var(--md-primary-fg-color); + color: var(--md-primary-bg-color); +} + +.card-header.backstage-green { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"), linear-gradient(90deg, rgb(0, 91, 75), rgb(0, 91, 75)); + color: rgb(255, 255, 255); +} + +.card-header.backstage-blue { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='1368' height='400' fill='none'%3e%3cmask id='a' width='1368' height='401' x='0' y='0' maskUnits='userSpaceOnUse'%3e%3cpath fill='url(%23paint0_linear)' d='M437 116C223 116 112 0 112 0h1256v400c-82 0-225-21-282-109-112-175-436-175-649-175z'/%3e%3cpath fill='url(%23paint1_linear)' d='M1368 400V282C891-29 788 40 711 161 608 324 121 372 0 361v39h1368z'/%3e%3cpath fill='url(%23paint2_linear)' d='M1368 244v156H0V94c92-24 198-46 375 0l135 41c176 51 195 109 858 109z'/%3e%3cpath fill='url(%23paint3_linear)' d='M1252 400h116c-14-7-35-14-116-16-663-14-837-128-1013-258l-85-61C98 28 46 8 0 0v400h1252z'/%3e%3c/mask%3e%3cg mask='url(%23a)'%3e%3cpath fill='white' d='M-172-98h1671v601H-172z'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear' x1='602' x2='1093.5' y1='-960.5' y2='272' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear' x1='482' x2='480' y1='1058.5' y2='70.5' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear' x1='424' x2='446.1' y1='-587.5' y2='274.6' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear' x1='587' x2='349' y1='-1120.5' y2='341' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='white'/%3e%3cstop offset='1' stop-color='white' stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"), linear-gradient(90deg, rgb(0, 109, 143), rgb(0, 73, 161)); + color: rgb(255, 255, 255); +} + +.card-header p.subtitle { + margin: 0; + font-size: 0.8em; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-weight: 500; + line-height: 1.57; +} + +.card-header p.title { + margin: 0; + font-size: 1.14em; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-weight: 700; + line-height: 1.6; + margin-bottom: 2px; +} + +/************* + Cards - Media +*/ + +.card-media { + display: block; + background-size: cover; + background-repeat: no-repeat; + background-position: center; + width: 100%; + object-fit: cover; +} + +.card-media p { + margin: 0; +} + +/************* + Cards - Content +*/ + +.card-content { + padding: 16px; +} + +.card-content p { + margin: 0; +} + +.card-content p + p { + margin-top: 1em; +} + +.card-content-title { + margin-top: 0; + font-weight: 400; + font-size: 1.5rem; + line-height: 1.334; + letter-spacing: 0; + margin-bottom: 0.35em; +} + +.card-content-title p { + margin: 0; +} + +/************* + Cards - Actions +*/ + +.card-actions { + padding: 16px; +} + +.card-actions ul:not([hidden]) { + display: flex; + margin: 0; +} + +.card-actions ul { + list-style: none; + padding: 0; + margin: 0; + display: flex; + flex-wrap: wrap; + gap: 16px; +} +.card-actions.right ul { + justify-content: flex-end; +} + +.card-actions p { + margin: 0; +} + +[dir=ltr] .card-actions ul li { + margin: 0; +} + +.card-actions a { + background-color: transparent; + margin-top: 0; + vertical-align: middle; + font-weight: 500; + font-size: 0.8125rem; + line-height: 1.75; + letter-spacing: 0.02857em; + text-transform: uppercase; +} + +/************* + Cards - Tags +*/ + +.card-tags { + display: flex; + flex-wrap: wrap; + box-sizing: border-box; + padding: 16px; +} + +.card-tags ul:not([hidden]) { + display: flex; + margin: 0; +} + +.card-tags ul { + list-style: none; + padding: 0; + margin: 0; + display: flex; + flex-wrap: wrap; + gap: 16px; +} + +[dir=ltr] .card-tags ul li { + padding: 2px 8px; + margin: 0; + box-sizing: border-box; + font-size: 12px; + font-weight: 500; + color: #000; + background-color: rgba(0, 0, 0, 0.12); + border-radius: 16px; + height: 24px; + line-height: 20px; +} + +/************* + Cards - Divider +*/ + +.card-divider { + margin: 0; + padding: 0 16px; +} + +.card-divider hr { + margin: 0; +} diff --git a/docs/assets/css/custom.css b/docs/assets/css/custom.css new file mode 100644 index 0000000..2fc8741 --- /dev/null +++ b/docs/assets/css/custom.css @@ -0,0 +1,12 @@ +/* Indentation. */ +div.doc-contents:not(.first) { + padding-left: 25px; + border-left: .05rem solid var(--md-typeset-table-color); +} + +/* Normal size fonts on parameter tables */ +.md-typeset div.doc-contents table { + font-size: 1em; + width: 100%; + display: table; +} diff --git a/docs/assets/css/field-list.css b/docs/assets/css/field-list.css new file mode 100644 index 0000000..ace471b --- /dev/null +++ b/docs/assets/css/field-list.css @@ -0,0 +1,34 @@ +dl.field-list .doc-param-default, dl.doc-field-list .doc-param-default { + float: none; +} + +.field-list > dl, dl.field-list, dl.doc-field-list { + display: flex; + flex-flow: row wrap; + padding-left: 10px; +} + +.field-list > dl > dt, dl.field-list > dt, dl.doc-field-list > dt { + flex-basis: 20%; + font-weight: bold; + word-break: break-word; + padding: 10px 0; + border-bottom: 1px solid #e5e5e5; +} + +.field-list > dl > dt:after, dl.field-list > dt:after { + content: ":"; +} + +[dir=ltr] .field-list > dl > dd, dl.field-list > dd.doc-field-def, dl.doc-field-list > dd.doc-field-def { + flex-basis: 70%; + flex-grow: 1; + margin: 0; + padding: 10px 0 10px 10px; + border-bottom: 1px solid #e5e5e5; +} + +dd.doc-field-def > p:last-child { + padding-bottom: 0; + margin-bottom: 0; +} diff --git a/docs/assets/css/mkdocstrings.css b/docs/assets/css/mkdocstrings.css new file mode 100644 index 0000000..6288f53 --- /dev/null +++ b/docs/assets/css/mkdocstrings.css @@ -0,0 +1,39 @@ +/* Indentation. */ +div.doc-contents:not(.first) { + padding-left: 25px; + border-left: .05rem solid var(--md-typeset-table-color); +} + +/* Mark external links as such. */ +a.external::after, +a.autorefs-external::after { + /* https://primer.style/octicons/arrow-up-right-24 */ + mask-image: url('data:image/svg+xml,'); + -webkit-mask-image: url('data:image/svg+xml,'); + content: ' '; + + display: inline-block; + vertical-align: middle; + position: relative; + + height: 1em; + width: 1em; + background-color: var(--md-typeset-a-color); +} + +a.external:hover::after, +a.autorefs-external:hover::after { + background-color: var(--md-accent-fg-color); +} + +.doc-param-key, .doc-field-term, .doc-section-head { + font-weight: bold; +} + +.doc.doc-heading { + text-transform: none; +} + +h5.doc-heading, h6.doc-heading { + font-size: 1em; +} diff --git a/docsrc/_static/img/authorize-composer.png b/docs/assets/img/authorize-composer.png similarity index 100% rename from docsrc/_static/img/authorize-composer.png rename to docs/assets/img/authorize-composer.png diff --git a/docsrc/_static/img/authorize-done.png b/docs/assets/img/authorize-done.png similarity index 100% rename from docsrc/_static/img/authorize-done.png rename to docs/assets/img/authorize-done.png diff --git a/docsrc/_static/img/composer-logo.svg b/docs/assets/img/composer-logo.svg similarity index 100% rename from docsrc/_static/img/composer-logo.svg rename to docs/assets/img/composer-logo.svg diff --git a/docsrc/_static/img/compositions.png b/docs/assets/img/compositions.png similarity index 100% rename from docsrc/_static/img/compositions.png rename to docs/assets/img/compositions.png diff --git a/docsrc/_static/img/device-activation.png b/docs/assets/img/device-activation.png similarity index 100% rename from docsrc/_static/img/device-activation.png rename to docs/assets/img/device-activation.png diff --git a/docsrc/_static/img/layers.png b/docs/assets/img/layers.png similarity index 100% rename from docsrc/_static/img/layers.png rename to docs/assets/img/layers.png diff --git a/docsrc/_static/img/sandwiches.png b/docs/assets/img/sandwiches.png similarity index 100% rename from docsrc/_static/img/sandwiches.png rename to docs/assets/img/sandwiches.png diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 0000000..6b23491 --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,6 @@ +--- +comments: true +title: "Changelog" +--- + +{% include-markdown "../CHANGELOG.md" %} diff --git a/docs/contributing.md b/docs/contributing.md new file mode 100644 index 0000000..7c04a4f --- /dev/null +++ b/docs/contributing.md @@ -0,0 +1,6 @@ +--- +comments: true +title: "Contributing" +--- + +{% include-markdown "../CONTRIBUTING.md" rewrite-relative-urls=false %} diff --git a/docs/gen_doc_stubs.py b/docs/gen_doc_stubs.py new file mode 100755 index 0000000..060e4d6 --- /dev/null +++ b/docs/gen_doc_stubs.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python +""" +Generate documentation stubs for the configured package. + +Configuring this script: + + Change the `package_name` variable to the name of the package you want to generate + +Output: + + This script will generate a `reference/api` directory containing documentation stubs for the package. + It will also generate a `reference/api/SUMMARY.md` file that contains the navigation structure for the + documentation. +""" + +from pathlib import Path + +import mkdocs_gen_files + +package_name = "cookie_composer" + +nav = mkdocs_gen_files.Nav() +mod_symbol = '' + +src_root = Path(__file__).parent.parent +package_root = src_root / package_name + +for path in sorted(package_root.rglob("*.py")): + module_path = path.relative_to(src_root).with_suffix("") + doc_path = path.relative_to(src_root).with_suffix(".md") + full_doc_path = Path("reference/api", doc_path) + + parts = tuple(module_path.parts) + if parts[-1] == "__init__": + parts = parts[:-1] + doc_path = doc_path.with_name("index.md") + full_doc_path = full_doc_path.with_name("index.md") + elif parts[-1].startswith("_"): + continue + + nav_parts = [f"{mod_symbol} {part}" for part in parts] + nav[tuple(nav_parts)] = doc_path.as_posix() + + with mkdocs_gen_files.open(full_doc_path, "w") as fd: + ident = ".".join(parts) + fd.write(f"::: {ident}") + + mkdocs_gen_files.set_edit_path(full_doc_path, path) + +with mkdocs_gen_files.open("reference/api/SUMMARY.md", "w") as nav_file: + nav_file.writelines(nav.build_literate_nav()) diff --git a/docsrc/how-to/access-private-templates.md b/docs/how-to/access-private-templates.md similarity index 85% rename from docsrc/how-to/access-private-templates.md rename to docs/how-to/access-private-templates.md index 801fd12..f2c3476 100644 --- a/docsrc/how-to/access-private-templates.md +++ b/docs/how-to/access-private-templates.md @@ -2,9 +2,9 @@ Cookie composer can integrate with some third-party services in order to access private repositories. -```{note} -Currently only GitHub is supported. -``` +!!! note + Currently only GitHub is supported. + ## GitHub @@ -21,19 +21,19 @@ Copy the one-time code (`A25E-0A58` in this example), and press Enter or Return You will arrive at a page similar to this: -![Activate the device](/_static/img/device-activation.png) +![Activate the device](../assets/img/device-activation.png) Paste the code (or enter each character individually) and press the continue button. You will see an authorization page, similar to: -![Authorize cookie-composer](/_static/img/authorize-composer.png) +![Authorize cookie-composer](../assets/img/authorize-composer.png) Press the "Authorize callowayproject" button to allow cookie-composer read-only access to your repositories. Then you will see: -![All done!](/_static/img/authorize-done.png) +![All done!](../assets/img/authorize-done.png) And you can close the browser window. diff --git a/docs/how-to/index.md b/docs/how-to/index.md new file mode 100644 index 0000000..41aba0c --- /dev/null +++ b/docs/how-to/index.md @@ -0,0 +1 @@ +# How To... diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..8641b84 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,8 @@ +# Cookie composer + +{% + include-markdown + "../README.md" + start="" + rewrite-relative-urls=false +%} diff --git a/docsrc/installation.md b/docs/installation.md similarity index 100% rename from docsrc/installation.md rename to docs/installation.md diff --git a/docs/reference/cli.md b/docs/reference/cli.md new file mode 100644 index 0000000..a2b0f66 --- /dev/null +++ b/docs/reference/cli.md @@ -0,0 +1,6 @@ +::: mkdocs-click + :module: cookie_composer.cli + :command: cli + :prog_name: cookie-composer + :style: table + :list_subcommands: true diff --git a/docsrc/topic-guides/composition-files.md b/docs/topic-guides/composition-files.md similarity index 73% rename from docsrc/topic-guides/composition-files.md rename to docs/topic-guides/composition-files.md index f46a4d4..db108fb 100644 --- a/docsrc/topic-guides/composition-files.md +++ b/docs/topic-guides/composition-files.md @@ -4,33 +4,20 @@ Composition files are YAML documents with layer configurations. They are used fo For example, a basic composition file for generating new projects might look like: -```{literalinclude} /_includes/example-composition.yaml ---- -language: yaml -linenos: -name: example-composition-yaml -caption: package-composition.yaml ---- +```python title="Example composition" +--8<-- "example-composition.yaml" ``` When this is used to create a project: -```{literalinclude} /_includes/interactive-create.txt ---- -language: console -name: interactive-create ---- +```console title="An interactive console example" +--8<-- "interactive-create.txt" ``` The composition file saved in the new project (named `my-test-project` in this example) as `.composition.yaml` would look like: -```{literalinclude} /_includes/rendered-composition.yaml ---- -language: yaml -name: rendered-composition-yaml -linenos: -caption: .composition.yaml ---- +```console title="A rendered composition" +--8<-- "rendered-composition.yaml" ``` If you look closely you'll see that `.composition.yaml` contains the contents of `package-composition.yaml`. Internally the `.composition.yaml` file is termed a "rendered composition" because it contains all the parameters used to render this specific project. This rendered composition is used when applying updates of the templates. diff --git a/docs/topic-guides/index.md b/docs/topic-guides/index.md new file mode 100644 index 0000000..9a335ee --- /dev/null +++ b/docs/topic-guides/index.md @@ -0,0 +1 @@ +# Topic Guides diff --git a/docsrc/tutorial/composable-templates.md b/docs/tutorial/composable-templates.md similarity index 100% rename from docsrc/tutorial/composable-templates.md rename to docs/tutorial/composable-templates.md diff --git a/docsrc/tutorial/compositions.md b/docs/tutorial/compositions.md similarity index 90% rename from docsrc/tutorial/compositions.md rename to docs/tutorial/compositions.md index bcd7750..346b189 100644 --- a/docsrc/tutorial/compositions.md +++ b/docs/tutorial/compositions.md @@ -22,13 +22,8 @@ Issues to resolve: A composition is a series of template layers. We can reproduce the results of the [previous tutorial](incrementally-layering.md) using this file: -```{literalinclude} /_includes/tutorial-composition-1.yaml ---- -language: yaml -linenos: -name: tutorial-composition-1-yaml -caption: my-package-composition.yaml ---- +```yaml title="my-package-composition.yaml" +--8<-- "tutorial-composition-1.yaml" ``` We didn't change the default for the `project_slug`, `topics` or `open_source_license` prompts. You don't have to change all the prompts or include all the prompts in the composition. @@ -82,13 +77,8 @@ The composition can also improve the defaults for the template prompts by: Let's start by changing some defaults to the first template. You can find the original prompt in this template's [cookiecutter.json file.](https://github.com/rwxd/cookiecutter-github-project/blob/main/cookiecutter.json) -```{literalinclude} /_includes/tutorial-composition-2.yaml ---- -language: yaml -linenos: -name: tutorial-composition-2-yaml -caption: my-package-composition.yaml ---- +```yaml title="my-package-composition.yaml" +--8<-- "tutorial-composition-2.yaml" ``` The new defaults provide better suggestions based on previous prompt answers. @@ -99,13 +89,8 @@ The second template has several prompts that simply synonymns of promts from the Let's do that. You can find the original prompts in this template's [cookiecutter.json file.](https://github.com/kragniz/cookiecutter-pypackage-minimal/blob/master/cookiecutter.json) -```{literalinclude} /_includes/tutorial-composition-3.yaml ---- -language: yaml -linenos: -name: tutorial-composition-3-yaml -caption: my-package-composition.yaml ---- +```yaml title="my-package-composition.yaml" +--8<-- "tutorial-composition-3.yaml" ``` Now: diff --git a/docsrc/tutorial/incrementally-layering.md b/docs/tutorial/incrementally-layering.md similarity index 100% rename from docsrc/tutorial/incrementally-layering.md rename to docs/tutorial/incrementally-layering.md diff --git a/docs/tutorial/index.md b/docs/tutorial/index.md new file mode 100644 index 0000000..4f50ecc --- /dev/null +++ b/docs/tutorial/index.md @@ -0,0 +1 @@ +# Tutorial diff --git a/docsrc/Makefile b/docsrc/Makefile deleted file mode 100644 index 7ef36e2..0000000 --- a/docsrc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = python -msphinx -SPHINXPROJ = bin_cookie_composer -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docsrc/_static/css/custom.css b/docsrc/_static/css/custom.css deleted file mode 100644 index 65abbe5..0000000 --- a/docsrc/_static/css/custom.css +++ /dev/null @@ -1,11 +0,0 @@ -dt.sig.py > .sig-prename.descclassname { - display: none; -} -.subheading { - line-height: 1.25; - margin-bottom: 0; - color: #646776; -} -.subheading + section > h1 { - margin-top: 0; -} diff --git a/docsrc/_templates/autosummary/base.rst b/docsrc/_templates/autosummary/base.rst deleted file mode 100644 index 3a6f25c..0000000 --- a/docsrc/_templates/autosummary/base.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. rst-class:: subheading - -{{ fullname }} - -{{ objname | escape | underline}} - -.. currentmodule:: {{ module }} - -.. auto{{ objtype }}:: {{ objname }} diff --git a/docsrc/_templates/autosummary/class.rst b/docsrc/_templates/autosummary/class.rst deleted file mode 100644 index f01446b..0000000 --- a/docsrc/_templates/autosummary/class.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. rst-class:: subheading - -{{ fullname }} - -{{ objname | escape | underline}} - -.. currentmodule:: {{ module }} - -.. autoclass:: {{ objname }} - :members: - :undoc-members: diff --git a/docsrc/_templates/autosummary/module.rst b/docsrc/_templates/autosummary/module.rst deleted file mode 100644 index db11e37..0000000 --- a/docsrc/_templates/autosummary/module.rst +++ /dev/null @@ -1,72 +0,0 @@ -.. rst-class:: subheading - -{{ fullname }} - -{{ name | escape | underline}} - -.. currentmodule:: {{ fullname }} - -.. automodule:: {{ fullname }} - {% block attributes %} - {% if attributes %} - .. rubric:: Attributes - - .. autosummary:: - :nosignatures: - {% for item in attributes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block functions %} - {% if functions %} - .. rubric:: Functions - - .. autosummary:: - :nosignatures: - :toctree: {{ name }} - {% for item in functions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block classes %} - {% if classes %} - .. rubric:: Classes - - .. autosummary:: - :nosignatures: - :toctree: {{ name }} - {% for item in classes %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - - {% block exceptions %} - {% if exceptions %} - .. rubric:: Exceptions - - .. autosummary:: - :nosignatures: - :toctree: {{ name }} - {% for item in exceptions %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} - {% block modules -%} - {% if modules %} - - .. rubric:: Modules - - .. autosummary:: - :toctree: {{ name }} - :recursive: - {% for item in modules %} - {{ item }} - {%- endfor %} - {% endif %} - {% endblock %} diff --git a/docsrc/api.rst b/docsrc/api.rst deleted file mode 100644 index d47bf33..0000000 --- a/docsrc/api.rst +++ /dev/null @@ -1,22 +0,0 @@ -API Reference -============= - -.. currentmodule:: cookie_composer - -.. autosummary:: - :toctree: _autosummary - :nosignatures: - :recursive: - - ~commands - ~merge_files - ~authentication - ~cc_overrides - ~composition - ~data_merge - ~diff - ~exceptions - ~git_commands - ~layers - ~matching - ~utils diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.authentication.rst b/docsrc/apidocs/cookie_composer/cookie_composer.authentication.rst deleted file mode 100644 index 171bbb0..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.authentication.rst +++ /dev/null @@ -1,61 +0,0 @@ -:py:mod:`cookie_composer.authentication` -======================================== - -.. py:module:: cookie_composer.authentication - -.. autodoc2-docstring:: cookie_composer.authentication - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`get_hosts_file ` - - .. autodoc2-docstring:: cookie_composer.authentication.get_hosts_file - :summary: - * - :py:obj:`login_to_svc ` - - .. autodoc2-docstring:: cookie_composer.authentication.login_to_svc - :summary: - * - :py:obj:`get_cached_token ` - - .. autodoc2-docstring:: cookie_composer.authentication.get_cached_token - :summary: - * - :py:obj:`add_auth_to_url ` - - .. autodoc2-docstring:: cookie_composer.authentication.add_auth_to_url - :summary: - * - :py:obj:`github_auth_device ` - - .. autodoc2-docstring:: cookie_composer.authentication.github_auth_device - :summary: - -API -~~~ - -.. py:function:: get_hosts_file() -> pathlib.Path - :canonical: cookie_composer.authentication.get_hosts_file - - .. autodoc2-docstring:: cookie_composer.authentication.get_hosts_file - -.. py:function:: login_to_svc(service: typing.Optional[str] = None, protocol: typing.Optional[str] = None, scopes: typing.Optional[str] = None, token: typing.Optional[str] = None) -> str - :canonical: cookie_composer.authentication.login_to_svc - - .. autodoc2-docstring:: cookie_composer.authentication.login_to_svc - -.. py:function:: get_cached_token(account_name: str) -> typing.Optional[str] - :canonical: cookie_composer.authentication.get_cached_token - - .. autodoc2-docstring:: cookie_composer.authentication.get_cached_token - -.. py:function:: add_auth_to_url(url: str) -> str - :canonical: cookie_composer.authentication.add_auth_to_url - - .. autodoc2-docstring:: cookie_composer.authentication.add_auth_to_url - -.. py:function:: github_auth_device(n_polls: int = 9999) -> typing.Optional[str] - :canonical: cookie_composer.authentication.github_auth_device - - .. autodoc2-docstring:: cookie_composer.authentication.github_auth_device diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.cc_overrides.rst b/docsrc/apidocs/cookie_composer/cookie_composer.cc_overrides.rst deleted file mode 100644 index 034d8e0..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.cc_overrides.rst +++ /dev/null @@ -1,102 +0,0 @@ -:py:mod:`cookie_composer.cc_overrides` -====================================== - -.. py:module:: cookie_composer.cc_overrides - -.. autodoc2-docstring:: cookie_composer.cc_overrides - :allowtitles: - -Module Contents ---------------- - -Classes -~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`JsonifyContextExtension ` - - .. autodoc2-docstring:: cookie_composer.cc_overrides.JsonifyContextExtension - :summary: - * - :py:obj:`CustomStrictEnvironment ` - - .. autodoc2-docstring:: cookie_composer.cc_overrides.CustomStrictEnvironment - :summary: - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`jsonify_context ` - - .. autodoc2-docstring:: cookie_composer.cc_overrides.jsonify_context - :summary: - * - :py:obj:`update_extensions ` - - .. autodoc2-docstring:: cookie_composer.cc_overrides.update_extensions - :summary: - * - :py:obj:`prompt_for_config ` - - .. autodoc2-docstring:: cookie_composer.cc_overrides.prompt_for_config - :summary: - * - :py:obj:`_render_dicts ` - - .. autodoc2-docstring:: cookie_composer.cc_overrides._render_dicts - :summary: - * - :py:obj:`_render_simple ` - - .. autodoc2-docstring:: cookie_composer.cc_overrides._render_simple - :summary: - -API -~~~ - -.. py:function:: jsonify_context(value: typing.Any) -> typing.MutableMapping - :canonical: cookie_composer.cc_overrides.jsonify_context - - .. autodoc2-docstring:: cookie_composer.cc_overrides.jsonify_context - -.. py:class:: JsonifyContextExtension(environment: jinja2.Environment) - :canonical: cookie_composer.cc_overrides.JsonifyContextExtension - - Bases: :py:obj:`jinja2.ext.Extension` - - .. autodoc2-docstring:: cookie_composer.cc_overrides.JsonifyContextExtension - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.cc_overrides.JsonifyContextExtension.__init__ - -.. py:class:: CustomStrictEnvironment(**kwargs) - :canonical: cookie_composer.cc_overrides.CustomStrictEnvironment - - Bases: :py:obj:`cookiecutter.environment.StrictEnvironment` - - .. autodoc2-docstring:: cookie_composer.cc_overrides.CustomStrictEnvironment - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.cc_overrides.CustomStrictEnvironment.__init__ - - .. py:method:: _read_extensions(context: typing.MutableMapping[str, typing.Any]) -> typing.List[str] - :canonical: cookie_composer.cc_overrides.CustomStrictEnvironment._read_extensions - - .. autodoc2-docstring:: cookie_composer.cc_overrides.CustomStrictEnvironment._read_extensions - -.. py:function:: update_extensions(existing_config: typing.MutableMapping[str, typing.Any], prompts: typing.MutableMapping[str, typing.Any]) -> typing.List[str] - :canonical: cookie_composer.cc_overrides.update_extensions - - .. autodoc2-docstring:: cookie_composer.cc_overrides.update_extensions - -.. py:function:: prompt_for_config(prompts: dict, aggregated_context: cookie_composer.data_merge.Context, layer_context: typing.Optional[typing.MutableMapping[str, typing.Any]] = None, no_input: bool = False) -> typing.MutableMapping[str, typing.Any] - :canonical: cookie_composer.cc_overrides.prompt_for_config - - .. autodoc2-docstring:: cookie_composer.cc_overrides.prompt_for_config - -.. py:function:: _render_dicts(context: typing.MutableMapping, env: jinja2.Environment, no_input: bool, prompts: dict) -> None - :canonical: cookie_composer.cc_overrides._render_dicts - - .. autodoc2-docstring:: cookie_composer.cc_overrides._render_dicts - -.. py:function:: _render_simple(context: typing.MutableMapping, context_prompts: dict, env: jinja2.Environment, no_input: bool, prompts: dict) -> None - :canonical: cookie_composer.cc_overrides._render_simple - - .. autodoc2-docstring:: cookie_composer.cc_overrides._render_simple diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.cli.rst b/docsrc/apidocs/cookie_composer/cookie_composer.cli.rst deleted file mode 100644 index 0916d62..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.cli.rst +++ /dev/null @@ -1,86 +0,0 @@ -:py:mod:`cookie_composer.cli` -============================= - -.. py:module:: cookie_composer.cli - -.. autodoc2-docstring:: cookie_composer.cli - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`cli ` - - .. autodoc2-docstring:: cookie_composer.cli.cli - :summary: - * - :py:obj:`validate_context_params ` - - .. autodoc2-docstring:: cookie_composer.cli.validate_context_params - :summary: - * - :py:obj:`create ` - - .. autodoc2-docstring:: cookie_composer.cli.create - :summary: - * - :py:obj:`add ` - - .. autodoc2-docstring:: cookie_composer.cli.add - :summary: - * - :py:obj:`update ` - - .. autodoc2-docstring:: cookie_composer.cli.update - :summary: - * - :py:obj:`link ` - - .. autodoc2-docstring:: cookie_composer.cli.link - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.cli.logger - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.cli.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.cli.logger - -.. py:function:: cli() -> None - :canonical: cookie_composer.cli.cli - - .. autodoc2-docstring:: cookie_composer.cli.cli - -.. py:function:: validate_context_params(ctx: typing.Any, param: typing.Any, value: list) -> typing.Optional[collections.OrderedDict] - :canonical: cookie_composer.cli.validate_context_params - - .. autodoc2-docstring:: cookie_composer.cli.validate_context_params - -.. py:function:: create(no_input: bool, checkout: str, directory: str, overwrite_if_exists: bool, skip_if_file_exists: bool, default_config: bool, destination: pathlib.Path, accept_hooks: str, path_or_url: str, context_params: typing.Optional[typing.MutableMapping[str, typing.Any]] = None) -> None - :canonical: cookie_composer.cli.create - - .. autodoc2-docstring:: cookie_composer.cli.create - -.. py:function:: add(no_input: bool, checkout: str, directory: str, overwrite_if_exists: bool, skip_if_file_exists: bool, default_config: bool, destination: pathlib.Path, accept_hooks: str, path_or_url: str, context_params: typing.Optional[typing.MutableMapping[str, typing.Any]] = None) -> None - :canonical: cookie_composer.cli.add - - .. autodoc2-docstring:: cookie_composer.cli.add - -.. py:function:: update(no_input: bool, destination: pathlib.Path, context_params: typing.Optional[collections.OrderedDict] = None) -> None - :canonical: cookie_composer.cli.update - - .. autodoc2-docstring:: cookie_composer.cli.update - -.. py:function:: link(no_input: bool, checkout: str, directory: str, overwrite_if_exists: bool, skip_if_file_exists: bool, default_config: bool, destination: typing.Optional[pathlib.Path], path_or_url: str, context_params: typing.Optional[typing.MutableMapping[str, typing.Any]] = None) -> None - :canonical: cookie_composer.cli.link - - .. autodoc2-docstring:: cookie_composer.cli.link diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.commands.add.rst b/docsrc/apidocs/cookie_composer/cookie_composer.commands.add.rst deleted file mode 100644 index c26524f..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.commands.add.rst +++ /dev/null @@ -1,46 +0,0 @@ -:py:mod:`cookie_composer.commands.add` -====================================== - -.. py:module:: cookie_composer.commands.add - -.. autodoc2-docstring:: cookie_composer.commands.add - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`add_cmd ` - - .. autodoc2-docstring:: cookie_composer.commands.add.add_cmd - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.commands.add.logger - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.commands.add.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.commands.add.logger - -.. py:function:: add_cmd(path_or_url: str, destination_dir: typing.Optional[pathlib.Path] = None, no_input: bool = False, checkout: typing.Optional[str] = None, directory: typing.Optional[str] = None, overwrite_if_exists: bool = False, skip_if_file_exists: bool = False, default_config: bool = False, accept_hooks: str = 'all', initial_context: typing.Optional[typing.MutableMapping[str, typing.Any]] = None) -> None - :canonical: cookie_composer.commands.add.add_cmd - - .. autodoc2-docstring:: cookie_composer.commands.add.add_cmd diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.commands.authn.rst b/docsrc/apidocs/cookie_composer/cookie_composer.commands.authn.rst deleted file mode 100644 index 25d1d71..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.commands.authn.rst +++ /dev/null @@ -1,45 +0,0 @@ -:py:mod:`cookie_composer.commands.authn` -======================================== - -.. py:module:: cookie_composer.commands.authn - -.. autodoc2-docstring:: cookie_composer.commands.authn - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`auth ` - - .. autodoc2-docstring:: cookie_composer.commands.authn.auth - :summary: - * - :py:obj:`login ` - - .. autodoc2-docstring:: cookie_composer.commands.authn.login - :summary: - * - :py:obj:`token ` - - .. autodoc2-docstring:: cookie_composer.commands.authn.token - :summary: - -API -~~~ - -.. py:function:: auth() -> None - :canonical: cookie_composer.commands.authn.auth - - .. autodoc2-docstring:: cookie_composer.commands.authn.auth - -.. py:function:: login(git_protocol: str, service: str, scopes: str, with_token: rich_click.File) -> None - :canonical: cookie_composer.commands.authn.login - - .. autodoc2-docstring:: cookie_composer.commands.authn.login - -.. py:function:: token(service: str) -> None - :canonical: cookie_composer.commands.authn.token - - .. autodoc2-docstring:: cookie_composer.commands.authn.token diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.commands.create.rst b/docsrc/apidocs/cookie_composer/cookie_composer.commands.create.rst deleted file mode 100644 index ab3e4fe..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.commands.create.rst +++ /dev/null @@ -1,46 +0,0 @@ -:py:mod:`cookie_composer.commands.create` -========================================= - -.. py:module:: cookie_composer.commands.create - -.. autodoc2-docstring:: cookie_composer.commands.create - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`create_cmd ` - - .. autodoc2-docstring:: cookie_composer.commands.create.create_cmd - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.commands.create.logger - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.commands.create.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.commands.create.logger - -.. py:function:: create_cmd(path_or_url: str, output_dir: typing.Optional[pathlib.Path] = None, no_input: bool = False, checkout: typing.Optional[str] = None, directory: typing.Optional[str] = None, overwrite_if_exists: bool = False, skip_if_file_exists: bool = False, default_config: bool = False, accept_hooks: str = 'all', initial_context: typing.Optional[typing.MutableMapping[str, typing.Any]] = None) -> pathlib.Path - :canonical: cookie_composer.commands.create.create_cmd - - .. autodoc2-docstring:: cookie_composer.commands.create.create_cmd diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.commands.link.rst b/docsrc/apidocs/cookie_composer/cookie_composer.commands.link.rst deleted file mode 100644 index 9b26aec..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.commands.link.rst +++ /dev/null @@ -1,29 +0,0 @@ -:py:mod:`cookie_composer.commands.link` -======================================= - -.. py:module:: cookie_composer.commands.link - -.. autodoc2-docstring:: cookie_composer.commands.link - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`link_cmd ` - - .. autodoc2-docstring:: cookie_composer.commands.link.link_cmd - :summary: - -API -~~~ - -.. py:function:: link_cmd(path_or_url: str, destination_dir: typing.Optional[pathlib.Path] = None, no_input: bool = False, checkout: typing.Optional[str] = None, directory: typing.Optional[str] = None, overwrite_if_exists: bool = False, skip_if_file_exists: bool = False, default_config: bool = False, initial_context: typing.Optional[typing.MutableMapping[str, typing.Any]] = None) -> None - :canonical: cookie_composer.commands.link.link_cmd - - .. autodoc2-docstring:: cookie_composer.commands.link.link_cmd diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.commands.rst b/docsrc/apidocs/cookie_composer/cookie_composer.commands.rst deleted file mode 100644 index db0f6da..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.commands.rst +++ /dev/null @@ -1,20 +0,0 @@ -:py:mod:`cookie_composer.commands` -================================== - -.. py:module:: cookie_composer.commands - -.. autodoc2-docstring:: cookie_composer.commands - :allowtitles: - -Submodules ----------- - -.. toctree:: - :titlesonly: - :maxdepth: 1 - - cookie_composer.commands.update - cookie_composer.commands.link - cookie_composer.commands.add - cookie_composer.commands.create - cookie_composer.commands.authn diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.commands.update.rst b/docsrc/apidocs/cookie_composer/cookie_composer.commands.update.rst deleted file mode 100644 index 18003a5..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.commands.update.rst +++ /dev/null @@ -1,37 +0,0 @@ -:py:mod:`cookie_composer.commands.update` -========================================= - -.. py:module:: cookie_composer.commands.update - -.. autodoc2-docstring:: cookie_composer.commands.update - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`update_cmd ` - - .. autodoc2-docstring:: cookie_composer.commands.update.update_cmd - :summary: - * - :py:obj:`update_rendered_composition_layers ` - - .. autodoc2-docstring:: cookie_composer.commands.update.update_rendered_composition_layers - :summary: - -API -~~~ - -.. py:function:: update_cmd(project_dir: typing.Optional[pathlib.Path] = None, no_input: bool = False) -> None - :canonical: cookie_composer.commands.update.update_cmd - - .. autodoc2-docstring:: cookie_composer.commands.update.update_cmd - -.. py:function:: update_rendered_composition_layers(base: cookie_composer.composition.RenderedComposition, updated_layers: typing.List[cookie_composer.layers.RenderedLayer]) -> cookie_composer.composition.RenderedComposition - :canonical: cookie_composer.commands.update.update_rendered_composition_layers - - .. autodoc2-docstring:: cookie_composer.commands.update.update_rendered_composition_layers diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.composition.rst b/docsrc/apidocs/cookie_composer/cookie_composer.composition.rst deleted file mode 100644 index f0f5846..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.composition.rst +++ /dev/null @@ -1,100 +0,0 @@ -:py:mod:`cookie_composer.composition` -===================================== - -.. py:module:: cookie_composer.composition - -.. autodoc2-docstring:: cookie_composer.composition - :allowtitles: - -Module Contents ---------------- - -Classes -~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`Composition ` - - .. autodoc2-docstring:: cookie_composer.composition.Composition - :summary: - * - :py:obj:`RenderedComposition ` - - .. autodoc2-docstring:: cookie_composer.composition.RenderedComposition - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.composition.logger - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.composition.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.composition.logger - -.. py:class:: Composition(**data: typing.Any) - :canonical: cookie_composer.composition.Composition - - Bases: :py:obj:`pydantic.BaseModel` - - .. autodoc2-docstring:: cookie_composer.composition.Composition - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.composition.Composition.__init__ - - .. py:attribute:: layers - :canonical: cookie_composer.composition.Composition.layers - :type: typing.List[cookie_composer.layers.LayerConfig] - :value: None - - .. autodoc2-docstring:: cookie_composer.composition.Composition.layers - -.. py:class:: RenderedComposition(**data: typing.Any) - :canonical: cookie_composer.composition.RenderedComposition - - Bases: :py:obj:`pydantic.BaseModel` - - .. autodoc2-docstring:: cookie_composer.composition.RenderedComposition - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.composition.RenderedComposition.__init__ - - .. py:attribute:: layers - :canonical: cookie_composer.composition.RenderedComposition.layers - :type: typing.List[cookie_composer.layers.RenderedLayer] - :value: None - - .. autodoc2-docstring:: cookie_composer.composition.RenderedComposition.layers - - .. py:attribute:: render_dir - :canonical: cookie_composer.composition.RenderedComposition.render_dir - :type: pydantic.DirectoryPath - :value: None - - .. autodoc2-docstring:: cookie_composer.composition.RenderedComposition.render_dir - - .. py:attribute:: rendered_name - :canonical: cookie_composer.composition.RenderedComposition.rendered_name - :type: str - :value: None - - .. autodoc2-docstring:: cookie_composer.composition.RenderedComposition.rendered_name - - .. py:property:: layer_names - :canonical: cookie_composer.composition.RenderedComposition.layer_names - :type: typing.List[str] - - .. autodoc2-docstring:: cookie_composer.composition.RenderedComposition.layer_names diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.data_merge.rst b/docsrc/apidocs/cookie_composer/cookie_composer.data_merge.rst deleted file mode 100644 index 4b15f0d..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.data_merge.rst +++ /dev/null @@ -1,147 +0,0 @@ -:py:mod:`cookie_composer.data_merge` -==================================== - -.. py:module:: cookie_composer.data_merge - -.. autodoc2-docstring:: cookie_composer.data_merge - :allowtitles: - -Module Contents ---------------- - -Classes -~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`Context ` - - .. autodoc2-docstring:: cookie_composer.data_merge.Context - :summary: - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`deep_merge ` - - .. autodoc2-docstring:: cookie_composer.data_merge.deep_merge - :summary: - * - :py:obj:`merge_iterables ` - - .. autodoc2-docstring:: cookie_composer.data_merge.merge_iterables - :summary: - * - :py:obj:`comprehensive_merge ` - - .. autodoc2-docstring:: cookie_composer.data_merge.comprehensive_merge - :summary: - * - :py:obj:`freeze_data ` - - .. autodoc2-docstring:: cookie_composer.data_merge.freeze_data - :summary: - * - :py:obj:`get_merge_strategy ` - - .. autodoc2-docstring:: cookie_composer.data_merge.get_merge_strategy - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.data_merge.logger - :summary: - * - :py:obj:`DO_NOT_MERGE ` - - .. autodoc2-docstring:: cookie_composer.data_merge.DO_NOT_MERGE - :summary: - * - :py:obj:`NESTED_OVERWRITE ` - - .. autodoc2-docstring:: cookie_composer.data_merge.NESTED_OVERWRITE - :summary: - * - :py:obj:`OVERWRITE ` - - .. autodoc2-docstring:: cookie_composer.data_merge.OVERWRITE - :summary: - * - :py:obj:`COMPREHENSIVE ` - - .. autodoc2-docstring:: cookie_composer.data_merge.COMPREHENSIVE - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.data_merge.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.data_merge.logger - -.. py:function:: deep_merge(*dicts: dict) -> dict - :canonical: cookie_composer.data_merge.deep_merge - - .. autodoc2-docstring:: cookie_composer.data_merge.deep_merge - -.. py:function:: merge_iterables(iter1: typing.Iterable, iter2: typing.Iterable) -> set - :canonical: cookie_composer.data_merge.merge_iterables - - .. autodoc2-docstring:: cookie_composer.data_merge.merge_iterables - -.. py:function:: comprehensive_merge(*args: typing.MutableMapping) -> typing.Any - :canonical: cookie_composer.data_merge.comprehensive_merge - - .. autodoc2-docstring:: cookie_composer.data_merge.comprehensive_merge - -.. py:class:: Context(*maps) - :canonical: cookie_composer.data_merge.Context - - Bases: :py:obj:`collections.ChainMap` - - .. autodoc2-docstring:: cookie_composer.data_merge.Context - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.data_merge.Context.__init__ - - .. py:property:: is_empty - :canonical: cookie_composer.data_merge.Context.is_empty - :type: bool - - .. autodoc2-docstring:: cookie_composer.data_merge.Context.is_empty - - .. py:method:: flatten() -> typing.MutableMapping - :canonical: cookie_composer.data_merge.Context.flatten - - .. autodoc2-docstring:: cookie_composer.data_merge.Context.flatten - -.. py:function:: freeze_data(obj: typing.Any) -> typing.Any - :canonical: cookie_composer.data_merge.freeze_data - - .. autodoc2-docstring:: cookie_composer.data_merge.freeze_data - -.. py:data:: DO_NOT_MERGE - :canonical: cookie_composer.data_merge.DO_NOT_MERGE - :value: 'do-not-merge' - - .. autodoc2-docstring:: cookie_composer.data_merge.DO_NOT_MERGE - -.. py:data:: NESTED_OVERWRITE - :canonical: cookie_composer.data_merge.NESTED_OVERWRITE - :value: 'nested-overwrite' - - .. autodoc2-docstring:: cookie_composer.data_merge.NESTED_OVERWRITE - -.. py:data:: OVERWRITE - :canonical: cookie_composer.data_merge.OVERWRITE - :value: 'overwrite' - - .. autodoc2-docstring:: cookie_composer.data_merge.OVERWRITE - -.. py:data:: COMPREHENSIVE - :canonical: cookie_composer.data_merge.COMPREHENSIVE - :value: 'comprehensive' - - .. autodoc2-docstring:: cookie_composer.data_merge.COMPREHENSIVE - -.. py:function:: get_merge_strategy(path: pathlib.Path, merge_strategies: typing.Dict[str, str]) -> str - :canonical: cookie_composer.data_merge.get_merge_strategy - - .. autodoc2-docstring:: cookie_composer.data_merge.get_merge_strategy diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.diff.rst b/docsrc/apidocs/cookie_composer/cookie_composer.diff.rst deleted file mode 100644 index 132082d..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.diff.rst +++ /dev/null @@ -1,79 +0,0 @@ -:py:mod:`cookie_composer.diff` -============================== - -.. py:module:: cookie_composer.diff - -.. autodoc2-docstring:: cookie_composer.diff - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`_git_diff_command ` - - .. autodoc2-docstring:: cookie_composer.diff._git_diff_command - :summary: - * - :py:obj:`get_diff ` - - .. autodoc2-docstring:: cookie_composer.diff.get_diff - :summary: - * - :py:obj:`replace_diff_prefixes ` - - .. autodoc2-docstring:: cookie_composer.diff.replace_diff_prefixes - :summary: - * - :py:obj:`display_diff ` - - .. autodoc2-docstring:: cookie_composer.diff.display_diff - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`DIFF_SRC_PREFIX ` - - .. autodoc2-docstring:: cookie_composer.diff.DIFF_SRC_PREFIX - :summary: - * - :py:obj:`DIFF_DST_PREFIX ` - - .. autodoc2-docstring:: cookie_composer.diff.DIFF_DST_PREFIX - :summary: - -API -~~~ - -.. py:data:: DIFF_SRC_PREFIX - :canonical: cookie_composer.diff.DIFF_SRC_PREFIX - :value: 'upstream-template-old' - - .. autodoc2-docstring:: cookie_composer.diff.DIFF_SRC_PREFIX - -.. py:data:: DIFF_DST_PREFIX - :canonical: cookie_composer.diff.DIFF_DST_PREFIX - :value: 'upstream-template-new' - - .. autodoc2-docstring:: cookie_composer.diff.DIFF_DST_PREFIX - -.. py:function:: _git_diff_command(*args: str) -> typing.List[str] - :canonical: cookie_composer.diff._git_diff_command - - .. autodoc2-docstring:: cookie_composer.diff._git_diff_command - -.. py:function:: get_diff(repo0: pathlib.Path, repo1: pathlib.Path) -> str - :canonical: cookie_composer.diff.get_diff - - .. autodoc2-docstring:: cookie_composer.diff.get_diff - -.. py:function:: replace_diff_prefixes(diff: str, repo0_path: str, repo1_path: str) -> str - :canonical: cookie_composer.diff.replace_diff_prefixes - - .. autodoc2-docstring:: cookie_composer.diff.replace_diff_prefixes - -.. py:function:: display_diff(repo0: pathlib.Path, repo1: pathlib.Path) -> None - :canonical: cookie_composer.diff.display_diff - - .. autodoc2-docstring:: cookie_composer.diff.display_diff diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.exceptions.rst b/docsrc/apidocs/cookie_composer/cookie_composer.exceptions.rst deleted file mode 100644 index 2669364..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.exceptions.rst +++ /dev/null @@ -1,101 +0,0 @@ -:py:mod:`cookie_composer.exceptions` -==================================== - -.. py:module:: cookie_composer.exceptions - -.. autodoc2-docstring:: cookie_composer.exceptions - :allowtitles: - -Module Contents ---------------- - -API -~~~ - -.. py:exception:: MissingCompositionFileError(path_or_url: str) - :canonical: cookie_composer.exceptions.MissingCompositionFileError - - Bases: :py:obj:`Exception` - - .. autodoc2-docstring:: cookie_composer.exceptions.MissingCompositionFileError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.MissingCompositionFileError.__init__ - -.. py:exception:: MergeError(origin: typing.Optional[str] = None, destination: typing.Optional[str] = None, strategy: typing.Optional[str] = None, error_message: typing.Optional[str] = '') - :canonical: cookie_composer.exceptions.MergeError - - Bases: :py:obj:`Exception` - - .. autodoc2-docstring:: cookie_composer.exceptions.MergeError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.MergeError.__init__ - -.. py:exception:: GitError() - :canonical: cookie_composer.exceptions.GitError - - Bases: :py:obj:`Exception` - - .. autodoc2-docstring:: cookie_composer.exceptions.GitError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.GitError.__init__ - -.. py:exception:: ChangesetUnicodeError() - :canonical: cookie_composer.exceptions.ChangesetUnicodeError - - Bases: :py:obj:`Exception` - - .. autodoc2-docstring:: cookie_composer.exceptions.ChangesetUnicodeError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.ChangesetUnicodeError.__init__ - -.. py:exception:: InvalidZipRepositoryError(message: str = '') - :canonical: cookie_composer.exceptions.InvalidZipRepositoryError - - Bases: :py:obj:`Exception` - - .. autodoc2-docstring:: cookie_composer.exceptions.InvalidZipRepositoryError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.InvalidZipRepositoryError.__init__ - -.. py:exception:: EmptyZipRepositoryError(url: str) - :canonical: cookie_composer.exceptions.EmptyZipRepositoryError - - Bases: :py:obj:`cookie_composer.exceptions.InvalidZipRepositoryError` - - .. autodoc2-docstring:: cookie_composer.exceptions.EmptyZipRepositoryError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.EmptyZipRepositoryError.__init__ - -.. py:exception:: NoZipDirectoryError(url: str) - :canonical: cookie_composer.exceptions.NoZipDirectoryError - - Bases: :py:obj:`cookie_composer.exceptions.InvalidZipRepositoryError` - - .. autodoc2-docstring:: cookie_composer.exceptions.NoZipDirectoryError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.NoZipDirectoryError.__init__ - -.. py:exception:: InvalidZipPasswordError() - :canonical: cookie_composer.exceptions.InvalidZipPasswordError - - Bases: :py:obj:`cookie_composer.exceptions.InvalidZipRepositoryError` - - .. autodoc2-docstring:: cookie_composer.exceptions.InvalidZipPasswordError - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.exceptions.InvalidZipPasswordError.__init__ diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.git_commands.rst b/docsrc/apidocs/cookie_composer/cookie_composer.git_commands.rst deleted file mode 100644 index 050e577..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.git_commands.rst +++ /dev/null @@ -1,124 +0,0 @@ -:py:mod:`cookie_composer.git_commands` -====================================== - -.. py:module:: cookie_composer.git_commands - -.. autodoc2-docstring:: cookie_composer.git_commands - :allowtitles: - -Module Contents ---------------- - -Classes -~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`TempGitWorktreeDir ` - - .. autodoc2-docstring:: cookie_composer.git_commands.TempGitWorktreeDir - :summary: - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`get_repo ` - - .. autodoc2-docstring:: cookie_composer.git_commands.get_repo - :summary: - * - :py:obj:`clone ` - - .. autodoc2-docstring:: cookie_composer.git_commands.clone - :summary: - * - :py:obj:`branch_exists ` - - .. autodoc2-docstring:: cookie_composer.git_commands.branch_exists - :summary: - * - :py:obj:`remote_branch_exists ` - - .. autodoc2-docstring:: cookie_composer.git_commands.remote_branch_exists - :summary: - * - :py:obj:`checkout_ref ` - - .. autodoc2-docstring:: cookie_composer.git_commands.checkout_ref - :summary: - * - :py:obj:`checkout_branch ` - - .. autodoc2-docstring:: cookie_composer.git_commands.checkout_branch - :summary: - * - :py:obj:`apply_patch ` - - .. autodoc2-docstring:: cookie_composer.git_commands.apply_patch - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.git_commands.logger - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.git_commands.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.git_commands.logger - -.. py:function:: get_repo(project_dir: typing.Union[str, pathlib.Path], search_parent_directories: bool = False, ensure_clean: bool = False) -> git.Repo - :canonical: cookie_composer.git_commands.get_repo - - .. autodoc2-docstring:: cookie_composer.git_commands.get_repo - -.. py:function:: clone(repo_url: str, dest_path: typing.Optional[pathlib.Path] = None) -> git.Repo - :canonical: cookie_composer.git_commands.clone - - .. autodoc2-docstring:: cookie_composer.git_commands.clone - -.. py:function:: branch_exists(repo: git.Repo, branch_name: str) -> bool - :canonical: cookie_composer.git_commands.branch_exists - - .. autodoc2-docstring:: cookie_composer.git_commands.branch_exists - -.. py:function:: remote_branch_exists(repo: git.Repo, branch_name: str, remote_name: str = 'origin') -> bool - :canonical: cookie_composer.git_commands.remote_branch_exists - - .. autodoc2-docstring:: cookie_composer.git_commands.remote_branch_exists - -.. py:function:: checkout_ref(repo: git.Repo, ref: str) -> None - :canonical: cookie_composer.git_commands.checkout_ref - - .. autodoc2-docstring:: cookie_composer.git_commands.checkout_ref - -.. py:function:: checkout_branch(repo: git.Repo, branch_name: str, remote_name: str = 'origin') -> None - :canonical: cookie_composer.git_commands.checkout_branch - - .. autodoc2-docstring:: cookie_composer.git_commands.checkout_branch - -.. py:function:: apply_patch(repo: git.Repo, diff: str) -> None - :canonical: cookie_composer.git_commands.apply_patch - - .. autodoc2-docstring:: cookie_composer.git_commands.apply_patch - -.. py:class:: TempGitWorktreeDir(worktree_path: pathlib.Path, repo_path: pathlib.Path, branch: str = 'master') - :canonical: cookie_composer.git_commands.TempGitWorktreeDir - - .. autodoc2-docstring:: cookie_composer.git_commands.TempGitWorktreeDir - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.git_commands.TempGitWorktreeDir.__init__ - - .. py:method:: __enter__() - :canonical: cookie_composer.git_commands.TempGitWorktreeDir.__enter__ - - .. autodoc2-docstring:: cookie_composer.git_commands.TempGitWorktreeDir.__enter__ - - .. py:method:: __exit__(type, value, traceback) - :canonical: cookie_composer.git_commands.TempGitWorktreeDir.__exit__ - - .. autodoc2-docstring:: cookie_composer.git_commands.TempGitWorktreeDir.__exit__ diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.io.rst b/docsrc/apidocs/cookie_composer/cookie_composer.io.rst deleted file mode 100644 index a9ac501..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.io.rst +++ /dev/null @@ -1,141 +0,0 @@ -:py:mod:`cookie_composer.io` -============================ - -.. py:module:: cookie_composer.io - -.. autodoc2-docstring:: cookie_composer.io - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`serialize_layer ` - - .. autodoc2-docstring:: cookie_composer.io.serialize_layer - :summary: - * - :py:obj:`deserialize_layer ` - - .. autodoc2-docstring:: cookie_composer.io.deserialize_layer - :summary: - * - :py:obj:`serialize_rendered_layer ` - - .. autodoc2-docstring:: cookie_composer.io.serialize_rendered_layer - :summary: - * - :py:obj:`deserialize_rendered_layer ` - - .. autodoc2-docstring:: cookie_composer.io.deserialize_rendered_layer - :summary: - * - :py:obj:`serialize_composition ` - - .. autodoc2-docstring:: cookie_composer.io.serialize_composition - :summary: - * - :py:obj:`deserialize_composition ` - - .. autodoc2-docstring:: cookie_composer.io.deserialize_composition - :summary: - * - :py:obj:`serialize_rendered_composition ` - - .. autodoc2-docstring:: cookie_composer.io.serialize_rendered_composition - :summary: - * - :py:obj:`deserialize_rendered_composition ` - - .. autodoc2-docstring:: cookie_composer.io.deserialize_rendered_composition - :summary: - * - :py:obj:`read_yaml ` - - .. autodoc2-docstring:: cookie_composer.io.read_yaml - :summary: - * - :py:obj:`write_yaml ` - - .. autodoc2-docstring:: cookie_composer.io.write_yaml - :summary: - * - :py:obj:`is_composition_file ` - - .. autodoc2-docstring:: cookie_composer.io.is_composition_file - :summary: - * - :py:obj:`read_composition ` - - .. autodoc2-docstring:: cookie_composer.io.read_composition - :summary: - * - :py:obj:`read_rendered_composition ` - - .. autodoc2-docstring:: cookie_composer.io.read_rendered_composition - :summary: - * - :py:obj:`write_rendered_composition ` - - .. autodoc2-docstring:: cookie_composer.io.write_rendered_composition - :summary: - * - :py:obj:`get_composition_from_path_or_url ` - - .. autodoc2-docstring:: cookie_composer.io.get_composition_from_path_or_url - :summary: - -API -~~~ - -.. py:function:: serialize_layer(layer: cookie_composer.layers.LayerConfig) -> dict - :canonical: cookie_composer.io.serialize_layer - - .. autodoc2-docstring:: cookie_composer.io.serialize_layer - -.. py:function:: deserialize_layer(layer_info: dict, local_path: typing.Optional[pathlib.Path] = None, **kwargs) -> cookie_composer.layers.LayerConfig - :canonical: cookie_composer.io.deserialize_layer - - .. autodoc2-docstring:: cookie_composer.io.deserialize_layer - -.. py:function:: serialize_rendered_layer(rendered_layer: cookie_composer.layers.RenderedLayer) -> dict - :canonical: cookie_composer.io.serialize_rendered_layer - - .. autodoc2-docstring:: cookie_composer.io.serialize_rendered_layer - -.. py:function:: deserialize_rendered_layer(rendered_layer_info: dict, location: pathlib.Path) -> cookie_composer.layers.RenderedLayer - :canonical: cookie_composer.io.deserialize_rendered_layer - - .. autodoc2-docstring:: cookie_composer.io.deserialize_rendered_layer - -.. py:function:: serialize_composition(layers: typing.List[cookie_composer.layers.LayerConfig]) -> typing.List[dict] - :canonical: cookie_composer.io.serialize_composition - - .. autodoc2-docstring:: cookie_composer.io.serialize_composition - -.. py:function:: deserialize_composition(composition_info: typing.List[dict], local_path: typing.Optional[pathlib.Path] = None, **kwargs) -> cookie_composer.composition.Composition - :canonical: cookie_composer.io.deserialize_composition - - .. autodoc2-docstring:: cookie_composer.io.deserialize_composition - -.. py:function:: serialize_rendered_composition(composition: cookie_composer.composition.RenderedComposition) -> typing.List[dict] - :canonical: cookie_composer.io.serialize_rendered_composition - - .. autodoc2-docstring:: cookie_composer.io.serialize_rendered_composition - -.. py:function:: deserialize_rendered_composition(composition_info: typing.List[dict], location: pathlib.Path) -> cookie_composer.composition.RenderedComposition - :canonical: cookie_composer.io.deserialize_rendered_composition - - .. autodoc2-docstring:: cookie_composer.io.deserialize_rendered_composition - -.. py:function:: read_yaml(path_or_url: typing.Union[str, pathlib.Path]) -> typing.List[dict] - :canonical: cookie_composer.io.read_yaml - - .. autodoc2-docstring:: cookie_composer.io.read_yaml - -.. py:function:: write_yaml(path: pathlib.Path, contents: typing.List[dict]) -> None - :canonical: cookie_composer.io.write_yaml - - .. autodoc2-docstring:: cookie_composer.io.write_yaml - -.. py:function:: is_composition_file(path_or_url: typing.Union[str, pathlib.Path]) -> bool - :canonical: cookie_composer.io.is_composition_file - - .. autodoc2-docstring:: cookie_composer.io.is_composition_file - -.. py:function:: read_composition(path_or_url: typing.Union[str, pathlib.Path], **kwargs) -> cookie_composer.composition.Composition - :canonical: cookie_composer.io.read_composition - - .. autodoc2-docstring:: cookie_composer.io.read_composition - -.. py:function:: read_rendered_composition(path: pathlib.Path) -> cookie_composer.composition.RenderedComposition - :canonical: cookie_composer.io.read_rendered_composition - - .. autodoc2-docstring:: cookie_composer.io.read_rendered_composition - -.. py:function:: write_rendered_composition(composition: cookie_composer.composition.RenderedComposition) -> None - :canonical: cookie_composer.io.write_rendered_composition - - .. autodoc2-docstring:: cookie_composer.io.write_rendered_composition - -.. py:function:: get_composition_from_path_or_url(path_or_url: str, checkout: typing.Optional[str] = None, default_config: bool = False, directory: typing.Optional[str] = None, no_input: bool = False, output_dir: typing.Optional[pathlib.Path] = None, overwrite_if_exists: bool = False, skip_if_file_exists: bool = False, initial_context: typing.Optional[typing.MutableMapping[str, typing.Any]] = None) -> cookie_composer.composition.Composition - :canonical: cookie_composer.io.get_composition_from_path_or_url - - .. autodoc2-docstring:: cookie_composer.io.get_composition_from_path_or_url diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.layers.rst b/docsrc/apidocs/cookie_composer/cookie_composer.layers.rst deleted file mode 100644 index 519779d..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.layers.rst +++ /dev/null @@ -1,274 +0,0 @@ -:py:mod:`cookie_composer.layers` -================================ - -.. py:module:: cookie_composer.layers - -.. autodoc2-docstring:: cookie_composer.layers - :allowtitles: - -Module Contents ---------------- - -Classes -~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`WriteStrategy ` - - .. autodoc2-docstring:: cookie_composer.layers.WriteStrategy - :summary: - * - :py:obj:`LayerConfig ` - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig - :summary: - * - :py:obj:`RenderedLayer ` - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer - :summary: - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`get_write_strategy ` - - .. autodoc2-docstring:: cookie_composer.layers.get_write_strategy - :summary: - * - :py:obj:`get_template_rendered_name ` - - .. autodoc2-docstring:: cookie_composer.layers.get_template_rendered_name - :summary: - * - :py:obj:`render_layer ` - - .. autodoc2-docstring:: cookie_composer.layers.render_layer - :summary: - * - :py:obj:`get_layer_context ` - - .. autodoc2-docstring:: cookie_composer.layers.get_layer_context - :summary: - * - :py:obj:`render_layers ` - - .. autodoc2-docstring:: cookie_composer.layers.render_layers - :summary: - * - :py:obj:`get_accept_hooks_per_layer ` - - .. autodoc2-docstring:: cookie_composer.layers.get_accept_hooks_per_layer - :summary: - * - :py:obj:`merge_layers ` - - .. autodoc2-docstring:: cookie_composer.layers.merge_layers - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.layers.logger - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.layers.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.logger - -.. py:class:: WriteStrategy - :canonical: cookie_composer.layers.WriteStrategy - - Bases: :py:obj:`enum.Enum` - - .. autodoc2-docstring:: cookie_composer.layers.WriteStrategy - - .. py:attribute:: WRITE - :canonical: cookie_composer.layers.WriteStrategy.WRITE - :value: 1 - - .. autodoc2-docstring:: cookie_composer.layers.WriteStrategy.WRITE - - .. py:attribute:: SKIP - :canonical: cookie_composer.layers.WriteStrategy.SKIP - :value: 2 - - .. autodoc2-docstring:: cookie_composer.layers.WriteStrategy.SKIP - - .. py:attribute:: MERGE - :canonical: cookie_composer.layers.WriteStrategy.MERGE - :value: 3 - - .. autodoc2-docstring:: cookie_composer.layers.WriteStrategy.MERGE - -.. py:class:: LayerConfig(**data: typing.Any) - :canonical: cookie_composer.layers.LayerConfig - - Bases: :py:obj:`pydantic.BaseModel` - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.__init__ - - .. py:attribute:: template - :canonical: cookie_composer.layers.LayerConfig.template - :type: cookie_composer.templates.types.Template - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.template - - .. py:attribute:: no_input - :canonical: cookie_composer.layers.LayerConfig.no_input - :type: bool - :value: False - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.no_input - - .. py:attribute:: initial_context - :canonical: cookie_composer.layers.LayerConfig.initial_context - :type: typing.MutableMapping[str, typing.Any] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.initial_context - - .. py:attribute:: skip_hooks - :canonical: cookie_composer.layers.LayerConfig.skip_hooks - :type: bool - :value: False - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.skip_hooks - - .. py:attribute:: skip_if_file_exists - :canonical: cookie_composer.layers.LayerConfig.skip_if_file_exists - :type: bool - :value: True - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.skip_if_file_exists - - .. py:attribute:: skip_generation - :canonical: cookie_composer.layers.LayerConfig.skip_generation - :type: typing.List[str] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.skip_generation - - .. py:attribute:: overwrite - :canonical: cookie_composer.layers.LayerConfig.overwrite - :type: typing.List[str] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.overwrite - - .. py:attribute:: overwrite_exclude - :canonical: cookie_composer.layers.LayerConfig.overwrite_exclude - :type: typing.List[str] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.overwrite_exclude - - .. py:attribute:: merge_strategies - :canonical: cookie_composer.layers.LayerConfig.merge_strategies - :type: typing.Dict[str, str] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.merge_strategies - - .. py:property:: layer_name - :canonical: cookie_composer.layers.LayerConfig.layer_name - :type: str - - .. autodoc2-docstring:: cookie_composer.layers.LayerConfig.layer_name - -.. py:class:: RenderedLayer(**data: typing.Any) - :canonical: cookie_composer.layers.RenderedLayer - - Bases: :py:obj:`pydantic.BaseModel` - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.__init__ - - .. py:attribute:: layer - :canonical: cookie_composer.layers.RenderedLayer.layer - :type: cookie_composer.layers.LayerConfig - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.layer - - .. py:attribute:: location - :canonical: cookie_composer.layers.RenderedLayer.location - :type: pydantic.DirectoryPath - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.location - - .. py:attribute:: rendered_context - :canonical: cookie_composer.layers.RenderedLayer.rendered_context - :type: typing.MutableMapping[str, typing.Any] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.rendered_context - - .. py:attribute:: rendered_commit - :canonical: cookie_composer.layers.RenderedLayer.rendered_commit - :type: typing.Optional[str] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.rendered_commit - - .. py:attribute:: rendered_name - :canonical: cookie_composer.layers.RenderedLayer.rendered_name - :type: typing.Optional[str] - :value: None - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.rendered_name - - .. py:property:: latest_commit - :canonical: cookie_composer.layers.RenderedLayer.latest_commit - :type: typing.Optional[str] - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.latest_commit - - .. py:method:: set_rendered_name(values: typing.Dict[str, typing.Any]) -> typing.Dict[str, typing.Any] - :canonical: cookie_composer.layers.RenderedLayer.set_rendered_name - :classmethod: - - .. autodoc2-docstring:: cookie_composer.layers.RenderedLayer.set_rendered_name - -.. py:function:: get_write_strategy(origin: pathlib.Path, destination: pathlib.Path, rendered_layer: cookie_composer.layers.RenderedLayer) -> cookie_composer.layers.WriteStrategy - :canonical: cookie_composer.layers.get_write_strategy - - .. autodoc2-docstring:: cookie_composer.layers.get_write_strategy - -.. py:function:: get_template_rendered_name(template: cookie_composer.templates.types.Template, context: typing.MutableMapping) -> str - :canonical: cookie_composer.layers.get_template_rendered_name - - .. autodoc2-docstring:: cookie_composer.layers.get_template_rendered_name - -.. py:function:: render_layer(layer_config: cookie_composer.layers.LayerConfig, render_dir: pathlib.Path, full_context: typing.Optional[cookie_composer.data_merge.Context] = None, accept_hooks: str = 'yes') -> cookie_composer.layers.RenderedLayer - :canonical: cookie_composer.layers.render_layer - - .. autodoc2-docstring:: cookie_composer.layers.render_layer - -.. py:function:: get_layer_context(layer_config: cookie_composer.layers.LayerConfig, user_config: dict, full_context: typing.Optional[cookie_composer.data_merge.Context] = None) -> cookie_composer.data_merge.Context - :canonical: cookie_composer.layers.get_layer_context - - .. autodoc2-docstring:: cookie_composer.layers.get_layer_context - -.. py:function:: render_layers(layers: typing.List[cookie_composer.layers.LayerConfig], destination: pathlib.Path, initial_context: typing.Optional[dict] = None, no_input: bool = False, accept_hooks: str = 'all') -> typing.List[cookie_composer.layers.RenderedLayer] - :canonical: cookie_composer.layers.render_layers - - .. autodoc2-docstring:: cookie_composer.layers.render_layers - -.. py:function:: get_accept_hooks_per_layer(accept_hooks: str, num_layers: int) -> list - :canonical: cookie_composer.layers.get_accept_hooks_per_layer - - .. autodoc2-docstring:: cookie_composer.layers.get_accept_hooks_per_layer - -.. py:function:: merge_layers(destination: pathlib.Path, rendered_layer: cookie_composer.layers.RenderedLayer) -> None - :canonical: cookie_composer.layers.merge_layers - - .. autodoc2-docstring:: cookie_composer.layers.merge_layers diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.matching.rst b/docsrc/apidocs/cookie_composer/cookie_composer.matching.rst deleted file mode 100644 index e0de555..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.matching.rst +++ /dev/null @@ -1,37 +0,0 @@ -:py:mod:`cookie_composer.matching` -================================== - -.. py:module:: cookie_composer.matching - -.. autodoc2-docstring:: cookie_composer.matching - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`rel_fnmatch ` - - .. autodoc2-docstring:: cookie_composer.matching.rel_fnmatch - :summary: - * - :py:obj:`matches_any_glob ` - - .. autodoc2-docstring:: cookie_composer.matching.matches_any_glob - :summary: - -API -~~~ - -.. py:function:: rel_fnmatch(name: str, pat: str) -> bool - :canonical: cookie_composer.matching.rel_fnmatch - - .. autodoc2-docstring:: cookie_composer.matching.rel_fnmatch - -.. py:function:: matches_any_glob(path: typing.Union[str, pathlib.Path], patterns: typing.List[str]) -> bool - :canonical: cookie_composer.matching.matches_any_glob - - .. autodoc2-docstring:: cookie_composer.matching.matches_any_glob diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.ini_file.rst b/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.ini_file.rst deleted file mode 100644 index c8ef8b9..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.ini_file.rst +++ /dev/null @@ -1,45 +0,0 @@ -:py:mod:`cookie_composer.merge_files.ini_file` -============================================== - -.. py:module:: cookie_composer.merge_files.ini_file - -.. autodoc2-docstring:: cookie_composer.merge_files.ini_file - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`merge_ini_files ` - - .. autodoc2-docstring:: cookie_composer.merge_files.ini_file.merge_ini_files - :summary: - * - :py:obj:`config_to_dict ` - - .. autodoc2-docstring:: cookie_composer.merge_files.ini_file.config_to_dict - :summary: - * - :py:obj:`dict_to_config ` - - .. autodoc2-docstring:: cookie_composer.merge_files.ini_file.dict_to_config - :summary: - -API -~~~ - -.. py:function:: merge_ini_files(new_file: pathlib.Path, existing_file: pathlib.Path, merge_strategy: str) -> None - :canonical: cookie_composer.merge_files.ini_file.merge_ini_files - - .. autodoc2-docstring:: cookie_composer.merge_files.ini_file.merge_ini_files - -.. py:function:: config_to_dict(config: configparser.ConfigParser) -> dict - :canonical: cookie_composer.merge_files.ini_file.config_to_dict - - .. autodoc2-docstring:: cookie_composer.merge_files.ini_file.config_to_dict - -.. py:function:: dict_to_config(dictionary: dict) -> configparser.ConfigParser - :canonical: cookie_composer.merge_files.ini_file.dict_to_config - - .. autodoc2-docstring:: cookie_composer.merge_files.ini_file.dict_to_config diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.json_file.rst b/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.json_file.rst deleted file mode 100644 index 1073036..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.json_file.rst +++ /dev/null @@ -1,37 +0,0 @@ -:py:mod:`cookie_composer.merge_files.json_file` -=============================================== - -.. py:module:: cookie_composer.merge_files.json_file - -.. autodoc2-docstring:: cookie_composer.merge_files.json_file - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`default ` - - .. autodoc2-docstring:: cookie_composer.merge_files.json_file.default - :summary: - * - :py:obj:`merge_json_files ` - - .. autodoc2-docstring:: cookie_composer.merge_files.json_file.merge_json_files - :summary: - -API -~~~ - -.. py:function:: default(obj: typing.Any) -> dict - :canonical: cookie_composer.merge_files.json_file.default - - .. autodoc2-docstring:: cookie_composer.merge_files.json_file.default - -.. py:function:: merge_json_files(new_file: pathlib.Path, existing_file: pathlib.Path, merge_strategy: str) -> None - :canonical: cookie_composer.merge_files.json_file.merge_json_files - - .. autodoc2-docstring:: cookie_composer.merge_files.json_file.merge_json_files diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.rst b/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.rst deleted file mode 100644 index 1f20b32..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.rst +++ /dev/null @@ -1,52 +0,0 @@ -:py:mod:`cookie_composer.merge_files` -===================================== - -.. py:module:: cookie_composer.merge_files - -.. autodoc2-docstring:: cookie_composer.merge_files - :allowtitles: - -Submodules ----------- - -.. toctree:: - :titlesonly: - :maxdepth: 1 - - cookie_composer.merge_files.toml_file - cookie_composer.merge_files.json_file - cookie_composer.merge_files.yaml_file - cookie_composer.merge_files.ini_file - -Package Contents ----------------- - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`merge_function ` - - .. autodoc2-docstring:: cookie_composer.merge_files.merge_function - :summary: - * - :py:obj:`MERGE_FUNCTIONS ` - - .. autodoc2-docstring:: cookie_composer.merge_files.MERGE_FUNCTIONS - :summary: - -API -~~~ - -.. py:data:: merge_function - :canonical: cookie_composer.merge_files.merge_function - :value: None - - .. autodoc2-docstring:: cookie_composer.merge_files.merge_function - -.. py:data:: MERGE_FUNCTIONS - :canonical: cookie_composer.merge_files.MERGE_FUNCTIONS - :type: typing.Dict[str, cookie_composer.merge_files.merge_function] - :value: None - - .. autodoc2-docstring:: cookie_composer.merge_files.MERGE_FUNCTIONS diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.toml_file.rst b/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.toml_file.rst deleted file mode 100644 index 9454fbe..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.toml_file.rst +++ /dev/null @@ -1,29 +0,0 @@ -:py:mod:`cookie_composer.merge_files.toml_file` -=============================================== - -.. py:module:: cookie_composer.merge_files.toml_file - -.. autodoc2-docstring:: cookie_composer.merge_files.toml_file - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`merge_toml_files ` - - .. autodoc2-docstring:: cookie_composer.merge_files.toml_file.merge_toml_files - :summary: - -API -~~~ - -.. py:function:: merge_toml_files(new_file: pathlib.Path, existing_file: pathlib.Path, merge_strategy: str) -> None - :canonical: cookie_composer.merge_files.toml_file.merge_toml_files - - .. autodoc2-docstring:: cookie_composer.merge_files.toml_file.merge_toml_files diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.yaml_file.rst b/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.yaml_file.rst deleted file mode 100644 index 174aaea..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.merge_files.yaml_file.rst +++ /dev/null @@ -1,29 +0,0 @@ -:py:mod:`cookie_composer.merge_files.yaml_file` -=============================================== - -.. py:module:: cookie_composer.merge_files.yaml_file - -.. autodoc2-docstring:: cookie_composer.merge_files.yaml_file - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`merge_yaml_files ` - - .. autodoc2-docstring:: cookie_composer.merge_files.yaml_file.merge_yaml_files - :summary: - -API -~~~ - -.. py:function:: merge_yaml_files(new_file: pathlib.Path, existing_file: pathlib.Path, merge_strategy: str) -> None - :canonical: cookie_composer.merge_files.yaml_file.merge_yaml_files - - .. autodoc2-docstring:: cookie_composer.merge_files.yaml_file.merge_yaml_files diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.rst b/docsrc/apidocs/cookie_composer/cookie_composer.rst deleted file mode 100644 index dc3fb32..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.rst +++ /dev/null @@ -1,62 +0,0 @@ -:py:mod:`cookie_composer` -========================= - -.. py:module:: cookie_composer - -.. autodoc2-docstring:: cookie_composer - :allowtitles: - -Subpackages ------------ - -.. toctree:: - :titlesonly: - :maxdepth: 3 - - cookie_composer.merge_files - cookie_composer.templates - cookie_composer.commands - -Submodules ----------- - -.. toctree:: - :titlesonly: - :maxdepth: 1 - - cookie_composer.data_merge - cookie_composer.git_commands - cookie_composer.io - cookie_composer.matching - cookie_composer.cli - cookie_composer.utils - cookie_composer.cc_overrides - cookie_composer.authentication - cookie_composer.exceptions - cookie_composer.diff - cookie_composer.composition - cookie_composer.layers - -Package Contents ----------------- - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`__version__ ` - - .. autodoc2-docstring:: cookie_composer.__version__ - :summary: - -API -~~~ - -.. py:data:: __version__ - :canonical: cookie_composer.__version__ - :type: str - :value: '0.11.0b1' - - .. autodoc2-docstring:: cookie_composer.__version__ diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.templates.git_repo.rst b/docsrc/apidocs/cookie_composer/cookie_composer.templates.git_repo.rst deleted file mode 100644 index d28f98d..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.templates.git_repo.rst +++ /dev/null @@ -1,62 +0,0 @@ -:py:mod:`cookie_composer.templates.git_repo` -============================================ - -.. py:module:: cookie_composer.templates.git_repo - -.. autodoc2-docstring:: cookie_composer.templates.git_repo - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`get_repo_name ` - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.get_repo_name - :summary: - * - :py:obj:`template_repo_from_git ` - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.template_repo_from_git - :summary: - * - :py:obj:`get_cached_remote ` - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.get_cached_remote - :summary: - -Data -~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`logger ` - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.logger - :summary: - -API -~~~ - -.. py:data:: logger - :canonical: cookie_composer.templates.git_repo.logger - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.logger - -.. py:function:: get_repo_name(repo_url: str, checkout: typing.Optional[str] = None) -> str - :canonical: cookie_composer.templates.git_repo.get_repo_name - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.get_repo_name - -.. py:function:: template_repo_from_git(git_uri: str, locality: cookie_composer.templates.types.Locality, cache_dir: pathlib.Path, checkout: typing.Optional[str] = None) -> cookie_composer.templates.types.TemplateRepo - :canonical: cookie_composer.templates.git_repo.template_repo_from_git - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.template_repo_from_git - -.. py:function:: get_cached_remote(git_uri: str, cache_dir: pathlib.Path, checkout: typing.Optional[str] = None) -> git.Repo - :canonical: cookie_composer.templates.git_repo.get_cached_remote - - .. autodoc2-docstring:: cookie_composer.templates.git_repo.get_cached_remote diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.templates.rst b/docsrc/apidocs/cookie_composer/cookie_composer.templates.rst deleted file mode 100644 index abe0f7e..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.templates.rst +++ /dev/null @@ -1,19 +0,0 @@ -:py:mod:`cookie_composer.templates` -=================================== - -.. py:module:: cookie_composer.templates - -.. autodoc2-docstring:: cookie_composer.templates - :allowtitles: - -Submodules ----------- - -.. toctree:: - :titlesonly: - :maxdepth: 1 - - cookie_composer.templates.zipfile_repo - cookie_composer.templates.git_repo - cookie_composer.templates.types - cookie_composer.templates.source diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.templates.source.rst b/docsrc/apidocs/cookie_composer/cookie_composer.templates.source.rst deleted file mode 100644 index 6ea77d6..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.templates.source.rst +++ /dev/null @@ -1,45 +0,0 @@ -:py:mod:`cookie_composer.templates.source` -========================================== - -.. py:module:: cookie_composer.templates.source - -.. autodoc2-docstring:: cookie_composer.templates.source - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`identify_repo ` - - .. autodoc2-docstring:: cookie_composer.templates.source.identify_repo - :summary: - * - :py:obj:`get_template_repo ` - - .. autodoc2-docstring:: cookie_composer.templates.source.get_template_repo - :summary: - * - :py:obj:`resolve_local_path ` - - .. autodoc2-docstring:: cookie_composer.templates.source.resolve_local_path - :summary: - -API -~~~ - -.. py:function:: identify_repo(url: str, local_path: typing.Optional[pathlib.Path] = None) -> typing.Tuple[cookie_composer.templates.types.TemplateFormat, cookie_composer.templates.types.Locality] - :canonical: cookie_composer.templates.source.identify_repo - - .. autodoc2-docstring:: cookie_composer.templates.source.identify_repo - -.. py:function:: get_template_repo(url: str, local_path: typing.Optional[pathlib.Path] = None, checkout: typing.Optional[str] = None, password: typing.Optional[str] = None) -> cookie_composer.templates.types.TemplateRepo - :canonical: cookie_composer.templates.source.get_template_repo - - .. autodoc2-docstring:: cookie_composer.templates.source.get_template_repo - -.. py:function:: resolve_local_path(url: str, local_path: typing.Optional[pathlib.Path] = None) -> pathlib.Path - :canonical: cookie_composer.templates.source.resolve_local_path - - .. autodoc2-docstring:: cookie_composer.templates.source.resolve_local_path diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.templates.types.rst b/docsrc/apidocs/cookie_composer/cookie_composer.templates.types.rst deleted file mode 100644 index 0ca63f3..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.templates.types.rst +++ /dev/null @@ -1,221 +0,0 @@ -:py:mod:`cookie_composer.templates.types` -========================================= - -.. py:module:: cookie_composer.templates.types - -.. autodoc2-docstring:: cookie_composer.templates.types - :allowtitles: - -Module Contents ---------------- - -Classes -~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`Locality ` - - .. autodoc2-docstring:: cookie_composer.templates.types.Locality - :summary: - * - :py:obj:`TemplateFormat ` - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateFormat - :summary: - * - :py:obj:`TemplateRepo ` - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo - :summary: - * - :py:obj:`Template ` - - .. autodoc2-docstring:: cookie_composer.templates.types.Template - :summary: - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`get_template_name ` - - .. autodoc2-docstring:: cookie_composer.templates.types.get_template_name - :summary: - -API -~~~ - -.. py:class:: Locality() - :canonical: cookie_composer.templates.types.Locality - - Bases: :py:obj:`str`, :py:obj:`enum.Enum` - - .. autodoc2-docstring:: cookie_composer.templates.types.Locality - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.templates.types.Locality.__init__ - - .. py:attribute:: LOCAL - :canonical: cookie_composer.templates.types.Locality.LOCAL - :value: 'local' - - .. autodoc2-docstring:: cookie_composer.templates.types.Locality.LOCAL - - .. py:attribute:: REMOTE - :canonical: cookie_composer.templates.types.Locality.REMOTE - :value: 'remote' - - .. autodoc2-docstring:: cookie_composer.templates.types.Locality.REMOTE - -.. py:class:: TemplateFormat() - :canonical: cookie_composer.templates.types.TemplateFormat - - Bases: :py:obj:`str`, :py:obj:`enum.Enum` - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateFormat - - .. rubric:: Initialization - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateFormat.__init__ - - .. py:attribute:: ZIP - :canonical: cookie_composer.templates.types.TemplateFormat.ZIP - :value: 'zip' - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateFormat.ZIP - - .. py:attribute:: GIT - :canonical: cookie_composer.templates.types.TemplateFormat.GIT - :value: 'git' - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateFormat.GIT - - .. py:attribute:: HG - :canonical: cookie_composer.templates.types.TemplateFormat.HG - :value: 'hg' - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateFormat.HG - - .. py:attribute:: PLAIN - :canonical: cookie_composer.templates.types.TemplateFormat.PLAIN - :value: 'plain' - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateFormat.PLAIN - -.. py:class:: TemplateRepo - :canonical: cookie_composer.templates.types.TemplateRepo - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo - - .. py:attribute:: source - :canonical: cookie_composer.templates.types.TemplateRepo.source - :type: str - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.source - - .. py:attribute:: cached_source - :canonical: cookie_composer.templates.types.TemplateRepo.cached_source - :type: pathlib.Path - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.cached_source - - .. py:attribute:: format - :canonical: cookie_composer.templates.types.TemplateRepo.format - :type: cookie_composer.templates.types.TemplateFormat - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.format - - .. py:attribute:: locality - :canonical: cookie_composer.templates.types.TemplateRepo.locality - :type: cookie_composer.templates.types.Locality - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.locality - - .. py:attribute:: checkout - :canonical: cookie_composer.templates.types.TemplateRepo.checkout - :type: typing.Optional[str] - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.checkout - - .. py:attribute:: password - :canonical: cookie_composer.templates.types.TemplateRepo.password - :type: typing.Optional[str] - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.password - - .. py:property:: current_sha - :canonical: cookie_composer.templates.types.TemplateRepo.current_sha - :type: typing.Optional[str] - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.current_sha - - .. py:property:: latest_sha - :canonical: cookie_composer.templates.types.TemplateRepo.latest_sha - :type: typing.Optional[str] - - .. autodoc2-docstring:: cookie_composer.templates.types.TemplateRepo.latest_sha - -.. py:class:: Template - :canonical: cookie_composer.templates.types.Template - - .. autodoc2-docstring:: cookie_composer.templates.types.Template - - .. py:attribute:: repo - :canonical: cookie_composer.templates.types.Template.repo - :type: cookie_composer.templates.types.TemplateRepo - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.Template.repo - - .. py:attribute:: directory - :canonical: cookie_composer.templates.types.Template.directory - :type: str - :value: - - .. autodoc2-docstring:: cookie_composer.templates.types.Template.directory - - .. py:attribute:: _context - :canonical: cookie_composer.templates.types.Template._context - :type: typing.Optional[dict] - :value: None - - .. autodoc2-docstring:: cookie_composer.templates.types.Template._context - - .. py:method:: cleanup() -> None - :canonical: cookie_composer.templates.types.Template.cleanup - - .. autodoc2-docstring:: cookie_composer.templates.types.Template.cleanup - - .. py:property:: name - :canonical: cookie_composer.templates.types.Template.name - :type: str - - .. autodoc2-docstring:: cookie_composer.templates.types.Template.name - - .. py:property:: cached_path - :canonical: cookie_composer.templates.types.Template.cached_path - :type: pathlib.Path - - .. autodoc2-docstring:: cookie_composer.templates.types.Template.cached_path - - .. py:property:: context_file_path - :canonical: cookie_composer.templates.types.Template.context_file_path - :type: pathlib.Path - - .. autodoc2-docstring:: cookie_composer.templates.types.Template.context_file_path - - .. py:property:: context - :canonical: cookie_composer.templates.types.Template.context - :type: dict - - .. autodoc2-docstring:: cookie_composer.templates.types.Template.context - -.. py:function:: get_template_name(path_or_url: str, directory: typing.Optional[str] = None, checkout: typing.Optional[str] = None) -> str - :canonical: cookie_composer.templates.types.get_template_name - - .. autodoc2-docstring:: cookie_composer.templates.types.get_template_name diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.templates.zipfile_repo.rst b/docsrc/apidocs/cookie_composer/cookie_composer.templates.zipfile_repo.rst deleted file mode 100644 index ea5634b..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.templates.zipfile_repo.rst +++ /dev/null @@ -1,61 +0,0 @@ -:py:mod:`cookie_composer.templates.zipfile_repo` -================================================ - -.. py:module:: cookie_composer.templates.zipfile_repo - -.. autodoc2-docstring:: cookie_composer.templates.zipfile_repo - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`template_repo_from_zipfile ` - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.template_repo_from_zipfile - :summary: - * - :py:obj:`download_zipfile ` - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.download_zipfile - :summary: - * - :py:obj:`unzip ` - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.unzip - :summary: - * - :py:obj:`validate_zipfile ` - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.validate_zipfile - :summary: - * - :py:obj:`extract_zipfile ` - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.extract_zipfile - :summary: - -API -~~~ - -.. py:function:: template_repo_from_zipfile(zip_uri: str, locality: cookie_composer.templates.types.Locality, cache_dir: pathlib.Path, no_input: bool = False, password: typing.Optional[str] = None) -> cookie_composer.templates.types.TemplateRepo - :canonical: cookie_composer.templates.zipfile_repo.template_repo_from_zipfile - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.template_repo_from_zipfile - -.. py:function:: download_zipfile(url: str, cache_dir: pathlib.Path, no_input: bool = False) -> pathlib.Path - :canonical: cookie_composer.templates.zipfile_repo.download_zipfile - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.download_zipfile - -.. py:function:: unzip(zip_uri: str, is_remote: bool, cache_dir: pathlib.Path, no_input: bool = False, password: typing.Optional[str] = None) -> pathlib.Path - :canonical: cookie_composer.templates.zipfile_repo.unzip - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.unzip - -.. py:function:: validate_zipfile(zip_path: pathlib.Path, zip_uri: str) -> None - :canonical: cookie_composer.templates.zipfile_repo.validate_zipfile - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.validate_zipfile - -.. py:function:: extract_zipfile(zip_path: pathlib.Path, no_input: bool, password: typing.Optional[str] = None) -> pathlib.Path - :canonical: cookie_composer.templates.zipfile_repo.extract_zipfile - - .. autodoc2-docstring:: cookie_composer.templates.zipfile_repo.extract_zipfile diff --git a/docsrc/apidocs/cookie_composer/cookie_composer.utils.rst b/docsrc/apidocs/cookie_composer/cookie_composer.utils.rst deleted file mode 100644 index 2608928..0000000 --- a/docsrc/apidocs/cookie_composer/cookie_composer.utils.rst +++ /dev/null @@ -1,69 +0,0 @@ -:py:mod:`cookie_composer.utils` -=============================== - -.. py:module:: cookie_composer.utils - -.. autodoc2-docstring:: cookie_composer.utils - :allowtitles: - -Module Contents ---------------- - -Functions -~~~~~~~~~ - -.. list-table:: - :class: autosummary longtable - :align: left - - * - :py:obj:`get_context_for_layer ` - - .. autodoc2-docstring:: cookie_composer.utils.get_context_for_layer - :summary: - * - :py:obj:`echo ` - - .. autodoc2-docstring:: cookie_composer.utils.echo - :summary: - * - :py:obj:`get_deleted_files ` - - .. autodoc2-docstring:: cookie_composer.utils.get_deleted_files - :summary: - * - :py:obj:`remove_paths ` - - .. autodoc2-docstring:: cookie_composer.utils.remove_paths - :summary: - * - :py:obj:`remove_readonly_bit ` - - .. autodoc2-docstring:: cookie_composer.utils.remove_readonly_bit - :summary: - * - :py:obj:`remove_single_path ` - - .. autodoc2-docstring:: cookie_composer.utils.remove_single_path - :summary: - -API -~~~ - -.. py:function:: get_context_for_layer(composition: cookie_composer.composition.RenderedComposition, index: typing.Optional[int] = None) -> dict - :canonical: cookie_composer.utils.get_context_for_layer - - .. autodoc2-docstring:: cookie_composer.utils.get_context_for_layer - -.. py:function:: echo(message: typing.Optional[typing.Any] = None, file: typing.Optional[typing.IO] = None, nl: bool = True, err: bool = False, color: typing.Optional[bool] = None, **styles) -> None - :canonical: cookie_composer.utils.echo - - .. autodoc2-docstring:: cookie_composer.utils.echo - -.. py:function:: get_deleted_files(template_dir: pathlib.Path, project_dir: pathlib.Path) -> typing.Set[pathlib.Path] - :canonical: cookie_composer.utils.get_deleted_files - - .. autodoc2-docstring:: cookie_composer.utils.get_deleted_files - -.. py:function:: remove_paths(root: pathlib.Path, paths_to_remove: typing.Set[pathlib.Path]) -> None - :canonical: cookie_composer.utils.remove_paths - - .. autodoc2-docstring:: cookie_composer.utils.remove_paths - -.. py:function:: remove_readonly_bit(func: typing.Callable[[str], None], path: str, _: typing.Any) -> None - :canonical: cookie_composer.utils.remove_readonly_bit - - .. autodoc2-docstring:: cookie_composer.utils.remove_readonly_bit - -.. py:function:: remove_single_path(path: pathlib.Path) -> None - :canonical: cookie_composer.utils.remove_single_path - - .. autodoc2-docstring:: cookie_composer.utils.remove_single_path diff --git a/docsrc/apidocs/index.rst b/docsrc/apidocs/index.rst deleted file mode 100644 index b5992b2..0000000 --- a/docsrc/apidocs/index.rst +++ /dev/null @@ -1,11 +0,0 @@ -API Reference -============= - -This page contains auto-generated API reference documentation [#f1]_. - -.. toctree:: - :titlesonly: - - cookie_composer/cookie_composer - -.. [#f1] Created with `sphinx-autodoc2 `_ diff --git a/docsrc/changelog.md b/docsrc/changelog.md deleted file mode 100644 index 66efc0f..0000000 --- a/docsrc/changelog.md +++ /dev/null @@ -1,2 +0,0 @@ -```{include} ../CHANGELOG.md -``` diff --git a/docsrc/cli.rst b/docsrc/cli.rst deleted file mode 100644 index 2c27a44..0000000 --- a/docsrc/cli.rst +++ /dev/null @@ -1,6 +0,0 @@ -Command-line Interface -====================== - -.. click:: cookie_composer.cli:cli - :prog: cookie-composer - :nested: full diff --git a/docsrc/conf.py b/docsrc/conf.py deleted file mode 100644 index b3be850..0000000 --- a/docsrc/conf.py +++ /dev/null @@ -1,95 +0,0 @@ -""" -Sphinx configuration. -""" - -import os -import sys -from datetime import date - -sys.path.insert(0, os.path.abspath("..")) - -import cookie_composer - -project = "Cookie Composer" -author = "Corey Oordt" -copyright = f"{date.today():%Y}, {author}" - -version = cookie_composer.__version__ -release = cookie_composer.__version__ - -# -- General configuration --------------------------------------------- - -extensions = [ - "myst_parser", - "autodoc2", - "sphinx.ext.viewcode", - # "sphinx.ext.autosummary", - "sphinx.ext.intersphinx", - "sphinx.ext.autosectionlabel", - "sphinx.ext.napoleon", - "sphinx.ext.coverage", - "sphinx.ext.githubpages", - "sphinx_click", -] -autosectionlabel_prefix_document = True -autosectionlabel_maxdepth = 2 -autosummary_generate = True -autodoc2_packages = ["../cookie_composer"] -napoleon_attr_annotations = True -napoleon_include_special_with_doc = True -napoleon_include_private_with_doc = True -napoleon_include_init_with_doc = True -myst_enable_extensions = [ - "amsmath", - "colon_fence", - "deflist", - "dollarmath", - "linkify", - "replacements", - "smartquotes", - "substitution", - "tasklist", -] -intersphinx_mapping = { - "python": ("https://docs.python.org/3", None), -} - -templates_path = ["_templates"] -source_suffix = [".rst", ".md"] -master_doc = "index" -language = "en" -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] -pygments_style = "sphinx" -todo_include_todos = False -primary_domain = "py" - - -# -- Options for HTML output ------------------------------------------- - -html_title = "Cookie Composer" -html_logo = "_static/img/composer-logo.svg" -html_theme = "sphinx_material" -html_static_path = ["_static"] -html_css_files = [ - "css/custom.css", -] -html_theme_options = { - # Set the name of the project to appear in the navigation. - "nav_title": "Cookie Composer", - # Specify a base_url used to generate sitemap.xml. If not - # specified, then no sitemap will be built. - "base_url": "https://callowayproject.github.io/cookie-composer/", - # Set the color and the accent color - "color_primary": "blue", - "color_accent": "light-blue", - # Set the repo location to get a badge with stats - "repo_url": "https://github.com/callowayproject/cookie-composer/", - "repo_name": "Project", - # Visible levels of the global TOC; -1 means unlimited - "globaltoc_depth": 3, - # If False, expand all TOC entries - "globaltoc_collapse": False, - # If True, show hidden TOC entries - "globaltoc_includehidden": False, - "master_doc": True, -} diff --git a/docsrc/contributing.md b/docsrc/contributing.md deleted file mode 100644 index 78caf34..0000000 --- a/docsrc/contributing.md +++ /dev/null @@ -1,2 +0,0 @@ -```{include} ../CONTRIBUTING.md -``` diff --git a/docsrc/how-to/index.md b/docsrc/how-to/index.md deleted file mode 100644 index c064d96..0000000 --- a/docsrc/how-to/index.md +++ /dev/null @@ -1,8 +0,0 @@ -# How To... - -```{toctree} ---- -maxdepth: 2 ---- -access-private-templates -``` diff --git a/docsrc/index.md b/docsrc/index.md deleted file mode 100644 index b769f44..0000000 --- a/docsrc/index.md +++ /dev/null @@ -1,27 +0,0 @@ -# Cookie composer - -```{include} ../README.md ---- -start-after: ---- -``` - -```{toctree} ---- -hidden: ---- -installation -tutorial/index -topic-guides/index -how-to/index -cli -apidocs/index -contributing -changelog -``` - -## Indices and tables - -* {ref}`genindex` -* {ref}`modindex` -* {ref}`search` diff --git a/docsrc/make.bat b/docsrc/make.bat deleted file mode 100644 index 368fe0f..0000000 --- a/docsrc/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=python -msphinx -) -set SOURCEDIR=. -set BUILDDIR=_build -set SPHINXPROJ=bin_cookie_composer - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The Sphinx module was not found. Make sure you have Sphinx installed, - echo.then set the SPHINXBUILD environment variable to point to the full - echo.path of the 'sphinx-build' executable. Alternatively you may add the - echo.Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd diff --git a/docsrc/topic-guides/index.md b/docsrc/topic-guides/index.md deleted file mode 100644 index c153e26..0000000 --- a/docsrc/topic-guides/index.md +++ /dev/null @@ -1,8 +0,0 @@ -# Topic Guides - -```{toctree} ---- -maxdepth: 2 ---- -composition-files -``` diff --git a/docsrc/tutorial/index.md b/docsrc/tutorial/index.md deleted file mode 100644 index 865699f..0000000 --- a/docsrc/tutorial/index.md +++ /dev/null @@ -1,10 +0,0 @@ -# Tutorial - -```{toctree} ---- -maxdepth: 1 ---- -incrementally-layering -compositions -composable-templates -``` diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..a4cec37 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,117 @@ +site_name: Cookie Composer +repo_url: https://github.com/callowayproject/cookie-composer +edit_uri: edit/master/docs/ +copyright: Calloway Project +watch: + - overrides +theme: + name: material + custom_dir: overrides + logo: assets/img/composer-logo.svg + favicon: assets/favicon.png + features: + - navigation.tabs + - navigation.sections + - navigation.path + - navigation.indexes + - toc.integrate + - content.action.edit + - content.action.view + - content.code.annotate + - content.tabs.link + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: blue grey + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/toggle-switch + name: Switch to light mode +use_directory_urls: true +markdown_extensions: + - abbr + - admonition + - attr_list + - customblocks + - def_list + - footnotes + - md_in_html + - mdx_truly_sane_lists + - mkdocs-click + - pymdownx.details + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + - pymdownx.highlight + - pymdownx.snippets: + base_path: ["docs/_includes"] + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_div_format + - pymdownx.tabbed: + alternate_style: true + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower + - smarty + - toc: + permalink: true + toc_depth: 3 + - tables + +plugins: + - search + - git-revision-date-localized + - git-authors: + show_email_address: false + exclude: + - reference/api/* + - include-markdown + - drawio + - literate-nav: + nav_file: SUMMARY.md + - gen-files: + scripts: + - docs/gen_doc_stubs.py + - mkdocstrings: + custom_templates: overrides/mkdocstrings + handlers: + python: + import: + - https://docs.python.org/3/objects.inv + - https://numpy.org/doc/stable/objects.inv + - https://pandas.pydata.org/docs/objects.inv + - https://api.python.langchain.com/en/latest/objects.inv + options: + allow_inspection: true + docstring_style: google + docstring_options: + ignore_init_summary: true + docstring_section_style: spacy + enable_inventory: true + group_by_category: true + members_order: alphabetical + merge_init_into_class: true + separate_signature: true + show_docstring_parameters: true + show_root_toc_entry: true + show_signature_annotations: true + show_source: false + show_symbol_type_heading: true + show_symbol_type_toc: true + show_category_heading: true + +extra_javascript: + - "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML" + +extra_css: + - assets/css/custom.css + - assets/css/mkdocstrings.css + - assets/css/cards.css + - assets/css/field-list.css diff --git a/overrides/mkdocstrings/python/material/docstring/attributes.html b/overrides/mkdocstrings/python/material/docstring/attributes.html new file mode 100644 index 0000000..ce50d65 --- /dev/null +++ b/overrides/mkdocstrings/python/material/docstring/attributes.html @@ -0,0 +1,90 @@ +{{ log.debug("Rendering attributes section") }} + +{% import "language.html" as lang with context %} + +{% if config.docstring_section_style == "table" %} + {% block table_style scoped %} +

{{ section.title or lang.t("Attributes:") }}

+ + + + + + + + + + {% for attribute in section.value %} + + + + + + {% endfor %} + +
{{ lang.t("Name") }}{{ lang.t("Type") }}{{ lang.t("Description") }}
{{ attribute.name }} + {% if attribute.annotation %} + {% with expression = attribute.annotation %} + {% include "expression.html" with context %} + {% endwith %} + {% endif %} + +
+ {{ attribute.description|convert_markdown(heading_level, html_id) }} +
+
+ {% endblock table_style %} +{% elif config.docstring_section_style == "list" %} + {% block list_style scoped %} +

{{ section.title or lang.t("Attributes:") }}

+
    + {% for attribute in section.value %} +
  • + {{ attribute.name }} + {% if attribute.annotation %} + {% with expression = attribute.annotation %} + ({% include "expression.html" with context %}) + {% endwith %} + {% endif %} + – +
    + {{ attribute.description|convert_markdown(heading_level, html_id) }} +
    +
  • + {% endfor %} +
+ {% endblock list_style %} +{% elif config.docstring_section_style == "spacy" %} + {% block spacy_style scoped %} + + + + + + + + + {% for attribute in section.value %} + + + + + {% endfor %} + +
{{ (section.title or lang.t("ATTRIBUTE")).rstrip(":").upper() }}{{ lang.t("DESCRIPTION") }}
{{ attribute.name }} +
+ {{ attribute.description|convert_markdown(heading_level, html_id) }} +
+

+ {% if attribute.annotation %} + + TYPE: + {% with expression = attribute.annotation %} + {% include "expression.html" with context %} + {% endwith %} + + {% endif %} +

+
+ {% endblock spacy_style %} +{% endif %} diff --git a/overrides/mkdocstrings/python/material/docstring/parameters.html b/overrides/mkdocstrings/python/material/docstring/parameters.html new file mode 100644 index 0000000..ab4889e --- /dev/null +++ b/overrides/mkdocstrings/python/material/docstring/parameters.html @@ -0,0 +1,98 @@ +{{ log.debug("Rendering parameters section") }} + +{% import "language.html" as lang with context %} + +{% if config.docstring_section_style == "table" %} + {% block table_style scoped %} +

{{ section.title or lang.t("Parameters:") }}

+ + + + + + + + + + + {% for parameter in section.value %} + + + + + + + {% endfor %} + +
{{ lang.t("Name") }}{{ lang.t("Type") }}{{ lang.t("Description") }}{{ lang.t("Default") }}
{{ parameter.name }} + {% if parameter.annotation %} + {% with expression = parameter.annotation %} + {% include "expression.html" with context %} + {% endwith %} + {% endif %} + +
+ {{ parameter.description|convert_markdown(heading_level, html_id) }} +
+
+ {% if parameter.default %} + {% with expression = parameter.default %} + {% include "expression.html" with context %} + {% endwith %} + {% else %} + {{ lang.t("required") }} + {% endif %} +
+ {% endblock table_style %} +{% elif config.docstring_section_style == "list" %} + {% block list_style scoped %} +

{{ section.title or lang.t("Parameters:") }}

+
    + {% for parameter in section.value %} +
  • + {{ parameter.name }} + {% if parameter.annotation %} + {% with expression = parameter.annotation %} + ({% include "expression.html" with context %} + {%- if parameter.default %}, {{ lang.t("default:") }} + {% with expression = parameter.default %} + {% include "expression.html" with context %} + {% endwith %} + {% endif %}) + {% endwith %} + {% endif %} + – +
    + {{ parameter.description|convert_markdown(heading_level, html_id) }} +
    +
  • + {% endfor %} +
+ {% endblock list_style %} +{% elif config.docstring_section_style == "spacy" %} + {% block spacy_style scoped %} +

{{ section.title or lang.t("Parameters:") }}

+
+ {% for parameter in section.value %} +
{{ parameter.name }}
+
+
+ {{ parameter.description|convert_markdown(heading_level, html_id) }} +
+ {% if parameter.annotation %}

+ {{ lang.t("TYPE:") }} + {% with expression = parameter.annotation %} + {% include "expression.html" with context %} + {% endwith %} +

{% endif %} + {% if parameter.default %}

+ {{ lang.t("DEFAULT:") }} + {% with expression = parameter.default %} + {% include "expression.html" with context %} + {% endwith %} +

{% endif %} +
+ {% endfor %} +
+ {% endblock spacy_style %} +{% endif %} diff --git a/overrides/mkdocstrings/python/material/docstring/raises.html b/overrides/mkdocstrings/python/material/docstring/raises.html new file mode 100644 index 0000000..628e41b --- /dev/null +++ b/overrides/mkdocstrings/python/material/docstring/raises.html @@ -0,0 +1,72 @@ +{{ log.debug("Rendering raises section") }} + +{% import "language.html" as lang with context %} + +{% if config.docstring_section_style == "table" %} + {% block table_style scoped %} +

{{ section.title or lang.t("Raises:") }}

+ + + + + + + + + {% for raises in section.value %} + + + + + {% endfor %} + +
{{ lang.t("Type") }}{{ lang.t("Description") }}
+ {% if raises.annotation %} + {% with expression = raises.annotation %} + {% include "expression.html" with context %} + {% endwith %} + {% endif %} + +
+ {{ raises.description|convert_markdown(heading_level, html_id) }} +
+
+ {% endblock table_style %} +{% elif config.docstring_section_style == "list" %} + {% block list_style scoped %} +

{{ lang.t(section.title) or lang.t("Raises:") }}

+
    + {% for raises in section.value %} +
  • + {% if raises.annotation %} + {% with expression = raises.annotation %} + {% include "expression.html" with context %} + {% endwith %} + – + {% endif %} +
    + {{ raises.description|convert_markdown(heading_level, html_id) }} +
    +
  • + {% endfor %} +
+ {% endblock list_style %} +{% elif config.docstring_section_style == "spacy" %} + {% block spacy_style scoped %} +

{{ (section.title or lang.t("Raises:")) }}

+
+ {% for raises in section.value %} +
+ {% with expression = raises.annotation %} + {% include "expression.html" with context %} + {% endwith %} +
+
+
+ {{ raises.description|convert_markdown(heading_level, html_id) }} +
+
+ {% endfor %} +
+ {% endblock spacy_style %} +{% endif %} diff --git a/overrides/mkdocstrings/python/material/docstring/returns.html b/overrides/mkdocstrings/python/material/docstring/returns.html new file mode 100644 index 0000000..bd60840 --- /dev/null +++ b/overrides/mkdocstrings/python/material/docstring/returns.html @@ -0,0 +1,94 @@ +{{ log.debug("Rendering returns section") }} + +{% import "language.html" as lang with context %} + +{% if config.docstring_section_style == "table" %} + {% block table_style scoped %} + {% set name_column = section.value|selectattr("name")|any %} +

{{ section.title or lang.t("Returns:") }}

+ + + + {% if name_column %}{% endif %} + + + + + + {% for returns in section.value %} + + {% if name_column %}{% endif %} + + + + {% endfor %} + +
{{ lang.t("Name") }}{{ lang.t("Type") }}{{ lang.t("Description") }}
{% if returns.name %}{{ returns.name }}{% endif %} + {% if returns.annotation %} + {% with expression = returns.annotation %} + {% include "expression.html" with context %} + {% endwith %} + {% endif %} + +
+ {{ returns.description|convert_markdown(heading_level, html_id) }} +
+
+ {% endblock table_style %} +{% elif config.docstring_section_style == "list" %} + {% block list_style scoped %} +

{{ section.title or lang.t("Returns:") }}

+
    + {% for returns in section.value %} +
  • + {% if returns.name %}{{ returns.name }}{% endif %} + {% if returns.annotation %} + {% with expression = returns.annotation %} + {% if returns.name %} ({% endif %} + {% include "expression.html" with context %} + {% if returns.name %}){% endif %} + {% endwith %} + {% endif %} + – +
    + {{ returns.description|convert_markdown(heading_level, html_id) }} +
    +
  • + {% endfor %} +
+ {% endblock list_style %} +{% elif config.docstring_section_style == "spacy" %} + {% block spacy_style scoped %} +

{{ (section.title or lang.t("Returns:")) }}

+
+ {% for returns in section.value %} +
+ {% if returns.name %} + {{ returns.name }} + {% elif returns.annotation %} + + {% with expression = returns.annotation %} + {% include "expression.html" with context %} + {% endwith %} + + {% endif %} +
+
+
+ {{ returns.description|convert_markdown(heading_level, html_id) }} +
+ {% if returns.name and returns.annotation %} +

+ + {{ lang.t("TYPE:") }} + {% with expression = returns.annotation %} + {% include "expression.html" with context %} + {% endwith %} + +

+ {% endif %} +
+ {% endfor %} +
+ {% endblock spacy_style %} +{% endif %} diff --git a/overrides/partials/comments.html b/overrides/partials/comments.html new file mode 100644 index 0000000..b0d1dd3 --- /dev/null +++ b/overrides/partials/comments.html @@ -0,0 +1,51 @@ +{% if page.meta.comments %} +

{{ lang.t("meta.comments") }}

+ + + + +{% endif %}