From 5491993f8aa2d019c4c830ae3a06bc970b4d79af Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Wed, 22 May 2024 13:01:17 -0700 Subject: [PATCH] x --- docs/Makefile | 4 ++-- docs/docs/contributing/index.mdx | 3 +-- docs/scripts/notebook_convert.py | 24 +++++++++++++++--------- docs/vercel_requirements.txt | 1 + 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 4d8b3d64930..e13d0489766 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -33,7 +33,7 @@ install-py-deps: _generate-files-internal: mkdir -p $(INTERMEDIATE_DIR) - rsync -avm --delete $(SOURCE_DIR) $(INTERMEDIATE_DIR) + rsync -am --delete $(SOURCE_DIR) $(INTERMEDIATE_DIR) generate-files: _generate-files-internal mkdir -p $(INTERMEDIATE_DIR)/templates @@ -63,7 +63,7 @@ render: $(PYTHON) scripts/notebook_convert.py $(INTERMEDIATE_DIR) $(OUTPUT_NEW_DOCS_DIR) md-sync: - rsync -avm --include="*/" --include="*.mdx" --include="*.md" --include="*.png" --exclude="*" $(INTERMEDIATE_DIR)/ $(OUTPUT_NEW_DOCS_DIR) + rsync -am --include="*/" --include="*.mdx" --include="*.md" --include="*.png" --exclude="*" $(INTERMEDIATE_DIR)/ $(OUTPUT_NEW_DOCS_DIR) generate-references: $(PYTHON) scripts/generate_api_reference_links.py --docs_dir $(OUTPUT_NEW_DOCS_DIR) diff --git a/docs/docs/contributing/index.mdx b/docs/docs/contributing/index.mdx index 8a91776db98..eb0201ebe23 100644 --- a/docs/docs/contributing/index.mdx +++ b/docs/docs/contributing/index.mdx @@ -1,9 +1,8 @@ --- sidebar_position: 0 --- -# Welcome Contributors +# Contributing Guide -Hi there! Thank you for even being interested in contributing to LangChain. 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. ## 🗺️ Guidelines diff --git a/docs/scripts/notebook_convert.py b/docs/scripts/notebook_convert.py index 76ccaf45003..2319e7dfbb5 100644 --- a/docs/scripts/notebook_convert.py +++ b/docs/scripts/notebook_convert.py @@ -3,7 +3,8 @@ import os import re import sys from pathlib import Path -from typing import Iterable, Tuple +from typing import Iterable, Tuple, List +import tqdm import nbformat from nbconvert.exporters import MarkdownExporter @@ -133,19 +134,24 @@ if __name__ == "__main__": output_docs_dir = Path(sys.argv[2]) source_paths_arg = os.environ.get("SOURCE_PATHS") - source_paths: Iterable[Path] + source_paths: List[Path] if source_paths_arg: source_path_strs = re.split(r"\s+", source_paths_arg) source_paths_stripped = [p.strip() for p in source_path_strs] source_paths = [intermediate_docs_dir / p for p in source_paths_stripped if p] else: - source_paths = intermediate_docs_dir.glob("**/*.ipynb") + source_paths = list(intermediate_docs_dir.glob("**/*.ipynb")) with multiprocessing.Pool() as pool: - pool.map( - _process_path, - ( - (notebook_path, intermediate_docs_dir, output_docs_dir) - for notebook_path in source_paths - ), + list( + tqdm.tqdm( + pool.imap( + _process_path, + ( + (notebook_path, intermediate_docs_dir, output_docs_dir) + for notebook_path in source_paths + ), + ), + total=len(source_paths), + ) ) diff --git a/docs/vercel_requirements.txt b/docs/vercel_requirements.txt index 2883c3eb5e8..fc3d8f9ac97 100644 --- a/docs/vercel_requirements.txt +++ b/docs/vercel_requirements.txt @@ -9,3 +9,4 @@ langchain-nvidia-ai-endpoints langchain-elasticsearch urllib3==1.26.18 nbconvert==7.16.4 +tqdm==4.66.4