From d5b8733a405e54866a322df1f6c5c228a24434e0 Mon Sep 17 00:00:00 2001 From: Lauren Hirata Singh Date: Tue, 15 Jul 2025 15:22:48 -0400 Subject: [PATCH] ci(docs): Add codespell for docs md and py files (#5494) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Add codespell for markdown files * update * remove path * fix * update linting guidelines * chore[deps]: upgrade dependencies with `uv lock --upgrade` (#5471) Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com> * fix(checkpoint): correct logging call to use logger (#5458) fix[checkpoint]: correct logging call to use logger * release(langgraph): v0.5.3 (#5498) bump * extend to cover python files used for reference docs * fix(docs): Update the graph image link (#5500) Update the graph image link Point to the correct image reference for Map-Reduce and the Send API example * fix(docs): Update graph-api.md File to reflect correct image (#5499) Update graph-api.md File to reflect correct image Referencing to the correct image file * docs(prebuilt): improve documentation in ToolNode module (#5497) Update documentation in ToolNode module * Update changelog via LangGraph Server Changelog Bot * feat(sdk-py): Show is_studio_user (#5505) * Update changelog via LangGraph Server Changelog Bot * fix(docs): Node caching explanation code required a small fix,. (#5473) fix(docs): Node caching explanation code required a small fix, to avoid confusion to readers. The code had `time.sleep(2)` but the note mentioned one second only. Co-authored-by: ygicp * fix(langgraph): add `stacklevel=2` to the warnings to point to the caller’s codes (#5457) chore: add stacklevel=2 to the warnings to point to the caller’s codes * chore(docs): Improve example in use mcp (#5480) * Make example more explicit * Update docs/docs/agents/mcp.md * fix(docs): update examples link (#5515) Co-authored-by: ahmed murtaza * docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5514) Update changelog via LangGraph Server Changelog Bot * fix readmes * fix --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com> Co-authored-by: Michael Li Co-authored-by: Sakshi Gupta <64280320+sakshi1989@users.noreply.github.com> Co-authored-by: Eugene Yurtsev Co-authored-by: Sam Crowder Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com> Co-authored-by: Yagnesh M. Bhadiyadra <35532869+yagneshmb@users.noreply.github.com> Co-authored-by: ygicp Co-authored-by: Ahmed Murtaza Co-authored-by: ahmed murtaza --- .github/workflows/codespell-ignore-words.txt | 11 +++++++++++ .github/workflows/codespell.yml | 12 +++++++++--- CONTRIBUTING.md | 4 ++-- README.md | 2 +- docs/pyproject.toml | 4 +++- libs/langgraph/README.md | 2 +- libs/langgraph/pyproject.toml | 4 ++++ 7 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/codespell-ignore-words.txt diff --git a/.github/workflows/codespell-ignore-words.txt b/.github/workflows/codespell-ignore-words.txt new file mode 100644 index 000000000..07165207b --- /dev/null +++ b/.github/workflows/codespell-ignore-words.txt @@ -0,0 +1,11 @@ +LangChain +LangGraph +LangSmith +thead +stdio +nd +jupyter +lets +lite +uis +deque \ No newline at end of file diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index c5baf4d42..c00bb42ae 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -34,10 +34,16 @@ id: extract_ignore_words - name: Codespell - uses: codespell-project/actions-codespell@v2 + uses: codespell-project/actions-codespell@v2.0 with: - skip: '*.ambr,*.lock,*.ipynb,*.yaml,*.zlib,*.md' + skip: '*.ambr,*.lock,*.ipynb,*.yaml,*.zlib,*.css.map,*.js.map' ignore_words_list: ${{ steps.extract_ignore_words.outputs.ignore_words_list }} # We do this to avoid spellchecking cell outputs - name: Codespell Notebooks - run: make codespell \ No newline at end of file + run: make codespell + + - name: Codespell LangGraph Library + run: | + # Change to root directory to check the main LangGraph library + cd .. + codespell --skip="*.ambr,*.lock,*.ipynb,*.yaml,*.zlib,*.css.map,*.js.map,*.pyc,__pycache__/*" --ignore-words-list="${{ steps.extract_ignore_words.outputs.ignore_words_list }}" libs/langgraph/langgraph/ \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a7c1253a6..253b123d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -249,10 +249,10 @@ make serve-docs #### Linting -The documentation is linted from the **monorepo root**. To lint it, run the following from there: +To spell check the docs, run the following from the `docs` directory: ```bash -make spellcheck +codespell --skip="*.ambr,*.lock,*.ipynb,*.yaml,*.zlib,*.css.map,*.js.map" --ignore-words-list="infor,thead,stdio,nd,jupyter,lets,lite,uis,deque" . ``` ### ️In-code Documentation diff --git a/README.md b/README.md index 2f76733d6..47cc4d052 100644 --- a/README.md +++ b/README.md @@ -81,4 +81,4 @@ While LangGraph can be used standalone, it also integrates seamlessly with any L ## Acknowledgements -LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain. +LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain. \ No newline at end of file diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 8ea0824f1..0f1a931db 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -112,4 +112,6 @@ extend-include = ["*.ipynb"] [tool.codespell] # https://mypy.readthedocs.io/en/stable/config_file.html # comma-separated list -ignore-words-list = "infor" +ignore-words-list = "infor,thead,stdio,nd,jupyter,lets,lite,uis,deque" +# Exclude generated files and directories +skip = "*.ambr,*.lock,*.ipynb,*.yaml,*.zlib,*.css.map,*.js.map" diff --git a/libs/langgraph/README.md b/libs/langgraph/README.md index 2f76733d6..47cc4d052 100644 --- a/libs/langgraph/README.md +++ b/libs/langgraph/README.md @@ -81,4 +81,4 @@ While LangGraph can be used standalone, it also integrates seamlessly with any L ## Acknowledgements -LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain. +LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain. \ No newline at end of file diff --git a/libs/langgraph/pyproject.toml b/libs/langgraph/pyproject.toml index 48c5b6629..f14392880 100644 --- a/libs/langgraph/pyproject.toml +++ b/libs/langgraph/pyproject.toml @@ -106,3 +106,7 @@ packages = ["langgraph"] [tool.pytest.ini_options] addopts = "--full-trace --strict-markers --strict-config --durations=5 --snapshot-warn-unused" + +[tool.codespell] +# Ignore words specific to the LangGraph library code +ignore-words-list = "infor,thead,stdio,nd,jupyter,lets,lite,uis,deque,langgraph,langchain,pydantic,typing,async,await,coroutine,iterable,iterables,serializable,deserializable,checkpointer,checkpointing,stateful,statefulness,prebuilt,prebuilt,supervisor,supervisory,swarm,swarming,multiactor,multiactors,subgraph,subgraphs,workflow,workflows,streaming,streamable,streamed,streamer,streamers,streaming,streamable,streamed,streamer,streamers"