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 2022/06/10 22:03:51 UTC

[GitHub] [airflow] potiuk opened a new pull request, #24386: Fix links to sources for examples

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

   The links to example sources in exampleinclude have been broken in a
   number of providers and they were additionally broken by AIP-47.
   
   This PR fixes it.
   
   <!--
   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/main/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 a newsfragement file, named `{pr_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] ashb commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895497068


##########
docs/__init__.py:
##########
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one

Review Comment:
   What's the reason for adding 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895506685


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   Yes I also thought we might not need that. It's Mainly there add it to any toc tree- if we don't do it, sphinx complains that the index is missing from the toc tree. Do you know how to exclude those links in general? I am happy to remove them, but I simply have no idea how. Likely some exclude somewhere in sphinx config. 
   
   Previously example dags were excluded by `*/example_dags/*` and that's why it was not needed but with the latest sphinx update it caused hte problem of missing examples.  We cannot exclude them this way because then they will be removed from the generated html (that was precisely the root cause of missing links previously - the "missing index in toc tree" was not generated but also link to example dags led to 404 because the generated example_dags pages were missing.
   
   So if we know a better way to keep the files but not to have them included in any toc tree - that would be awesome. But I do no know how to do it.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on pull request #24386: Fix links to sources for examples

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

   @mik-laj - finally got some time to take a look and It looks I managed to fix it :)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895947205


##########
docs/conf.py:
##########
@@ -668,18 +674,23 @@ def _get_params(root_schema: dict, prefix: str = "", default_section: str = "")
     PACKAGE_DIR,
 ]
 
+if SYSTEM_TESTS_DIR and os.path.exists(SYSTEM_TESTS_DIR):
+    autoapi_dirs.append(SYSTEM_TESTS_DIR)
+
 # A directory that has user-defined templates to override our default templates.
 if PACKAGE_NAME == 'apache-airflow':
     autoapi_template_dir = 'autoapi_templates'
 
 # A list of patterns to ignore when finding files
 autoapi_ignore = [
     '*/airflow/_vendor/*',
-    '*/example_dags/*',
     '*/_internal*',
     '*/node_modules/*',
     '*/migrations/*',
     '*/contrib/*',
+    '**/example_sla_dag.py',
+    '**/example_taskflow_api_etl_docker_virtualenv.py',
+    '**/example_dag_decorator.py',

Review Comment:
   I can try to remove those and see. :)



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on pull request #24386: Fix links to sources for examples

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

   CC: @josh-fell  - another fix to links for AIP-47
   
   <img width="1219" alt="Screenshot 2022-06-11 at 00 07 11" src="https://user-images.githubusercontent.com/595491/173156966-67e287dc-fa79-4658-9a9e-babdf52e4f8c.png">
   
   vs.
   
   <img width="1725" alt="Screenshot 2022-06-11 at 00 12 09" src="https://user-images.githubusercontent.com/595491/173157465-b6507187-0d0e-4266-9d4c-265a2dc5e2a7.png">
   
   
   I think fixed past broken links will be difficult - because we would have to regenerate a lot of the class "apis" which  were excluded (mistakenly) but I have an idea how we can instead utilise links to github  and post-process links in the generated documenation (very similar to the fix merged yesterday)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895905566


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   eeechhh.  Bash operator is still not there :( 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895680579


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   This would be too easy. 
   
   But I am close to get it (and I also found some index inconsistencies that I am also fixing).



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on pull request #24386: Fix links to sources for examples

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

   cc: @rbiegacz


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] github-actions[bot] commented on pull request #24386: Fix links to sources for examples

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

   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, 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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895967352


##########
docs/conf.py:
##########
@@ -668,18 +674,23 @@ def _get_params(root_schema: dict, prefix: str = "", default_section: str = "")
     PACKAGE_DIR,
 ]
 
+if SYSTEM_TESTS_DIR and os.path.exists(SYSTEM_TESTS_DIR):
+    autoapi_dirs.append(SYSTEM_TESTS_DIR)
+
 # A directory that has user-defined templates to override our default templates.
 if PACKAGE_NAME == 'apache-airflow':
     autoapi_template_dir = 'autoapi_templates'
 
 # A list of patterns to ignore when finding files
 autoapi_ignore = [
     '*/airflow/_vendor/*',
-    '*/example_dags/*',
     '*/_internal*',
     '*/node_modules/*',
     '*/migrations/*',
     '*/contrib/*',
+    '**/example_sla_dag.py',
+    '**/example_taskflow_api_etl_docker_virtualenv.py',
+    '**/example_dag_decorator.py',

Review Comment:
   Pretty cryptic:
   
   ```
   ============================== apache-airflow ==============================
   ------------------------------ Error   1 --------------------
   WARNING: Unknown type: placeholder
   
   ------------------------------ Error   2 --------------------
   WARNING: Unknown type: placeholder
   ```
   
   When I remove them. I will leave to the next poor soul that will start thinking that fixing docs building **MUST** be easy.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] ashb commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895631208


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html?highlight=hidden#directive-toctree maybe?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on pull request #24386: Fix links to sources for examples

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

   I also excluded docs from the "no relative imports rule" and converted the imports there to be relative in order to make "docs building utils" work fine with scripts and flake/isort without having to do some "noqa: excludes" @mik-laj. 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895506685


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   Yes I also thought we might not need that. It's Mainly there add it to any toc tree- if we don't do it, sphinx complains that the index is missing from the toc tree. Do you know how to exclude those links in general? I am happy to remove them, but I simply have no idea how. Likely some exclude somewhere in sphinx autoapI. 
   
   Previously example dags were excluded by `*/example_dags/*` and that's why it was not needed but witt the latest sphinx update - but we cannot exclude them this way because then they will be removed from the generated html (that was precisely the root cause of missing links previously - the "missing index in toc tree" was not generated but also link to example dags led to 404 because the generated example_dags pages were missing.
   
   So if we know a better way to keep the files but not to have them included in any toc tree - that would be awesome. But I do no know how to do it.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895901294


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   FYI. @ashb  The main problem was that :hidden: in toc tree did not remove the sidebar link. And I found out in the theme we can disable sidebar links for hidden TOC, but we were already using this in "apache-airfow" and "chart" (but luckily only there) to show sidebar content while not showing TOC in the page. 
   
   Now we have hidden links shown in the sidebar in Airflow:
   
   ![image](https://user-images.githubusercontent.com/595491/173365633-0a5f2d75-57ce-4b3b-9b71-04d4728340a3.png)
   
   And no  "system tests" links in provider's - neither sidebar, nor main page:
   
   ![image](https://user-images.githubusercontent.com/595491/173365865-ab20c8e7-f9b8-4f6c-83df-f76200f1b085.png)
   
   But the sources are there.
   
   Both for legacy exmple dags:
   
   ![image](https://user-images.githubusercontent.com/595491/173366123-b0558d5a-04c3-402b-9236-ba2190f3e69c.png)
   
   And for new system tests:
   
   ![image](https://user-images.githubusercontent.com/595491/173366357-e2051922-b309-43ed-baed-139d9d3a6432.png)
   
   Also we have consistent "example dags" links 
   
   Wasn't THAT straightforward :). But finally seems to be there.
   
   
   
   I also found a few inconsistencies in provider indexes that I fixed.  The system tests for google providers were moved without sub-folders (which was wrong). 
   
   The `__init__.py` works nicely for docs scripts too. While enabling relative imports in "docs" I managed to make it in the way that:
   
   * no need to insert syspath before imports
   * build_docs.py ./publish_docs.py still works with shebang as executables and you can run it either with local airflow venv or in breeze for repeatability
   * isort behaviour is consistent no matter if you only modify docs/* python files or run pre-commit for --all-files
   * we have no implicit package in docs.
   
   I also double-checked that adding __init__.py in docs did not mess with the airflow package (which I was afraid that could be side effect:
   
   ```
   ⌂85% θ92° [jarek:~/code/airflow] [airflow-3.7] fix-source-links-in-examples(+15/-1)+ 41s ± unzip -t dist/apache_airflow-2.4.0.dev0-py3-none-any.whl| grep doc
       testing: airflow/contrib/operators/docker_swarm_operator.py   OK
       testing: airflow/hooks/docker_hook.py   OK
       testing: airflow/operators/docker_operator.py   OK
       testing: airflow/providers/docker/__init__.py   OK
       testing: airflow/providers/docker/decorators/__init__.py   OK
       testing: airflow/providers/docker/decorators/docker.py   OK
       testing: airflow/providers/docker/hooks/__init__.py   OK
       testing: airflow/providers/docker/hooks/docker.py   OK
       testing: airflow/providers/docker/operators/__init__.py   OK
       testing: airflow/providers/docker/operators/docker.py   OK
       testing: airflow/providers/docker/operators/docker_swarm.py   OK
       testing: airflow/utils/docs.py    OK
       testing: airflow/www/static/dist/redoc.standalone.js   OK
       testing: airflow/www/static/dist/redoc.standalone.js.LICENSE.txt   OK
       testing: airflow/www/static/dist/redoc.standalone.js.map   OK
       testing: airflow/www/templates/airflow/redoc.html   OK
       testing: airflow/www/templates/appbuilder/dag_docs.html   OK
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on pull request #24386: Fix links to sources for examples

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

   @mik-laj  :) ? 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on pull request #24386: Fix links to sources for examples

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

   Hell yeah! I THINK ALL IS GOOD!
   
   ![image](https://user-images.githubusercontent.com/595491/173405344-88b430e1-5af7-4a2f-97b8-7074af97eee5.png)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk merged pull request #24386: Fix links to sources for examples

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


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895506685


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   Yes I also thought we might not need that. It's Mainly there add it to any toc tree- if we don't do it, sphinx complains that the index is missing from the toc tree. Do you know how to exclude those links in general? I am happy to remove them, but I simply have no idea how. Likely some exclude somewhere in sphinx config. 
   
   Previously example dags were excluded by `*/example_dags/*` and that's why it was not needed but with the latest sphinx update - but we cannot exclude them this way because then they will be removed from the generated html (that was precisely the root cause of missing links previously - the "missing index in toc tree" was not generated but also link to example dags led to 404 because the generated example_dags pages were missing.
   
   So if we know a better way to keep the files but not to have them included in any toc tree - that would be awesome. But I do no know how to do it.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] ashb commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895944659


##########
docs/conf.py:
##########
@@ -668,18 +674,23 @@ def _get_params(root_schema: dict, prefix: str = "", default_section: str = "")
     PACKAGE_DIR,
 ]
 
+if SYSTEM_TESTS_DIR and os.path.exists(SYSTEM_TESTS_DIR):
+    autoapi_dirs.append(SYSTEM_TESTS_DIR)
+
 # A directory that has user-defined templates to override our default templates.
 if PACKAGE_NAME == 'apache-airflow':
     autoapi_template_dir = 'autoapi_templates'
 
 # A list of patterns to ignore when finding files
 autoapi_ignore = [
     '*/airflow/_vendor/*',
-    '*/example_dags/*',
     '*/_internal*',
     '*/node_modules/*',
     '*/migrations/*',
     '*/contrib/*',
+    '**/example_sla_dag.py',
+    '**/example_taskflow_api_etl_docker_virtualenv.py',
+    '**/example_dag_decorator.py',

Review Comment:
   These files had problems/not used, right?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895506685


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   Yes I also thought we might not need that. It's Mainly there add it to any toc tree- if we don't do it, sphinx complains that the index is missing from the toc tree. Do you know how to exclude those links in general? I am happy to remove them, but I simply have no idea how. Likely some exclude somewhere in sphinx config. 
   
   Previously example dags were excluded by `*/example_dags/*` and that's why it was not needed but witt the latest sphinx update - but we cannot exclude them this way because then they will be removed from the generated html (that was precisely the root cause of missing links previously - the "missing index in toc tree" was not generated but also link to example dags led to 404 because the generated example_dags pages were missing.
   
   So if we know a better way to keep the files but not to have them included in any toc tree - that would be awesome. But I do no know how to do it.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895527928


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   Ok I think I found a way.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895501154


##########
docs/__init__.py:
##########
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one

Review Comment:
   > I also excluded docs from the "no relative imports rule" and converted the imports there to be relative in order to make "docs building utils" work fine with scripts and flake/isort without having to do some "noqa: excludes"
   
   The main reason was that isort produced different sorting order depending on was run on just "docs" or "all files". Simply sometimes "docs" were treated as implicit package in "airflow" and sometimes as standalone "implicit" package and sorting order depended on that (even adding "docs" as known package in setup.cfg did not help. converting docs to regular "standard" python package helped.
   
   



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] ashb commented on a diff in pull request #24386: Fix links to sources for examples

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #24386:
URL: https://github.com/apache/airflow/pull/24386#discussion_r895497586


##########
docs/apache-airflow-providers-apache-cassandra/index.rst:
##########
@@ -33,6 +33,7 @@ Content
     :caption: References
 
     Python API <_api/airflow/providers/apache/cassandra/index>
+    System Tests <_api/tests/system/providers/apache/cassandra/index>

Review Comment:
   Why are we linking to this from user facing docs? That seems to me like a very odd thing to do.
   
   In other words: I can't think of any reason why a user would ever visit and git anything useful from this page.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on pull request #24386: Fix links to sources for examples

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

   Merging quickly to fix docs-buiild error introduced in #24413  - it built except that doc error


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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