Skip to content

[FLINK-39067][docs] Move Python documentation from Hugo to PyDocs#27586

Open
MartijnVisser wants to merge 2 commits intoapache:masterfrom
MartijnVisser:FLINK-39067-move-to-pydocs
Open

[FLINK-39067][docs] Move Python documentation from Hugo to PyDocs#27586
MartijnVisser wants to merge 2 commits intoapache:masterfrom
MartijnVisser:FLINK-39067-move-to-pydocs

Conversation

@MartijnVisser
Copy link
Contributor

@MartijnVisser MartijnVisser commented Feb 11, 2026

What is the purpose of the change

Migrate Python-specific documentation pages from the main Hugo docs site into the Sphinx-based PyDocs (flink-python/docs/) as part of FLIP-561. This consolidates all Python documentation into a single cohesive location.

Brief change log

  • Add user_guide/ section to PyDocs covering Table API, DataStream API, configuration, dependency management, debugging, metrics, FAQs, and Python REPL
  • Replace moved Hugo pages (English + Chinese) with redirect stubs to preserve backward-compatible URLs
  • Set up Sphinx i18n with gettext for Chinese translations, including populated .po files from existing Hugo Chinese content
  • Add language switcher component to PyDocs navbar
  • Use sphinx.ext.extlinks with FLINK_DOCS_BASE_URL env var for version-configurable cross-references to main Flink docs
  • Update CI docs.sh to build Chinese PyDocs into zh/ subdirectory
  • Add sphinx-intl to sphinx dependency group in pyproject.toml
  • Add Makefile targets for gettext and Chinese docs builds
  • Update .gitignore for locale build artifacts

Verifying this change

PyDocs (English + Chinese)

  cd flink-python
  pip install -e ".[sphinx]"
  cd docs
  make clean && make html-zh && make serve

Then open http://localhost:8080/ and check:

  • "User Guide" appears in the left nav
  • All pages render correctly (code blocks, tables, links)
  • :flinkdoc: links point to flink-docs-master
  • Language toggle in the top navbar switches between English and Chinese (/zh/)

Hugo docs (redirects)

  cd docs
  git submodule update --init --recursive
  ./setup_hugo.sh
  ./setup_docs.sh
  ./build_docs.sh --skip-integrate-connector-docs

Then at http://localhost:1313/ check:

  • "Python" section is gone from left nav under Flink APIs
  • "Python DataStream" section is gone under DataStream API
  • "Python REPL" is gone under Deployment > REPLs
  • "Python User-defined Functions" still appears under Table API > Functions (as a stub with a link to PyDocs)
  • Old URLs like /docs/dev/python/ redirect to /api/python/user_guide/

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Feb 11, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@MartijnVisser MartijnVisser force-pushed the FLINK-39067-move-to-pydocs branch 2 times, most recently from 74dea2d to 5f5b109 Compare February 12, 2026 08:15
@MartijnVisser
Copy link
Contributor Author

@flinkbot run azure

1 similar comment
@MartijnVisser
Copy link
Contributor Author

@flinkbot run azure

@MartijnVisser MartijnVisser force-pushed the FLINK-39067-move-to-pydocs branch from 5f5b109 to 5de714b Compare February 12, 2026 13:44
Migrate Python-specific documentation pages from the main Hugo docs
site into the Sphinx-based PyDocs (flink-python/docs/) as part of
FLIP-561. This consolidates all Python documentation into a single
cohesive location.

Changes:
- Add user_guide/ section to PyDocs covering
  Table API, DataStream API, configuration, dependency management,
  debugging, metrics, FAQs, and Python REPL
- Replace moved Hugo pages (English + Chinese) with redirect stubs
  to preserve backward-compatible URLs
- Set up Sphinx i18n with gettext for Chinese translations, including
  populated .po files from existing Hugo Chinese content
- Add language switcher component to PyDocs navbar
- Use sphinx.ext.extlinks with FLINK_DOCS_BASE_URL env var for
  version-configurable cross-references to main Flink docs
- Update CI docs.sh to build Chinese PyDocs into zh/ subdirectory
- Add sphinx-intl to sphinx dependency group in pyproject.toml
- Add Makefile targets for gettext and Chinese docs builds
- Update .gitignore for locale build artifacts
- Add Getting Started section with installation and quickstart guides
- Add Cookbook section with word count recipe
- Add Developer Guide section linking to Flink contributor docs
- Add user guide pages: overview, tutorials, performance tuning, state
- Add table sub-pages: metrics, operations, python types
- Add PyFlink architecture diagrams
- Replace configuration page with expanded version
- Fix navigation depth to show sub-pages in sidebar
- Add make serve target for local development
@MartijnVisser MartijnVisser force-pushed the FLINK-39067-move-to-pydocs branch from 08b84d3 to d7a1fd5 Compare February 13, 2026 14:57
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.

2 participants