Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

langchain: added vectorstore docstring linting #29241

Merged
merged 10 commits into from
Jan 22, 2025

Conversation

Siddhant231xyz
Copy link
Contributor

…ore.py

Thank you for contributing to LangChain!

  • PR title: "package: description"
    • Where "package" is whichever of langchain, community, core, etc. is being modified. Use "docs: ..." for purely docs changes, "infra: ..." for CI changes.
    • Example: "community: add foobar LLM"

Added docstring linting in the vectorstore.py file relating to issue #25154

  • Add tests and docs: If you're adding a new integration, please include

    1. a test for the integration, preferably unit tests that do not rely on network access,
    2. an example notebook showing its use. It lives in docs/docs/integrations directory.
  • Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:

  • Make sure optional dependencies are imported within a function.
  • Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
  • Most PRs should not touch more than one package.
  • Changes should be backwards compatible.
  • If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.

Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 3:47am

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. langchain Related to the langchain package Ɑ: vector store Related to vector store module 🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs labels Jan 15, 2025
@efriis efriis self-assigned this Jan 16, 2025
@efriis
Copy link
Member

efriis commented Jan 16, 2025

could you enable linting for these docstrings? e.g.

[tool.ruff.lint]
select = [
  ...
  "D",    # pydocstyle
]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
# Ignore `D` rules everywhere except for py files in the `langchain/submodule/` directory.
"!langchain/submodule/**.py" = ["D"]

@Siddhant231xyz
Copy link
Contributor Author

Hey @efriis ,
Thank you for your comment, i have added the given changes in the pyproject.toml file, please let me know if there is anything else that needs to be done.

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Jan 20, 2025
@eyurtsev
Copy link
Collaborator

FYI this is the pyproject toml for the mono-repo which I think mostly is used for docs?

@eyurtsev eyurtsev self-requested a review January 20, 2025 20:22
@efriis efriis changed the title Added docstring linting in /libs/langchain/langchain/indexes/vectorst… langchain: added vectorstore docstring linting Jan 22, 2025
@efriis efriis enabled auto-merge (squash) January 22, 2025 03:30
@efriis efriis merged commit 9eb10a9 into langchain-ai:master Jan 22, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
langchain Related to the langchain package lgtm PR looks good. Use to confirm that a PR is ready for merging. 🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs size:M This PR changes 30-99 lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants