Skip to content

Commit

Permalink
Add instructions to pyproject.toml (langchain-ai#5138)
Browse files Browse the repository at this point in the history
# Add instructions to pyproject.toml

* Add instructions to pyproject.toml about how to handle optional
dependencies.

## Before submitting


## Who can review?

---------

Co-authored-by: Davis Chase <[email protected]>
Co-authored-by: Zander Chase <[email protected]>
  • Loading branch information
3 people authored and Undertone0809 committed Jun 19, 2023
1 parent ea22e78 commit 6f129d1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ pytest-socket = "^0.6.0"
optional = true

[tool.poetry.group.test_integration.dependencies]
# Do not add dependencies in the test_integration group
# Instead:
# 1. Add an optional dependency to the main group
# poetry add --optional [package name]
# 2. Add the package name to the extended_testing extra (find it below)
# 3. Relock the poetry file
# poetry lock --no-update
# 4. Favor unit tests not integration tests.
# Use the @pytest.mark.requires(pkg_name) decorator in unit_tests.
# Your tests should not rely on network access, as it prevents other
# developers from being able to easily run them.
# Instead write unit tests that use the `responses` library or mock.patch with
# fixtures. Keep the fixtures minimal.
# See CONTRIBUTING.md for more instructions on working with optional dependencies.
# https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md#working-with-optional-dependencies
pytest-vcr = "^1.0.2"
wrapt = "^1.15.0"
openai = "^0.27.4"
Expand Down Expand Up @@ -162,6 +177,8 @@ cassandra-driver = "^3.27.0"
arxiv = "^1.4"
mastodon-py = "^1.8.1"
momento = "^1.5.0"
# Please do not add any dependencies in the test_integration group
# See instructions above ^^

[tool.poetry.group.lint.dependencies]
ruff = "^0.0.249"
Expand Down

0 comments on commit 6f129d1

Please sign in to comment.