Skip to content

Conversation

@kanterov
Copy link
Collaborator

Changes

Configure Sphinx docs for Python code.

There is a lot of customization for Sphinx output to make complex type signatures readable:

  • Type dicts are not documented, because they exactly follow dataclass schema
  • Variables are excluded from type signatures

After that, when the rest of the code is ready, we can automatically publish docs into gh-pages.

Tests

Adds CI check

@kanterov kanterov marked this pull request as ready for review March 14, 2025 14:21
@kanterov kanterov temporarily deployed to test-trigger-is March 14, 2025 14:21 — with GitHub Actions Inactive

`databricks-bundles` package implements Python support for Databricks Asset Bundles.

See `What is Python support for Databricks Asset Bundles? (TBD) <#>`_.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should link the user guide a bit later.

@kanterov kanterov temporarily deployed to test-trigger-is March 14, 2025 14:29 — with GitHub Actions Inactive
"databricks.bundles.core._variable._T": "databricks.bundles.core.T",
"databricks.bundles.core._diagnostics._T": "databricks.bundles.core.T",
"databricks.bundles.core._resource_mutator._T": "databricks.bundles.core.T",
# use dataclasses instead of typed dicts used in databricks.bundles.core
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment still accurate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Sphinx has a problem with type aliases. It looks into the signature it references "JobParam". The actual value is JobDict | Job, but there is nothing in the docs that resembles JobDict. So we just override it to link to Job.

@kanterov kanterov added this pull request to the merge queue Mar 17, 2025
Merged via the queue into main with commit 8141683 Mar 17, 2025
15 checks passed
@kanterov kanterov deleted the python-sphinx branch March 17, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants