MCPcopy Index your code
hub / github.com/fastapi/fastapi / build_all

Function build_all

scripts/docs.py:395–417  ·  view source on GitHub ↗

Build the full translated docs site into ./site/.

()

Source from the content-addressed store, hash-verified

393
394@app.command()
395def build_all() -> None:
396 """
397 Build the full translated docs site into ./site/.
398 """
399 update_languages()
400 shutil.rmtree(site_path, ignore_errors=True)
401 shutil.rmtree(zensical_src_path, ignore_errors=True)
402 shutil.copytree(Path("docs_src"), zensical_src_path / "docs_src")
403 langs = [
404 lang.name
405 for lang in get_lang_paths()
406 if (lang.is_dir() and lang.name in SUPPORTED_LANGS)
407 ]
408 process_pool_size = min(4, len(langs), os.cpu_count() or 1)
409 typer.echo(f"Using process pool size: {process_pool_size}")
410 with Pool(process_pool_size) as p:
411 p.map(build_zensical_lang_to_stage, langs)
412 if "en" in langs:
413 copy_zensical_stage_to_site("en")
414 for lang in langs:
415 if lang != "en":
416 copy_zensical_stage_to_site(lang)
417 typer.secho("Successfully built all docs", fg=typer.colors.GREEN)
418
419
420@app.command()

Callers

nothing calls this directly

Calls 4

update_languagesFunction · 0.85
get_lang_pathsFunction · 0.85
PathClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…