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:

And no "system tests" links in provider's - neither sidebar, nor main page:

But the sources are there.
Both for legacy exmple dags:

And for new system tests:

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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]