This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-3-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 9a5a49548580f7ab14e99b49bf50d63fff036417 Author: Jarek Potiuk <[email protected]> AuthorDate: Sat Apr 30 13:55:11 2022 +0200 Add missing --for-production parameter for new breeze docs building (#23376) (cherry picked from commit da91d28c1846bed5d40f7c12e4b314c5f7beb812) --- .../airflow_breeze/commands/developer_commands.py | 12 +++++ images/breeze/output-build-docs.svg | 53 +++++++++++----------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py b/dev/breeze/src/airflow_breeze/commands/developer_commands.py index 13ed9c5937..b665ee1685 100644 --- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py @@ -165,6 +165,7 @@ DEVELOPER_PARAMETERS = { "options": [ "--docs-only", "--spellcheck-only", + "--for-production", "--package-filter", ], }, @@ -323,6 +324,12 @@ def start_airflow( @option_github_repository @click.option('-d', '--docs-only', help="Only build documentation.", is_flag=True) @click.option('-s', '--spellcheck-only', help="Only run spell checking.", is_flag=True) [email protected]( + '-p', + '--for-production', + help="Builds documentation for official release i.e. all links point to stable version.", + is_flag=True, +) @click.option( '-p', '--package-filter', @@ -336,6 +343,7 @@ def build_docs( github_repository: str, docs_only: bool, spellcheck_only: bool, + for_production: bool, package_filter: Tuple[str], ): """Build documentation in the container.""" @@ -345,6 +353,7 @@ def build_docs( package_filter=package_filter, docs_only=docs_only, spellcheck_only=spellcheck_only, + for_production=for_production, ) extra_docker_flags = get_extra_docker_flags(MOUNT_SELECTED) env = construct_env_variables_docker_compose_command(params) @@ -476,6 +485,7 @@ class DocBuildParams: package_filter: Tuple[str] docs_only: bool spellcheck_only: bool + for_production: bool @property def args_doc_builder(self) -> List[str]: @@ -484,6 +494,8 @@ class DocBuildParams: doc_args.append("--docs-only") if self.spellcheck_only: doc_args.append("--spellcheck-only") + if self.for_production: + doc_args.append("--for-production") if self.package_filter and len(self.package_filter) > 0: for single_filter in self.package_filter: doc_args.extend(["--package-filter", single_filter]) diff --git a/images/breeze/output-build-docs.svg b/images/breeze/output-build-docs.svg index d01d3ecf1c..1e1ed98b7c 100644 --- a/images/breeze/output-build-docs.svg +++ b/images/breeze/output-build-docs.svg @@ -1,4 +1,4 @@ -<svg width="1720.0" height="1550" viewBox="0 0 1720.0 1550" +<svg width="1720.0" height="1572" viewBox="0 0 1720.0 1572" xmlns="http://www.w3.org/2000/svg"> <style> @font-face { @@ -17,30 +17,30 @@ font-style: bold; font-weight: 700; } - .rich-svg-3399521216-terminal-wrapper span { + .rich-svg-2744519006-terminal-wrapper span { display: inline-block; white-space: pre; vertical-align: top; font-size: 18px; font-family:'Rich Fira Code','Cascadia Code',Monaco,Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace; } - .rich-svg-3399521216-terminal-wrapper a { + .rich-svg-2744519006-terminal-wrapper a { text-decoration: none; color: inherit; } - .rich-svg-3399521216-terminal-body .blink { - animation: rich-svg-3399521216-blinker 1s infinite; + .rich-svg-2744519006-terminal-body .blink { + animation: rich-svg-2744519006-blinker 1s infinite; } - @keyframes rich-svg-3399521216-blinker { + @keyframes rich-svg-2744519006-blinker { from { opacity: 1.0; } 50% { opacity: 0.3; } to { opacity: 1.0; } } - .rich-svg-3399521216-terminal-wrapper { + .rich-svg-2744519006-terminal-wrapper { padding: 140px; padding-top: 100px; } - .rich-svg-3399521216-terminal { + .rich-svg-2744519006-terminal { position: relative; display: flex; flex-direction: column; @@ -49,7 +49,7 @@ border-radius: 14px; box-shadow: 0 0 0 1px #484848; } - .rich-svg-3399521216-terminal:after { + .rich-svg-2744519006-terminal:after { position: absolute; width: 100%; height: 100%; @@ -60,7 +60,7 @@ transform: rotate(-4.5deg); z-index: -1; } - .rich-svg-3399521216-terminal-header { + .rich-svg-2744519006-terminal-header { position: relative; width: 100%; background-color: #2e2e2e; @@ -72,7 +72,7 @@ box-shadow: inset 0px -1px 0px 0px #4e4e4e, inset 0px -4px 8px 0px #1a1a1a; } - .rich-svg-3399521216-terminal-title-tab { + .rich-svg-2744519006-terminal-title-tab { display: inline-block; margin-top: 14px; margin-left: 124px; @@ -85,36 +85,36 @@ inset 1px 0px 0px 0px #4e4e4e, inset -1px 0px 0px 0px #4e4e4e; } - .rich-svg-3399521216-terminal-traffic-lights { + .rich-svg-2744519006-terminal-traffic-lights { position: absolute; top: 24px; left: 20px; } - .rich-svg-3399521216-terminal-body { + .rich-svg-2744519006-terminal-body { line-height: 22px; padding: 14px; } - .rich-svg-3399521216-terminal-body .r1 {color: #f2f2f2; text-decoration-color: #f2f2f2;background-color: #0c0c0c;} -.rich-svg-3399521216-terminal-body .r2 {font-weight: bold;color: #f2f2f2; text-decoration-color: #f2f2f2;;background-color: #0c0c0c;} -.rich-svg-3399521216-terminal-body .r3 {color: #e5e510; text-decoration-color: #e5e510; font-weight: bold;background-color: #0c0c0c;} -.rich-svg-3399521216-terminal-body .r4 {color: #7f7f7f; text-decoration-color: #7f7f7f;color: #f2f2f2; text-decoration-color: #f2f2f2;;background-color: #0c0c0c;} -.rich-svg-3399521216-terminal-body .r5 {color: #11a8cd; text-decoration-color: #11a8cd; font-weight: bold;background-color: #0c0c0c;} -.rich-svg-3399521216-terminal-body .r6 {color: #0dbc79; text-decoration-color: #0dbc79; font-weight: bold;background-color: #0c0c0c;} -.rich-svg-3399521216-terminal-body .r7 {color: #78780e; text-decoration-color: #78780e;background-color: #0c0c0c;} + .rich-svg-2744519006-terminal-body .r1 {color: #f2f2f2; text-decoration-color: #f2f2f2;background-color: #0c0c0c;} +.rich-svg-2744519006-terminal-body .r2 {font-weight: bold;color: #f2f2f2; text-decoration-color: #f2f2f2;;background-color: #0c0c0c;} +.rich-svg-2744519006-terminal-body .r3 {color: #e5e510; text-decoration-color: #e5e510; font-weight: bold;background-color: #0c0c0c;} +.rich-svg-2744519006-terminal-body .r4 {color: #7f7f7f; text-decoration-color: #7f7f7f;color: #f2f2f2; text-decoration-color: #f2f2f2;;background-color: #0c0c0c;} +.rich-svg-2744519006-terminal-body .r5 {color: #11a8cd; text-decoration-color: #11a8cd; font-weight: bold;background-color: #0c0c0c;} +.rich-svg-2744519006-terminal-body .r6 {color: #0dbc79; text-decoration-color: #0dbc79; font-weight: bold;background-color: #0c0c0c;} +.rich-svg-2744519006-terminal-body .r7 {color: #78780e; text-decoration-color: #78780e;background-color: #0c0c0c;} </style> <foreignObject x="0" y="0" width="100%" height="100%"> <body xmlns="http://www.w3.org/1999/xhtml"> - <div class="rich-svg-3399521216-terminal-wrapper"> - <div class="rich-svg-3399521216-terminal"> - <div class="rich-svg-3399521216-terminal-header"> - <svg class="rich-svg-3399521216-terminal-traffic-lights" width="90" height="21" viewBox="0 0 90 21" xmlns="http://www.w3.org/2000/svg"> + <div class="rich-svg-2744519006-terminal-wrapper"> + <div class="rich-svg-2744519006-terminal"> + <div class="rich-svg-2744519006-terminal-header"> + <svg class="rich-svg-2744519006-terminal-traffic-lights" width="90" height="21" viewBox="0 0 90 21" xmlns="http://www.w3.org/2000/svg"> <circle cx="14" cy="8" r="8" fill="#ff6159"/> <circle cx="38" cy="8" r="8" fill="#ffbd2e"/> <circle cx="62" cy="8" r="8" fill="#28c941"/> </svg> - <div class="rich-svg-3399521216-terminal-title-tab">Command: build-docs</div> + <div class="rich-svg-2744519006-terminal-title-tab">Command: build-docs</div> </div> - <div class="rich-svg-3399521216-terminal-body"> + <div class="rich-svg-2744519006-terminal-body"> <div><span class="r2"> </span></div> <div><span class="r2"> </span><span class="r3">Usage: </span><span class="r2">breeze build-docs [OPTIONS] </span></div> <div><span class="r2"> </span></div> @@ -123,6 +123,7 @@ <div><span class="r4">╭─ Doc flags ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮</span></div> <div><span class="r4">│</span><span class="r1"> </span><span class="r5">--docs-only</span><span class="r1"> </span><span class="r6">-d</span><span class="r1"> </span><span class="r1">Only build documentation. </span><span class="r1"> </span><span class="r4">│</span></div> <div><span class="r4">│</span><span class="r1"> </span><span class="r5">--spellcheck-only</span><span class="r1"> </span><span class="r6">-s</span><span class="r1"> </span><span class="r1">Only run spell checking. </span><span class="r1"> </span><span class="r4">│</span></div> +<div><span class="r4">│</span><span class="r1"> </span><span class="r5">--for-production</span><span class="r1"> </span><span class="r6">-p</span><span class="r1"> </span><span class="r1">Builds documentation for official release i.e. all links point to stable version. </span><span class="r1"> </span><span class="r4">│</span></div> <div><span class="r4">│</span><span class="r1"> </span><span class="r5">--package-filter</span><span class="r1"> </span><span class="r6">-p</span><span class="r1"> </span><span class="r1">List of packages to consider. </span><span class="r1"> </span><span class="r4">│</span></div> <div><span class="r4">│</span><span class="r1"> </span><span class="r7">(apache-airflow | apache-airflow-providers | apache-airflow-providers-airbyte | </span><span class="r1"> </span><span class="r4">│</span></div> <div><span class="r4">│</span><span class="r1"> </span><span class="r7">apache-airflow-providers-alibaba | apache-airflow-providers-amazon | </span><span class="r1"> </span><span class="r4">│</span></div>
