Skip to content

Commit 781db9d

Browse files
authored
chore: update pyproject.toml files, remove codespell (#33028)
- Removes Codespell from deps, docs, and `Makefile`s - Python version requirements in all `pyproject.toml` files now use the `~=` (compatible release) specifier - All dependency groups and main dependencies now use explicit lower and upper bounds, reducing potential for breaking changes
1 parent f2b0afd commit 781db9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+6395
-4885
lines changed

.github/workflows/extract_ignored_words_list.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all clean help docs_build docs_clean docs_linkcheck api_docs_build api_docs_clean api_docs_linkcheck spell_check spell_fix lint lint_package lint_tests format format_diff
1+
.PHONY: all clean help docs_build docs_clean docs_linkcheck api_docs_build api_docs_clean api_docs_linkcheck lint lint_package lint_tests format format_diff
22

33
.EXPORT_ALL_VARIABLES:
44
UV_FROZEN = true
@@ -78,18 +78,6 @@ api_docs_linkcheck:
7878
fi
7979
@echo "✅ API link check complete"
8080

81-
## spell_check: Run codespell on the project.
82-
spell_check:
83-
@echo "✏️ Checking spelling across project..."
84-
uv run --group codespell codespell --toml pyproject.toml
85-
@echo "✅ Spell check complete"
86-
87-
## spell_fix: Run codespell on the project and fix the errors.
88-
spell_fix:
89-
@echo "✏️ Fixing spelling errors across project..."
90-
uv run --group codespell codespell --toml pyproject.toml -w
91-
@echo "✅ Spelling errors fixed"
92-
9381
######################
9482
# LINTING AND FORMATTING
9583
######################
@@ -100,7 +88,7 @@ lint lint_package lint_tests:
10088
uv run --group lint ruff check docs cookbook
10189
uv run --group lint ruff format docs cookbook cookbook --diff
10290
git --no-pager grep 'from langchain import' docs cookbook | grep -vE 'from langchain import (hub)' && echo "Error: no importing langchain from root in docs, except for hub" && exit 1 || exit 0
103-
91+
10492
git --no-pager grep 'api.python.langchain.com' -- docs/docs ':!docs/docs/additional_resources/arxiv_references.mdx' ':!docs/docs/integrations/document_loaders/sitemap.ipynb' || exit 0 && \
10593
echo "Error: you should link python.langchain.com/api_reference, not api.python.langchain.com in the docs" && \
10694
exit 1

docs/docs/contributing/how_to/code/setup.mdx

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -189,40 +189,6 @@ This can be very helpful when you've made changes to only certain parts of the p
189189

190190
We recognize linting can be annoying - if you do not want to do it, please contact a project maintainer, and they can help you with it. We do not want this to be a blocker for good code getting contributed.
191191

192-
### Spellcheck
193-
194-
Spellchecking for this project is done via [codespell](https://github.com/codespell-project/codespell).
195-
Note that `codespell` finds common typos, so it could have false-positive (correctly spelled but rarely used) and false-negatives (not finding misspelled) words.
196-
197-
To check spelling for this project:
198-
199-
```bash
200-
# If you have `make` installed:
201-
make spell_check
202-
203-
# If you don't have `make` (Windows alternative):
204-
uv run --all-groups codespell --toml pyproject.toml
205-
```
206-
207-
To fix spelling in place:
208-
209-
```bash
210-
# If you have `make` installed:
211-
make spell_fix
212-
213-
# If you don't have `make` (Windows alternative):
214-
uv run --all-groups codespell --toml pyproject.toml -w
215-
```
216-
217-
If codespell is incorrectly flagging a word, you can skip spellcheck for that word by adding it to the codespell config in the `pyproject.toml` file.
218-
219-
```python
220-
[tool.codespell]
221-
...
222-
# Add here:
223-
ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure'
224-
```
225-
226192
### Pre-commit
227193

228194
We use [pre-commit](https://pre-commit.com/) to ensure commits are formatted/linted.

libs/cli/langchain_cli/integration_template/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ format format_diff:
4141
[ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES)
4242
[ "$(PYTHON_FILES)" = "" ] || uv run ruff check --fix $(PYTHON_FILES)
4343

44-
spell_check:
45-
uv run codespell --toml pyproject.toml
46-
47-
spell_fix:
48-
uv run codespell --toml pyproject.toml -w
49-
5044
check_imports: $(shell find __module_name__ -name '*.py')
5145
uv run python ./scripts/check_imports.py $^
5246

libs/cli/langchain_cli/integration_template/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "An integration package connecting __ModuleName__ and LangChain"
99
authors = []
1010
readme = "README.md"
1111
license = "MIT"
12-
requires-python = ">=3.10"
12+
requires-python = ">=3.10.0,<4.0.0"
1313
dependencies = [
1414
"langchain-core>=0.3.15",
1515
]
@@ -29,7 +29,6 @@ dev-dependencies = [
2929
"pytest-socket>=0.7.0",
3030
"pytest-watcher>=0.3.4",
3131
"langchain-tests>=0.3.5",
32-
"codespell>=2.2.6",
3332
"ruff>=0.5",
3433
"mypy>=1.10",
3534
]

libs/cli/pyproject.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ build-backend = "pdm.backend"
55
[project]
66
authors = [{ name = "Erick Friis", email = "[email protected]" }]
77
license = { text = "MIT" }
8-
requires-python = ">=3.10"
8+
requires-python = ">=3.10.0,<4.0.0"
99
dependencies = [
10-
"typer<1.0.0,>=0.17",
11-
"gitpython<4,>=3",
12-
"langserve[all]>=0.0.51",
13-
"uvicorn<1.0,>=0.23",
14-
"tomlkit>=0.12",
15-
"gritql<1.0.0,>=0.2.0",
10+
"typer>=0.17.0,<1.0.0",
11+
"gitpython>=3,<4.0.0",
12+
"langserve[all]>=0.0.51,<1.0.0",
13+
"uvicorn>=0.23.0,<1.0.0",
14+
"tomlkit>=0.12.0,<1.0.0",
15+
"gritql>=0.2.0,<1.0.0",
1616
]
1717
name = "langchain-cli"
1818
version = "0.0.37"
@@ -29,8 +29,8 @@ langchain = "langchain_cli.cli:app"
2929
langchain-cli = "langchain_cli.cli:app"
3030

3131
[dependency-groups]
32-
dev = ["pytest<9.0.0,>=7.4.2", "pytest-watcher<1.0.0,>=0.3.4"]
33-
lint = ["ruff<0.13,>=0.12.2", "mypy<1.19,>=1.18.1"]
32+
dev = ["pytest>=7.4.2,<9.0.0", "pytest-watcher>=0.3.4,<1.0.0"]
33+
lint = ["ruff>=0.12.2,<0.13", "mypy>=1.18.1,<1.19"]
3434
test = ["langchain-core", "langchain"]
3535
typing = ["langchain"]
3636
test_integration = []

libs/cli/uv.lock

Lines changed: 34 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/core/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ format format_diff:
5858
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
5959
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
6060

61-
spell_check:
62-
uv run --all-groups codespell --toml pyproject.toml
63-
64-
spell_fix:
65-
uv run --all-groups codespell --toml pyproject.toml -w
66-
6761
benchmark:
6862
uv run pytest tests/benchmarks --codspeed
6963

0 commit comments

Comments
 (0)