Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: converting documentation to mkdocs#5276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
gvwilson wants to merge1 commit intomain
base:main
Choose a base branch
Loading
frommkdocs-conversion

Conversation

gvwilson
Copy link
Contributor

@gvwilsongvwilson commentedJul 10, 2025
edited
Loading

Paired withplotly/plotly.js#7469 (formatting changes to JavaScript that Python docs are derived from).

  • Move contents ofcommands.py to scripts in newbin directory and break
    into individual scripts.
    • Tidy up imports etc. while doing so.
  • Move code generation from./codegen to./bin/codegen.
  • Moveplot-schema.json to./resources rather than burying it under the
    codegen folder.
  • AddMakefile to run commands instead of putting everything incommands.py.
    • Runruff directly for checking and formatting rather than launching a
      subprocess from Python ascommands.py did.
  • Modify.gitignore to ignoredocsanddocs_tmp. (Will eventually want to includedocsor overwritedoc`.)
  • Minor reformatting ofREADME.md.
  • UpdateCONTRIBUTING.md to describe relocation of commands and code
    generation tobin.
    • CONTRIBUTING.md documents--local,--devrepo and--devbranch options
      for updating JavaScript bundle thatcommands.py didn't seem to provide.
  • Addmkdocs.yml configuration file formkdocs.
    • Most of this file was vibe coded using Claude.
    • mkdocs does not support reading configuration frompyproject.toml, so
      we need the extra config file.
    • Usematerial theme.
    • Read hand-written Markdown frompages and write output todocs.
    • Generate module index pages on the fly usingmkdocs-gen-files plugin.
      (See discussion ofbin/generate_reference_pages.py below.)
    • Set docstring style togoogle (even though much of our documentation
      isn't formatted that way).
  • Add placeholder Markdown files inpages that include files from the root
    directory (README, code of conduct, contributors' guide, license).
    • Remove relative links between these pages because they don't work when
      the content is transcluded one directory lower.
  • Modify docstring inplotly/_subplots.py to escape closing] with backslash
    to avoid confusingmkdocs Markdown.
    • Here and elsewhere the escape is written\\] because we need\] in the
      actual string. We could convert the docstrings to literal strings prefixed
      withr to avoid the double backslash.
    • Have also escaped some[ as\\[ for the same reason.
  • Similar change toplotly/basedatatypes.py.
  • Reformat line breaks in docstrings inplotly/express/_core.py.
  • Modifypyproject.toml to installmkdocs and related packages for dev.
  • Modifypyproject.toml to installpydoclint for checking documentation.
    • Currently reporting alot of errors.
  • Updateuv.lock to match.

To do:

  • Movescripts/gen_ref_pages.py intocommands.py. (Can't do this becausemkdocs.yml only accepts the name of the script, not parameters.)
  • Include content from docstrings in hand-written Python code.
  • Include content from docstrings in generated Python code.
  • Include navigation links in left nav bar.
  • Clean up warnings produced bymkdocs.
  • Add linting for docstring style.
  • Clean up (many) errors reported bypydoclint.
  • Re-introduce links between.md files in root directory (taken out because they don't resolve when those files are transcluded frompages/*.md).
  • Fix\[ formatting glitch in the following files (caused by replacing][ with]\[ to avoid Markdown thinking it's a reference link, but the text is inside back quotes):
    • plotly/graph_objs/histogram2dcontour/_contours/index.html
    • plotly/graph_objs/contour/_contours/index.html
    • plotly/graph_objs/contourcarpet/_contours/index.html
    • plotly/graph_objs/table/_header/index.html
    • plotly/graph_objs/table/_cells/index.html

@gvwilsongvwilson added featuresomething new P1needed for current cycle documentationwritten for humans labelsJul 10, 2025
@gvwilsongvwilsonforce-pushed themkdocs-conversion branch 2 times, most recently from6c0e2ec to72e0aefCompareJuly 15, 2025 17:54
@gvwilsongvwilsonforce-pushed themkdocs-conversion branch 2 times, most recently from8011f8f to4e10f11CompareJuly 17, 2025 13:25
…d break  into individual scripts.  - Tidy up imports etc. while doing so.- Move code generation from `./codegen` to `./bin/codegen`.- Move `plot-schema.json` to `./resources` rather than burying it under the  `codegen` folder.- Add `Makefile` to run commands instead of putting everything in `commands.py`.  - Run `ruff` directly for checking and formatting rather than launching a    subprocess from Python as `commands.py` did.- Modify `.gitignore to ignore `docs` and `docs_tmp`. (Will eventually want to  include `docs` or overwrite `doc`.)- Minor reformatting of `README.md`.- Update `CONTRIBUTING.md` to describe relocation of commands and code  generation to `bin`.  - `CONTRIBUTING.md` documents `--local`, `--devrepo` and `--devbranch` options    for updating JavaScript bundle that `commands.py` didn't seem to provide.- Add `mkdocs.yml` configuration file for `mkdocs`.  - Most of this file was vibe coded using Claude.  - `mkdocs` does not support reading configuration from `pyproject.toml`, so    we need the extra config file.  - Use `material` theme.  - Read hand-written Markdown from `pages` and write output to `docs`.  - Generate module index pages on the fly using `mkdocs-gen-files` plugin.    (See discussion of `bin/generate_reference_pages.py` below.)  - Set docstring style to `google` (even though much of our documentation    isn't formatted that way).- Add placeholder Markdown files in `pages` that include files from the root  directory (README, code of conduct, contributors' guide, license).  - Remove relative links between these pages because they don't work when    the content is transcluded one directory lower.- Modify docstring in `plotly/_subplots.py` to escape closing `]` with backslash  to avoid confusing `mkdocs` Markdown.  - Here and elsewhere the escape is written `\\]` because we need `\]` in the    actual string. We could convert the docstrings to literal strings prefixed    with `r` to avoid the double backslash.  - Have also escaped some `[` as `\\[` for the same reason.- Similar change to `plotly/basedatatypes.py`.- Reformat line breaks in docstrings in `plotly/express/_core.py`.- Modify `pyproject.toml` to install `mkdocs` and related packages for dev.- Modify `pyproject.toml` to install `pydoclint` for checking documentation.  - Currently reporting a *lot* of errors.- Update `uv.lock` to match.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@LiamConnorsLiamConnorsAwaiting requested review from LiamConnors

At least 1 approving review is required to merge this pull request.

Labels
documentationwritten for humansfeaturesomething newP1needed for current cycle
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@gvwilson@LiamConnors

[8]ページ先頭

©2009-2025 Movatter.jp