From 4ac53450128e209c3ff5534a2247da809cc5bd8d Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Sun, 30 Oct 2022 22:48:52 -0700 Subject: [PATCH] add developer guide (#44) --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 82fe2a9e..d7b4b27a 100644 --- a/README.md +++ b/README.md @@ -103,3 +103,28 @@ llm_chain.predict(question=question) The above examples are probably the most user friendly documentation that exists, but full API docs can be found [here](https://langchain.readthedocs.io/en/latest/?). + +## 🤖 Developer Guide + +To begin developing on this project, first clone to the repo locally. +To install requirements, run `pip install -r requirments.txt`. +This will install all requirements for running the package, examples, linting, formatting, and tests. + +Formatting for this project is a combination of [Black](https://black.readthedocs.io/en/stable/) and [isort](https://pycqa.github.io/isort/). +To run formatting for this project, run `make format`. + +Linting for this project is a combination of [Black](https://black.readthedocs.io/en/stable/), [isort](https://pycqa.github.io/isort/), [flake8](https://flake8.pycqa.org/en/latest/), and [mypy](http://mypy-lang.org/). +To run linting for this project, run `make lint`. +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. + +Unit tests cover modular logic that does not require calls to outside apis. +To run unit tests, run `make tests`. +If you add new logic, please add a unit test. + +Integration tests cover logic that requires making calls to outside APIs (often integration with other services). +To run integration tests, run `make integration_tests`. +If you add support for a new external API, please add a new integration test. + +Docs are largely autogenerated by [sphinx](https://www.sphinx-doc.org/en/master/) from the code. +For that reason, we ask that you add good documentation to all classes and methods. +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.