2022-12-12 14:07:40 +00:00
# Contributing to LangChain
Hi there! Thank you for even being interested in contributing to LangChain.
2023-10-26 15:56:28 +00:00
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether they involve new features, improved infrastructure, better documentation, or bug fixes.
2023-05-11 07:05:25 +00:00
## 🗺️ Guidelines
### 👩💻 Contributing Code
2022-12-12 14:07:40 +00:00
2023-10-26 15:56:28 +00:00
To contribute to this project, please follow the ["fork and pull request" ](https://docs.github.com/en/get-started/quickstart/contributing-to-projects ) workflow.
2023-09-17 23:35:18 +00:00
Please do not try to push directly to this repo unless you are a maintainer.
2022-12-12 14:07:40 +00:00
2023-05-11 07:05:25 +00:00
Please follow the checked-in pull request template when opening pull requests. Note related issues and tag relevant
maintainers.
2023-10-23 18:53:03 +00:00
Pull requests cannot land without passing the formatting, linting, and testing checks first. See [Testing ](#testing ) and
2023-09-22 17:17:08 +00:00
[Formatting and Linting ](#formatting-and-linting ) for how to run these checks locally.
2023-05-11 07:05:25 +00:00
It's essential that we maintain great documentation and testing. If you:
- Fix a bug
- Add a relevant unit or integration test when possible. These live in `tests/unit_tests` and `tests/integration_tests` .
- Make an improvement
2023-09-17 23:35:18 +00:00
- Update any affected example notebooks and documentation. These live in `docs` .
2023-05-11 07:05:25 +00:00
- Update unit and integration tests when relevant.
- Add a feature
- Add a demo notebook in `docs/modules` .
- Add unit and integration tests.
2023-10-26 15:56:28 +00:00
We are a small, progress-oriented team. If there's something you'd like to add or change, opening a pull request is the
2023-05-11 07:05:25 +00:00
best way to get our attention.
2022-12-12 14:07:40 +00:00
### 🚩GitHub Issues
2023-10-26 15:56:28 +00:00
Our [issues ](https://github.com/langchain-ai/langchain/issues ) page is kept up to date with bugs, improvements, and feature requests.
2022-12-12 14:07:40 +00:00
2023-10-26 15:56:28 +00:00
There is a taxonomy of labels to help with sorting and discovery of issues of interest. Please use these to help organize issues.
2022-12-12 14:07:40 +00:00
If you start working on an issue, please assign it to yourself.
2023-05-11 07:05:25 +00:00
If you are adding an issue, please try to keep it focused on a single, modular bug/improvement/feature.
If two issues are related, or blocking, please link them rather than combining them.
2022-12-12 14:07:40 +00:00
2023-09-17 23:35:18 +00:00
We will try to keep these issues as up-to-date as possible, though
Update CONTRIBUTING.md (#9817)
<!-- Thank you for contributing to LangChain!
Replace this entire comment with:
- Description: a description of the change,
- Issue: the issue # it fixes (if applicable),
- Dependencies: any dependencies required for this change,
- Tag maintainer: for a quicker response, tag the relevant maintainer
(see below),
- Twitter handle: we announce bigger features on Twitter. If your PR
gets announced and you'd like a mention, we'll gladly shout you out!
Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` to check this
locally.
See contribution guidelines for more information on how to write/run
tests, lint, etc:
https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
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. These live is docs/extras
directory.
If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17, @rlancemartin.
-->
Hi LangChain :) Thank you for such a great project!
I was going through the CONTRIBUTING.md and found a few minor issues.
2023-08-28 13:38:34 +00:00
with the rapid rate of development in this field some may get out of date.
2023-05-11 07:05:25 +00:00
If you notice this happening, please let us know.
2022-12-12 14:07:40 +00:00
### 🙋Getting Help
2023-05-11 07:05:25 +00:00
Our goal is to have the simplest developer setup possible. Should you experience any difficulty getting setup, please
contact a maintainer! Not only do we want to help get you unblocked, but we also want to make sure that the process is
smooth for future contributors.
2022-12-12 14:07:40 +00:00
In a similar vein, we do enforce certain linting, formatting, and documentation standards in the codebase.
2023-05-11 07:05:25 +00:00
If you are finding these difficult (or even just annoying) to work with, feel free to contact a maintainer for help -
we do not want these to get in the way of getting good code into the codebase.
2022-12-12 14:07:40 +00:00
2023-05-11 07:05:25 +00:00
## 🚀 Quick Start
2022-12-12 14:07:40 +00:00
2023-10-26 15:56:28 +00:00
This quick start guide explains how to run the repository locally.
2023-10-01 19:30:58 +00:00
For a [development container ](https://containers.dev/ ), see the [.devcontainer folder ](https://github.com/langchain-ai/langchain/tree/master/.devcontainer ).
2023-06-16 22:42:14 +00:00
2023-09-22 17:17:08 +00:00
### Dependency Management: Poetry and other env/dependency managers
2022-12-12 14:07:40 +00:00
2023-10-26 15:56:28 +00:00
This project utilizes [Poetry ](https://python-poetry.org/ ) v1.6.1+ as a dependency manager.
2023-09-22 17:17:08 +00:00
❗Note: *Before installing Poetry* , if you use `Conda` , create and activate a new Conda env (e.g. `conda create -n langchain python=3.9` )
Install Poetry: ** [documentation on how to install it ](https://python-poetry.org/docs/#installation )**.
❗Note: If you use `Conda` or `Pyenv` as your environment/package manager, after installing Poetry,
tell Poetry to use the virtualenv python environment (`poetry config virtualenvs.prefer-active-python true`)
### Core vs. Experimental
2023-01-05 02:28:42 +00:00
2023-10-26 15:56:28 +00:00
This repository contains two separate projects:
- `langchain` : core langchain code, abstractions, and use cases.
2023-10-25 19:28:43 +00:00
- `langchain.experimental` : see the [Experimental README ](https://github.com/langchain-ai/langchain/tree/master/libs/experimental/README.md ) for more information.
2023-09-22 17:17:08 +00:00
2023-10-23 18:53:03 +00:00
Each of these has its own development environment. Docs are run from the top-level makefile, but development
2023-09-22 17:17:08 +00:00
is split across separate test & release flows.
2023-07-21 19:01:05 +00:00
2023-09-22 17:17:08 +00:00
For this quickstart, start with langchain core:
2023-07-21 19:01:05 +00:00
2023-09-22 17:17:08 +00:00
```bash
cd libs/langchain
```
### Local Development Dependencies
Install langchain development requirements (for running langchain, running examples, linting, formatting, tests, and coverage):
2022-12-12 14:07:40 +00:00
```bash
2023-08-22 18:57:58 +00:00
poetry install --with test
2022-12-12 14:07:40 +00:00
```
2023-09-22 17:17:08 +00:00
Then verify dependency installation:
2022-12-12 14:07:40 +00:00
2023-09-22 17:17:08 +00:00
```bash
make test
```
2023-03-21 05:03:19 +00:00
2023-09-22 17:17:08 +00:00
If the tests don't pass, you may need to pip install additional dependencies, such as `numexpr` and `openapi_schema_pydantic` .
2022-12-12 14:07:40 +00:00
2023-09-22 17:17:08 +00:00
If during installation you receive a `WheelFileValidationError` for `debugpy` , please make sure you are running
2023-10-03 23:23:54 +00:00
Poetry v1.6.1+. This bug was present in older versions of Poetry (e.g. 1.4.1) and has been resolved in newer releases.
If you are still seeing this bug on v1.6.1, you may also try disabling "modern installation"
2023-09-22 17:17:08 +00:00
(`poetry config installer.modern-installation false`) and re-installing requirements.
See [this `debugpy` issue ](https://github.com/microsoft/debugpy/issues/1246 ) for more details.
2022-12-12 14:07:40 +00:00
2023-09-22 17:17:08 +00:00
### Testing
2023-02-14 05:08:47 +00:00
2023-09-22 17:17:08 +00:00
_some test dependencies are optional; see section about optional dependencies_.
2022-12-12 14:07:40 +00:00
2023-09-22 17:17:08 +00:00
Unit tests cover modular logic that does not require calls to outside APIs.
If you add new logic, please add a unit test.
To run unit tests:
```bash
make test
```
To run unit tests in Docker:
```bash
make docker_tests
```
2023-10-25 19:28:43 +00:00
There are also [integration tests and code-coverage ](https://github.com/langchain-ai/langchain/tree/master/libs/langchain/tests/README.md ) available.
2023-09-22 17:17:08 +00:00
### Formatting and Linting
Run these locally before submitting a PR; the CI system will check also.
#### Code Formatting
Formatting for this project is done via a combination of [Black ](https://black.readthedocs.io/en/stable/ ) and [ruff ](https://docs.astral.sh/ruff/rules/ ).
2022-12-12 14:07:40 +00:00
2023-10-29 23:22:18 +00:00
To run formatting for docs, cookbook and templates:
2022-12-12 14:07:40 +00:00
```bash
make format
```
2023-10-29 23:22:18 +00:00
To run formatting for a library, run the same command from the relevant library directory:
```bash
cd libs/{LIBRARY}
make format
```
2023-07-12 01:03:17 +00:00
Additionally, you can run the formatter only on the files that have been modified in your current branch as compared to the master branch using the format_diff command:
```bash
make format_diff
```
This is especially useful when you have made changes to a subset of the project and want to ensure your changes are properly formatted without affecting the rest of the codebase.
2023-09-22 17:17:08 +00:00
#### Linting
2022-12-12 14:07:40 +00:00
2023-09-22 17:17:08 +00:00
Linting for this project is done via a combination of [Black ](https://black.readthedocs.io/en/stable/ ), [ruff ](https://docs.astral.sh/ruff/rules/ ), and [mypy ](http://mypy-lang.org/ ).
2022-12-12 14:07:40 +00:00
2023-10-29 23:22:18 +00:00
To run linting for docs, cookbook and templates:
```bash
make lint
```
To run linting for a library, run the same command from the relevant library directory:
2022-12-12 14:07:40 +00:00
```bash
2023-10-29 23:22:18 +00:00
cd libs/{LIBRARY}
2022-12-12 14:07:40 +00:00
make lint
```
2023-07-12 01:03:17 +00:00
In addition, you can run the linter only on the files that have been modified in your current branch as compared to the master branch using the lint_diff command:
```bash
make lint_diff
```
This can be very helpful when you've made changes to only certain parts of the project and want to ensure your changes meet the linting standards without having to check the entire codebase.
2022-12-13 13:48:53 +00:00
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.
2023-09-22 17:17:08 +00:00
#### Spellcheck
2023-07-12 20:20:08 +00:00
Spellchecking for this project is done via [codespell ](https://github.com/codespell-project/codespell ).
Update CONTRIBUTING.md (#9817)
<!-- Thank you for contributing to LangChain!
Replace this entire comment with:
- Description: a description of the change,
- Issue: the issue # it fixes (if applicable),
- Dependencies: any dependencies required for this change,
- Tag maintainer: for a quicker response, tag the relevant maintainer
(see below),
- Twitter handle: we announce bigger features on Twitter. If your PR
gets announced and you'd like a mention, we'll gladly shout you out!
Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` to check this
locally.
See contribution guidelines for more information on how to write/run
tests, lint, etc:
https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
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. These live is docs/extras
directory.
If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17, @rlancemartin.
-->
Hi LangChain :) Thank you for such a great project!
I was going through the CONTRIBUTING.md and found a few minor issues.
2023-08-28 13:38:34 +00:00
Note that `codespell` finds common typos, so it could have false-positive (correctly spelled but rarely used) and false-negatives (not finding misspelled) words.
2023-07-12 20:20:08 +00:00
To check spelling for this project:
```bash
make spell_check
```
To fix spelling in place:
```bash
make spell_fix
```
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.
```python
[tool.codespell]
...
# Add here:
ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogyny,unsecure'
```
2023-09-22 17:17:08 +00:00
## Working with Optional Dependencies
2023-05-26 14:18:11 +00:00
Langchain relies heavily on optional dependencies to keep the Langchain package lightweight.
If you're adding a new dependency to Langchain, assume that it will be an optional dependency, and
that most users won't have it installed.
2023-09-17 23:35:18 +00:00
Users who do not have the dependency installed should be able to **import** your code without
2023-08-21 14:35:56 +00:00
any side effects (no warnings, no errors, no exceptions).
2023-05-26 14:18:11 +00:00
2023-08-21 14:35:56 +00:00
To introduce the dependency to the pyproject.toml file correctly, please do the following:
2023-05-26 14:18:11 +00:00
1. Add the dependency to the main group as an optional dependency
```bash
poetry add --optional [package_name]
```
2. Open pyproject.toml and add the dependency to the `extended_testing` extra
3. Relock the poetry file to update the extra.
```bash
poetry lock --no-update
```
2023-09-17 23:35:18 +00:00
4. Add a unit test that the very least attempts to import the new code. Ideally, the unit
2023-05-26 14:18:11 +00:00
test makes use of lightweight fixtures to test the logic of the code.
5. Please use the `@pytest.mark.requires(package_name)` decorator for any tests that require the dependency.
2023-09-22 17:17:08 +00:00
## Adding a Jupyter Notebook
2022-12-12 14:07:40 +00:00
2023-09-17 23:35:18 +00:00
If you are adding a Jupyter Notebook example, you'll want to install the optional `dev` dependencies.
2022-12-12 14:07:40 +00:00
To install dev dependencies:
```bash
poetry install --with dev
```
Launch a notebook:
```bash
poetry run jupyter notebook
```
When you run `poetry install` , the `langchain` package is installed as editable in the virtualenv, so your new logic can be imported into the notebook.
2023-01-05 05:39:50 +00:00
## Documentation
2023-07-21 19:01:05 +00:00
While the code is split between `langchain` and `langchain.experimental` , the documentation is one holistic thing.
This covers how to get started contributing to documentation.
2023-09-22 17:17:08 +00:00
From the top-level of this repo, install documentation dependencies:
```bash
poetry install
```
2023-01-05 05:39:50 +00:00
### Contribute Documentation
2022-12-12 14:07:40 +00:00
Fix `make docs_build` and related scripts (#7276)
**Description: a description of the change**
Fixed `make docs_build` and related scripts which caused errors. There
are several changes.
First, I made the build of the documentation and the API Reference into
two separate commands. This is because it takes less time to build. The
commands for documents are `make docs_build`, `make docs_clean`, and
`make docs_linkcheck`. The commands for API Reference are `make
api_docs_build`, `api_docs_clean`, and `api_docs_linkcheck`.
It looked like `docs/.local_build.sh` could be used to build the
documentation, so I used that. Since `.local_build.sh` was also building
API Rerefence internally, I removed that process. `.local_build.sh` also
added some Bash options to stop in error or so. Futher more added `cd
"${SCRIPT_DIR}"` at the beginning so that the script will work no matter
which directory it is executed in.
`docs/api_reference/api_reference.rst` is removed, because which is
generated by `docs/api_reference/create_api_rst.py`, and added it to
.gitignore.
Finally, the description of CONTRIBUTING.md was modified.
**Issue: the issue # it fixes (if applicable)**
https://github.com/hwchase17/langchain/issues/6413
**Dependencies: any dependencies required for this change**
`nbdoc` was missing in group docs so it was added. I installed it with
the `poetry add --group docs nbdoc` command. I am concerned if any
modifications are needed to poetry.lock. I would greatly appreciate it
if you could pay close attention to this file during the review.
**Tag maintainer**
- General / Misc / if you don't know who to tag: @baskaryan
If this PR needs any additional changes, I'll be happy to make them!
---------
Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-12 02:05:14 +00:00
The docs directory contains Documentation and API Reference.
2022-12-12 14:07:40 +00:00
Fix `make docs_build` and related scripts (#7276)
**Description: a description of the change**
Fixed `make docs_build` and related scripts which caused errors. There
are several changes.
First, I made the build of the documentation and the API Reference into
two separate commands. This is because it takes less time to build. The
commands for documents are `make docs_build`, `make docs_clean`, and
`make docs_linkcheck`. The commands for API Reference are `make
api_docs_build`, `api_docs_clean`, and `api_docs_linkcheck`.
It looked like `docs/.local_build.sh` could be used to build the
documentation, so I used that. Since `.local_build.sh` was also building
API Rerefence internally, I removed that process. `.local_build.sh` also
added some Bash options to stop in error or so. Futher more added `cd
"${SCRIPT_DIR}"` at the beginning so that the script will work no matter
which directory it is executed in.
`docs/api_reference/api_reference.rst` is removed, because which is
generated by `docs/api_reference/create_api_rst.py`, and added it to
.gitignore.
Finally, the description of CONTRIBUTING.md was modified.
**Issue: the issue # it fixes (if applicable)**
https://github.com/hwchase17/langchain/issues/6413
**Dependencies: any dependencies required for this change**
`nbdoc` was missing in group docs so it was added. I installed it with
the `poetry add --group docs nbdoc` command. I am concerned if any
modifications are needed to poetry.lock. I would greatly appreciate it
if you could pay close attention to this file during the review.
**Tag maintainer**
- General / Misc / if you don't know who to tag: @baskaryan
If this PR needs any additional changes, I'll be happy to make them!
---------
Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-12 02:05:14 +00:00
Documentation is built using [Docusaurus 2 ](https://docusaurus.io/ ).
API Reference are largely autogenerated by [sphinx ](https://www.sphinx-doc.org/en/master/ ) from the code.
2022-12-12 14:07:40 +00:00
For that reason, we ask that you add good documentation to all classes and methods.
2022-12-13 13:48:53 +00:00
Similar to linting, we recognize documentation 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.
2023-01-05 05:39:50 +00:00
### Build Documentation Locally
Fix `make docs_build` and related scripts (#7276)
**Description: a description of the change**
Fixed `make docs_build` and related scripts which caused errors. There
are several changes.
First, I made the build of the documentation and the API Reference into
two separate commands. This is because it takes less time to build. The
commands for documents are `make docs_build`, `make docs_clean`, and
`make docs_linkcheck`. The commands for API Reference are `make
api_docs_build`, `api_docs_clean`, and `api_docs_linkcheck`.
It looked like `docs/.local_build.sh` could be used to build the
documentation, so I used that. Since `.local_build.sh` was also building
API Rerefence internally, I removed that process. `.local_build.sh` also
added some Bash options to stop in error or so. Futher more added `cd
"${SCRIPT_DIR}"` at the beginning so that the script will work no matter
which directory it is executed in.
`docs/api_reference/api_reference.rst` is removed, because which is
generated by `docs/api_reference/create_api_rst.py`, and added it to
.gitignore.
Finally, the description of CONTRIBUTING.md was modified.
**Issue: the issue # it fixes (if applicable)**
https://github.com/hwchase17/langchain/issues/6413
**Dependencies: any dependencies required for this change**
`nbdoc` was missing in group docs so it was added. I installed it with
the `poetry add --group docs nbdoc` command. I am concerned if any
modifications are needed to poetry.lock. I would greatly appreciate it
if you could pay close attention to this file during the review.
**Tag maintainer**
- General / Misc / if you don't know who to tag: @baskaryan
If this PR needs any additional changes, I'll be happy to make them!
---------
Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-12 02:05:14 +00:00
In the following commands, the prefix `api_` indicates that those are operations for the API Reference.
2023-01-05 05:39:50 +00:00
Before building the documentation, it is always a good idea to clean the build directory:
```bash
make docs_clean
Fix `make docs_build` and related scripts (#7276)
**Description: a description of the change**
Fixed `make docs_build` and related scripts which caused errors. There
are several changes.
First, I made the build of the documentation and the API Reference into
two separate commands. This is because it takes less time to build. The
commands for documents are `make docs_build`, `make docs_clean`, and
`make docs_linkcheck`. The commands for API Reference are `make
api_docs_build`, `api_docs_clean`, and `api_docs_linkcheck`.
It looked like `docs/.local_build.sh` could be used to build the
documentation, so I used that. Since `.local_build.sh` was also building
API Rerefence internally, I removed that process. `.local_build.sh` also
added some Bash options to stop in error or so. Futher more added `cd
"${SCRIPT_DIR}"` at the beginning so that the script will work no matter
which directory it is executed in.
`docs/api_reference/api_reference.rst` is removed, because which is
generated by `docs/api_reference/create_api_rst.py`, and added it to
.gitignore.
Finally, the description of CONTRIBUTING.md was modified.
**Issue: the issue # it fixes (if applicable)**
https://github.com/hwchase17/langchain/issues/6413
**Dependencies: any dependencies required for this change**
`nbdoc` was missing in group docs so it was added. I installed it with
the `poetry add --group docs nbdoc` command. I am concerned if any
modifications are needed to poetry.lock. I would greatly appreciate it
if you could pay close attention to this file during the review.
**Tag maintainer**
- General / Misc / if you don't know who to tag: @baskaryan
If this PR needs any additional changes, I'll be happy to make them!
---------
Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-12 02:05:14 +00:00
make api_docs_clean
2023-01-05 05:39:50 +00:00
```
Fix `make docs_build` and related scripts (#7276)
**Description: a description of the change**
Fixed `make docs_build` and related scripts which caused errors. There
are several changes.
First, I made the build of the documentation and the API Reference into
two separate commands. This is because it takes less time to build. The
commands for documents are `make docs_build`, `make docs_clean`, and
`make docs_linkcheck`. The commands for API Reference are `make
api_docs_build`, `api_docs_clean`, and `api_docs_linkcheck`.
It looked like `docs/.local_build.sh` could be used to build the
documentation, so I used that. Since `.local_build.sh` was also building
API Rerefence internally, I removed that process. `.local_build.sh` also
added some Bash options to stop in error or so. Futher more added `cd
"${SCRIPT_DIR}"` at the beginning so that the script will work no matter
which directory it is executed in.
`docs/api_reference/api_reference.rst` is removed, because which is
generated by `docs/api_reference/create_api_rst.py`, and added it to
.gitignore.
Finally, the description of CONTRIBUTING.md was modified.
**Issue: the issue # it fixes (if applicable)**
https://github.com/hwchase17/langchain/issues/6413
**Dependencies: any dependencies required for this change**
`nbdoc` was missing in group docs so it was added. I installed it with
the `poetry add --group docs nbdoc` command. I am concerned if any
modifications are needed to poetry.lock. I would greatly appreciate it
if you could pay close attention to this file during the review.
**Tag maintainer**
- General / Misc / if you don't know who to tag: @baskaryan
If this PR needs any additional changes, I'll be happy to make them!
---------
Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-12 02:05:14 +00:00
Next, you can build the documentation as outlined below:
2023-01-05 05:39:50 +00:00
```bash
Fix `make docs_build` and related scripts (#7276)
**Description: a description of the change**
Fixed `make docs_build` and related scripts which caused errors. There
are several changes.
First, I made the build of the documentation and the API Reference into
two separate commands. This is because it takes less time to build. The
commands for documents are `make docs_build`, `make docs_clean`, and
`make docs_linkcheck`. The commands for API Reference are `make
api_docs_build`, `api_docs_clean`, and `api_docs_linkcheck`.
It looked like `docs/.local_build.sh` could be used to build the
documentation, so I used that. Since `.local_build.sh` was also building
API Rerefence internally, I removed that process. `.local_build.sh` also
added some Bash options to stop in error or so. Futher more added `cd
"${SCRIPT_DIR}"` at the beginning so that the script will work no matter
which directory it is executed in.
`docs/api_reference/api_reference.rst` is removed, because which is
generated by `docs/api_reference/create_api_rst.py`, and added it to
.gitignore.
Finally, the description of CONTRIBUTING.md was modified.
**Issue: the issue # it fixes (if applicable)**
https://github.com/hwchase17/langchain/issues/6413
**Dependencies: any dependencies required for this change**
`nbdoc` was missing in group docs so it was added. I installed it with
the `poetry add --group docs nbdoc` command. I am concerned if any
modifications are needed to poetry.lock. I would greatly appreciate it
if you could pay close attention to this file during the review.
**Tag maintainer**
- General / Misc / if you don't know who to tag: @baskaryan
If this PR needs any additional changes, I'll be happy to make them!
---------
Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-12 02:05:14 +00:00
make docs_build
make api_docs_build
2023-01-05 05:39:50 +00:00
```
2023-10-26 15:56:28 +00:00
Finally, run the link checker to ensure all links are valid:
2023-01-05 05:39:50 +00:00
```bash
Fix `make docs_build` and related scripts (#7276)
**Description: a description of the change**
Fixed `make docs_build` and related scripts which caused errors. There
are several changes.
First, I made the build of the documentation and the API Reference into
two separate commands. This is because it takes less time to build. The
commands for documents are `make docs_build`, `make docs_clean`, and
`make docs_linkcheck`. The commands for API Reference are `make
api_docs_build`, `api_docs_clean`, and `api_docs_linkcheck`.
It looked like `docs/.local_build.sh` could be used to build the
documentation, so I used that. Since `.local_build.sh` was also building
API Rerefence internally, I removed that process. `.local_build.sh` also
added some Bash options to stop in error or so. Futher more added `cd
"${SCRIPT_DIR}"` at the beginning so that the script will work no matter
which directory it is executed in.
`docs/api_reference/api_reference.rst` is removed, because which is
generated by `docs/api_reference/create_api_rst.py`, and added it to
.gitignore.
Finally, the description of CONTRIBUTING.md was modified.
**Issue: the issue # it fixes (if applicable)**
https://github.com/hwchase17/langchain/issues/6413
**Dependencies: any dependencies required for this change**
`nbdoc` was missing in group docs so it was added. I installed it with
the `poetry add --group docs nbdoc` command. I am concerned if any
modifications are needed to poetry.lock. I would greatly appreciate it
if you could pay close attention to this file during the review.
**Tag maintainer**
- General / Misc / if you don't know who to tag: @baskaryan
If this PR needs any additional changes, I'll be happy to make them!
---------
Co-authored-by: Bagatur <baskaryan@gmail.com>
2023-07-12 02:05:14 +00:00
make docs_linkcheck
make api_docs_linkcheck
2023-01-05 05:39:50 +00:00
```
2023-05-11 07:05:25 +00:00
2023-10-16 21:21:36 +00:00
### Verify Documentation changes
After pushing documentation changes to the repository, you can preview and verify that the changes are
what you wanted by clicking the `View deployment` or `Visit Preview` buttons on the pull request `Conversation` page.
This will take you to a preview of the documentation changes.
This preview is created by [Vercel ](https://vercel.com/docs/getting-started-with-vercel ).
2023-05-11 07:05:25 +00:00
## 🏭 Release Process
As of now, LangChain has an ad hoc release process: releases are cut with high frequency by
a developer and published to [PyPI ](https://pypi.org/project/langchain/ ).
LangChain follows the [semver ](https://semver.org/ ) versioning standard. However, as pre-1.0 software,
even patch releases may contain [non-backwards-compatible changes ](https://semver.org/#spec-item-4 ).
### 🌟 Recognition
If your contribution has made its way into a release, we will want to give you credit on Twitter (only if you want though)!
2023-10-26 15:56:28 +00:00
If you have a Twitter account you would like us to mention, please let us know in the PR or through another means.