Skip to content

Commit 9c3aebe

Browse files
authored
Documentation: Add CONTRIBUTING.md and DEVELOPMENT.md (#158)
As suggested by @Sachin-Bhat per GH-92.
1 parent c60874d commit 9c3aebe

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

CONTRIBUTING.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributing to langchain-postgres
2+
3+
This guide is intended to help you get started contributing to langchain-postgres.
4+
As an open-source project in a rapidly developing field, we are extremely open
5+
to contributions, whether it be in the form of a new feature, improved infra, or better documentation.
6+
7+
To contribute to this project, please follow the [fork and pull request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) workflow.
8+
9+
## Reporting bugs or suggesting improvements
10+
11+
Our [GitHub issues](https://github.com/langchain-ai/langchain-postgres/issues) page is kept up to date
12+
with bugs, improvements, and feature requests. There is a taxonomy of labels to help
13+
with sorting and discovery of issues of interest. [See this page](https://github.com/langchain-ai/langchain-postgres/labels) for an overview of
14+
the system we use to tag our issues and pull requests.
15+
16+
If you're looking for help with your code, consider posting a question on the
17+
[GitHub Discussions board](https://github.com/langchain-ai/langchain/discussions). Please
18+
understand that we won't be able to provide individual support via email. We
19+
also believe that help is much more valuable if it's **shared publicly**,
20+
so that more people can benefit from it.
21+
22+
- **Describing your issue:** Try to provide as many details as possible. What
23+
exactly goes wrong? _How_ is it failing? Is there an error?
24+
"XY doesn't work" usually isn't that helpful for tracking down problems. Always
25+
remember to include the code you ran and if possible, extract only the relevant
26+
parts and don't just dump your entire script. This will make it easier for us to
27+
reproduce the error.
28+
29+
- **Sharing long blocks of code or logs:** If you need to include long code,
30+
logs or tracebacks, you can wrap them in `<details>` and `</details>`. This
31+
[collapses the content](https://developer.mozilla.org/en/docs/Web/HTML/Element/details)
32+
so it only becomes visible on click, making the issue easier to read and follow.
33+
34+
## Contributing code and documentation
35+
36+
You can develop langchain-postgres locally and contribute to the Project!
37+
38+
See [DEVELOPMENT.md](DEVELOPMENT.md) for instructions on setting up and using a development environment.
39+
40+
## Opening a pull request
41+
42+
Once you wrote and manually tested your change, you can start sending the patch to the main repository.
43+
44+
- Open a new GitHub pull request with the patch against the `main` branch.
45+
- Ensure the PR title follows semantic commits conventions.
46+
- For example, `feat: add new feature`, `fix: correct issue with X`.
47+
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.

DEVELOPMENT.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Setting up a Development Environment
2+
3+
This document details how to set up a local development environment that will
4+
allow you to contribute changes to the project.
5+
6+
Acquire sources and create virtualenv.
7+
```shell
8+
git clone https://github.com/langchain-ai/langchain-postgres
9+
cd langchain-postgres
10+
uv venv --python=3.13
11+
source .venv/bin/activate
12+
```
13+
14+
Install package in editable mode.
15+
```shell
16+
poetry install --with dev,test,lint
17+
```
18+
19+
Start PostgreSQL/PGVector.
20+
```shell
21+
docker run --rm -it --name pgvector-container \
22+
-e POSTGRES_USER=langchain \
23+
-e POSTGRES_PASSWORD=langchain \
24+
-e POSTGRES_DB=langchain \
25+
-p 6024:5432 pgvector/pgvector:pg16 \
26+
postgres -c log_statement=all
27+
```
28+
29+
Invoke test cases.
30+
```shell
31+
pytest -vvv
32+
```

0 commit comments

Comments
 (0)