-
Notifications
You must be signed in to change notification settings - Fork 15.7k
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
Standardize docstrings and improve coverage #21983
Comments
I will start! |
Thank you for contributing to LangChain! - [X] **PR title**: "docs: Chroma docstrings update" - Where "package" is whichever of langchain, community, core, experimental, etc. is being modified. Use "docs: ..." for purely docs changes, "templates: ..." for template changes, "infra: ..." for CI changes. - Example: "community: add foobar LLM" - [X] **PR message**: - **Description:** Added and updated Chroma docstrings - **Issue:** #21983 - [X] **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. - only docs - [X] **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.
- [x] **PR title**: Update docstrings for OpenAI base.py -**Description:** Updated the docstring of few OpenAI functions for a better understanding of the function. - **Issue:** #21983 --------- Co-authored-by: Bagatur <[email protected]>
Thank you for contributing to LangChain! - [X] **PR title**: "docs: Chroma docstrings update" - Where "package" is whichever of langchain, community, core, experimental, etc. is being modified. Use "docs: ..." for purely docs changes, "templates: ..." for template changes, "infra: ..." for CI changes. - Example: "community: add foobar LLM" - [X] **PR message**: - **Description:** Added and updated Chroma docstrings - **Issue:** #21983 - [X] **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. - only docs - [X] **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.
- [x] **PR title**: Update docstrings for OpenAI base.py -**Description:** Updated the docstring of few OpenAI functions for a better understanding of the function. - **Issue:** #21983 --------- Co-authored-by: Bagatur <[email protected]>
- **Description:** Add SQLChatMessageHistory docstring. - **Issue:** the issue #21983 Co-authored-by: Eugene Yurtsev <[email protected]>
- **Description:** Add `RedisChatMessageHistory ` rich docstrings. - **Issue:** the issue #21983 Co-authored-by: ccurme <[email protected]>
- **Description:** Add MongoDBChatMessageHistory rich docstrings. - **Issue:** the issue #21983
- **Description:** Standardize BaichuanTextEmbeddings docstrings. - **Issue:** the issue #21983
- **Description:** Add `RedisChatMessageHistory ` rich docstrings. - **Issue:** the issue langchain-ai#21983 Co-authored-by: ccurme <[email protected]>
- **Description:** Add MongoDBChatMessageHistory rich docstrings. - **Issue:** the issue langchain-ai#21983
- **Description:** Standardize BaichuanTextEmbeddings docstrings. - **Issue:** the issue langchain-ai#21983
- **Description:** Standardize QianfanEmbeddingsEndpoint, include: - docstrings, the issue langchain-ai#21983 - model init arg names, the issue langchain-ai#20085
- **Description:** add/improve docstrings of OpenAIAssistantV2Runnable - **Issue:** the issue #21983 Co-authored-by: Chester Curme <[email protected]>
Hi, @baskaryan. I'm helping the LangChain team manage their backlog and am marking this issue as stale. Your issue highlights the need for standardizing docstrings across all public modules, classes, methods, and attributes to align with the Google Python Style Guide. You mentioned specific formatting requirements for examples using RST code-block format, and @klaudialemiec has expressed their intention to begin addressing this. Could you please let us know if this issue is still relevant to the latest version of the LangChain repository? If it is, feel free to comment here to keep it open. Otherwise, you can close it yourself, or it will be automatically closed in 7 days. Thank you! |
Issue
Every public module, class, method and attribute should have a docstring.
Requirements
NOTE!
RST code block must have a newline between
.. code-block:: python
and the code example, and code example must be tabbed, to render correctly!Examples
Module
langchain/foo/__init__.py
Class and attributes
Not Pydantic class
NOTE
If the object attributes and init args are the same then you can just document the init args for non-Pydantic classes and just document the attributes for Pydantic classes.
Pydantic class
Function/method
The text was updated successfully, but these errors were encountered: