You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/08 10:03:44 UTC

[GitHub] [airflow] potiuk opened a new pull request #15737: Add download information to installation page

potiuk opened a new pull request #15737:
URL: https://github.com/apache/airflow/pull/15737


   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#issuecomment-842164297


   The PR is likely ready to be merged. No tests are needed as no important environment files, nor python files were modified by it. However, committers might decide that full test matrix is needed and add the 'full tests needed' label. Then you should rebase it to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#discussion_r633360972



##########
File path: docs/exts/extra_files_with_substitutions.py
##########
@@ -25,19 +25,28 @@ def copy_docker_compose(app, exception):
     if exception or not isinstance(app.builder, builders.StandaloneHTMLBuilder):
         return
 
-    # Replace `|version|` in the docker-compose.yaml that we produce in the built docs
-    for path in app.config.html_extra_with_substituions:
+    # Replace `|version|` in the docker-compose.yaml that requires manual substitutions
+    for path in app.config.html_extra_with_substitutions:
         with open(path) as file:
-            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output:
+            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output_file:
                 for line in file:
-                    output.write(line.replace('|version|', app.config.version))
+                    output_file.write(line.replace('|version|', app.config.version))
+
+    # Replace `|version|` in the installation.html that requires manual substitutions (in links)
+    for path in app.config.manual_substitutions_in_generated_html:
+        with open(os.path.join(app.outdir, os.path.basename(path))) as input_file:
+            content = input_file.readlines()
+        with open(os.path.join(app.outdir, os.path.basename(path)), "wt") as output_file:
+            for line in content:
+                output_file.write(line.replace('|version|', app.config.version))

Review comment:
       Not really - it does not handle it when they are part of URL :(

##########
File path: docs/exts/extra_files_with_substitutions.py
##########
@@ -25,19 +25,28 @@ def copy_docker_compose(app, exception):
     if exception or not isinstance(app.builder, builders.StandaloneHTMLBuilder):
         return
 
-    # Replace `|version|` in the docker-compose.yaml that we produce in the built docs
-    for path in app.config.html_extra_with_substituions:
+    # Replace `|version|` in the docker-compose.yaml that requires manual substitutions
+    for path in app.config.html_extra_with_substitutions:
         with open(path) as file:
-            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output:
+            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output_file:
                 for line in file:
-                    output.write(line.replace('|version|', app.config.version))
+                    output_file.write(line.replace('|version|', app.config.version))
+
+    # Replace `|version|` in the installation.html that requires manual substitutions (in links)
+    for path in app.config.manual_substitutions_in_generated_html:
+        with open(os.path.join(app.outdir, os.path.basename(path))) as input_file:
+            content = input_file.readlines()
+        with open(os.path.join(app.outdir, os.path.basename(path)), "wt") as output_file:
+            for line in content:
+                output_file.write(line.replace('|version|', app.config.version))

Review comment:
       `Apache Airflow |version| sdist package <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz.sha512>`__)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#discussion_r633359846



##########
File path: docs/exts/extra_files_with_substitutions.py
##########
@@ -25,19 +25,28 @@ def copy_docker_compose(app, exception):
     if exception or not isinstance(app.builder, builders.StandaloneHTMLBuilder):
         return
 
-    # Replace `|version|` in the docker-compose.yaml that we produce in the built docs
-    for path in app.config.html_extra_with_substituions:
+    # Replace `|version|` in the docker-compose.yaml that requires manual substitutions
+    for path in app.config.html_extra_with_substitutions:
         with open(path) as file:
-            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output:
+            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output_file:
                 for line in file:
-                    output.write(line.replace('|version|', app.config.version))
+                    output_file.write(line.replace('|version|', app.config.version))
+
+    # Replace `|version|` in the installation.html that requires manual substitutions (in links)
+    for path in app.config.manual_substitutions_in_generated_html:
+        with open(os.path.join(app.outdir, os.path.basename(path))) as input_file:
+            content = input_file.readlines()
+        with open(os.path.join(app.outdir, os.path.basename(path)), "wt") as output_file:
+            for line in content:
+                output_file.write(line.replace('|version|', app.config.version))

Review comment:
       This is coming from install.rst right? If so then Sphinx's native replacement should already handle this!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#discussion_r633360972



##########
File path: docs/exts/extra_files_with_substitutions.py
##########
@@ -25,19 +25,28 @@ def copy_docker_compose(app, exception):
     if exception or not isinstance(app.builder, builders.StandaloneHTMLBuilder):
         return
 
-    # Replace `|version|` in the docker-compose.yaml that we produce in the built docs
-    for path in app.config.html_extra_with_substituions:
+    # Replace `|version|` in the docker-compose.yaml that requires manual substitutions
+    for path in app.config.html_extra_with_substitutions:
         with open(path) as file:
-            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output:
+            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output_file:
                 for line in file:
-                    output.write(line.replace('|version|', app.config.version))
+                    output_file.write(line.replace('|version|', app.config.version))
+
+    # Replace `|version|` in the installation.html that requires manual substitutions (in links)
+    for path in app.config.manual_substitutions_in_generated_html:
+        with open(os.path.join(app.outdir, os.path.basename(path))) as input_file:
+            content = input_file.readlines()
+        with open(os.path.join(app.outdir, os.path.basename(path)), "wt") as output_file:
+            for line in content:
+                output_file.write(line.replace('|version|', app.config.version))

Review comment:
       Not really - it does not handle it when they are part of URL :(




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#discussion_r633359846



##########
File path: docs/exts/extra_files_with_substitutions.py
##########
@@ -25,19 +25,28 @@ def copy_docker_compose(app, exception):
     if exception or not isinstance(app.builder, builders.StandaloneHTMLBuilder):
         return
 
-    # Replace `|version|` in the docker-compose.yaml that we produce in the built docs
-    for path in app.config.html_extra_with_substituions:
+    # Replace `|version|` in the docker-compose.yaml that requires manual substitutions
+    for path in app.config.html_extra_with_substitutions:
         with open(path) as file:
-            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output:
+            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output_file:
                 for line in file:
-                    output.write(line.replace('|version|', app.config.version))
+                    output_file.write(line.replace('|version|', app.config.version))
+
+    # Replace `|version|` in the installation.html that requires manual substitutions (in links)
+    for path in app.config.manual_substitutions_in_generated_html:
+        with open(os.path.join(app.outdir, os.path.basename(path))) as input_file:
+            content = input_file.readlines()
+        with open(os.path.join(app.outdir, os.path.basename(path)), "wt") as output_file:
+            for line in content:
+                output_file.write(line.replace('|version|', app.config.version))

Review comment:
       This is coming from install.rst right? If so then Sphinx's native replacement should already handle this!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #15737:
URL: https://github.com/apache/airflow/pull/15737


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#discussion_r633361303



##########
File path: docs/exts/extra_files_with_substitutions.py
##########
@@ -25,19 +25,28 @@ def copy_docker_compose(app, exception):
     if exception or not isinstance(app.builder, builders.StandaloneHTMLBuilder):
         return
 
-    # Replace `|version|` in the docker-compose.yaml that we produce in the built docs
-    for path in app.config.html_extra_with_substituions:
+    # Replace `|version|` in the docker-compose.yaml that requires manual substitutions
+    for path in app.config.html_extra_with_substitutions:
         with open(path) as file:
-            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output:
+            with open(os.path.join(app.outdir, os.path.basename(path)), "w") as output_file:
                 for line in file:
-                    output.write(line.replace('|version|', app.config.version))
+                    output_file.write(line.replace('|version|', app.config.version))
+
+    # Replace `|version|` in the installation.html that requires manual substitutions (in links)
+    for path in app.config.manual_substitutions_in_generated_html:
+        with open(os.path.join(app.outdir, os.path.basename(path))) as input_file:
+            content = input_file.readlines()
+        with open(os.path.join(app.outdir, os.path.basename(path)), "wt") as output_file:
+            for line in content:
+                output_file.write(line.replace('|version|', app.config.version))

Review comment:
       `Apache Airflow |version| sdist package <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz>`_ (`asc <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz.asc>`__, `sha512 <https://downloads.apache.org/airflow/|version|/apache-airflow-|version|-bin.tar.gz.sha512>`__)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#issuecomment-841845863


   @kaxil @ashb - small one to add downloads before 2.1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #15737:
URL: https://github.com/apache/airflow/pull/15737


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#issuecomment-841845863


   @kaxil @ashb - small one to add downloads before 2.1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#issuecomment-842164297


   The PR is likely ready to be merged. No tests are needed as no important environment files, nor python files were modified by it. However, committers might decide that full test matrix is needed and add the 'full tests needed' label. Then you should rebase it to the latest master or amend the last commit of the PR, and push it with --force-with-lease.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15737: Update installation page

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15737:
URL: https://github.com/apache/airflow/pull/15737#issuecomment-840998698


   Small but I think worth merging before 2.1 for the download links 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org