From 611c201ddcadce43590f51b03c002d22fe0dba59 Mon Sep 17 00:00:00 2001 From: Kozo Nishida Date: Mon, 1 Sep 2025 17:34:08 +0900 Subject: [PATCH] docs: enhance documentation with API reference and mkdocstrings integration --- docs/articles/api/cli.md | 3 ++ docs/articles/api/environment_manager.md | 3 ++ docs/articles/api/index.md | 24 ++++++++++++++ docs/articles/api/installers/base.md | 3 ++ docs/articles/api/installers/context.md | 3 ++ docs/articles/api/installers/docker.md | 3 ++ docs/articles/api/installers/hatch.md | 3 ++ docs/articles/api/installers/orchestrator.md | 3 ++ docs/articles/api/installers/python.md | 3 ++ docs/articles/api/installers/system.md | 3 ++ docs/articles/api/package_loader.md | 3 ++ .../api/python_environment_manager.md | 3 ++ docs/articles/api/registry_explorer.md | 3 ++ docs/articles/api/template_generator.md | 3 ++ mkdocs.yml | 31 ++++++++++++++++++- pyproject.toml | 6 ++++ 16 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 docs/articles/api/cli.md create mode 100644 docs/articles/api/environment_manager.md create mode 100644 docs/articles/api/index.md create mode 100644 docs/articles/api/installers/base.md create mode 100644 docs/articles/api/installers/context.md create mode 100644 docs/articles/api/installers/docker.md create mode 100644 docs/articles/api/installers/hatch.md create mode 100644 docs/articles/api/installers/orchestrator.md create mode 100644 docs/articles/api/installers/python.md create mode 100644 docs/articles/api/installers/system.md create mode 100644 docs/articles/api/package_loader.md create mode 100644 docs/articles/api/python_environment_manager.md create mode 100644 docs/articles/api/registry_explorer.md create mode 100644 docs/articles/api/template_generator.md diff --git a/docs/articles/api/cli.md b/docs/articles/api/cli.md new file mode 100644 index 0000000..9df6905 --- /dev/null +++ b/docs/articles/api/cli.md @@ -0,0 +1,3 @@ +# CLI Module + +::: hatch.cli_hatch diff --git a/docs/articles/api/environment_manager.md b/docs/articles/api/environment_manager.md new file mode 100644 index 0000000..e640f80 --- /dev/null +++ b/docs/articles/api/environment_manager.md @@ -0,0 +1,3 @@ +# Environment Manager + +::: hatch.environment_manager diff --git a/docs/articles/api/index.md b/docs/articles/api/index.md new file mode 100644 index 0000000..31bb28a --- /dev/null +++ b/docs/articles/api/index.md @@ -0,0 +1,24 @@ +# API Reference + +Welcome to the Hatch API Reference documentation. This section provides detailed documentation for all public APIs and modules in the Hatch package manager. + +## Overview + +Hatch is a comprehensive package manager for the Cracking Shells ecosystem. The API is organized into several key modules: + +- **Core Modules**: Main functionality for CLI, environment management, package loading, etc. +- **Installers**: Various installation backends and orchestration components + +## Getting Started + +To use Hatch programmatically, you can import the main modules: + +```python +from hatch import cli_hatch +from hatch.environment_manager import EnvironmentManager +from hatch.package_loader import PackageLoader +``` + +## Module Index + +Browse the detailed API documentation for each module using the navigation on the left. diff --git a/docs/articles/api/installers/base.md b/docs/articles/api/installers/base.md new file mode 100644 index 0000000..a174eb8 --- /dev/null +++ b/docs/articles/api/installers/base.md @@ -0,0 +1,3 @@ +# Base Installer + +::: hatch.installers.installer_base diff --git a/docs/articles/api/installers/context.md b/docs/articles/api/installers/context.md new file mode 100644 index 0000000..20d791d --- /dev/null +++ b/docs/articles/api/installers/context.md @@ -0,0 +1,3 @@ +# Installation Context + +::: hatch.installers.installation_context diff --git a/docs/articles/api/installers/docker.md b/docs/articles/api/installers/docker.md new file mode 100644 index 0000000..8dbf47a --- /dev/null +++ b/docs/articles/api/installers/docker.md @@ -0,0 +1,3 @@ +# Docker Installer + +::: hatch.installers.docker_installer diff --git a/docs/articles/api/installers/hatch.md b/docs/articles/api/installers/hatch.md new file mode 100644 index 0000000..aa7367d --- /dev/null +++ b/docs/articles/api/installers/hatch.md @@ -0,0 +1,3 @@ +# Hatch Installer + +::: hatch.installers.hatch_installer diff --git a/docs/articles/api/installers/orchestrator.md b/docs/articles/api/installers/orchestrator.md new file mode 100644 index 0000000..b5c1793 --- /dev/null +++ b/docs/articles/api/installers/orchestrator.md @@ -0,0 +1,3 @@ +# Dependency Installation Orchestrator + +::: hatch.installers.dependency_installation_orchestrator diff --git a/docs/articles/api/installers/python.md b/docs/articles/api/installers/python.md new file mode 100644 index 0000000..6650a89 --- /dev/null +++ b/docs/articles/api/installers/python.md @@ -0,0 +1,3 @@ +# Python Installer + +::: hatch.installers.python_installer diff --git a/docs/articles/api/installers/system.md b/docs/articles/api/installers/system.md new file mode 100644 index 0000000..45fa1cb --- /dev/null +++ b/docs/articles/api/installers/system.md @@ -0,0 +1,3 @@ +# System Installer + +::: hatch.installers.system_installer diff --git a/docs/articles/api/package_loader.md b/docs/articles/api/package_loader.md new file mode 100644 index 0000000..dc1745d --- /dev/null +++ b/docs/articles/api/package_loader.md @@ -0,0 +1,3 @@ +# Package Loader + +::: hatch.package_loader diff --git a/docs/articles/api/python_environment_manager.md b/docs/articles/api/python_environment_manager.md new file mode 100644 index 0000000..64febb9 --- /dev/null +++ b/docs/articles/api/python_environment_manager.md @@ -0,0 +1,3 @@ +# Python Environment Manager + +::: hatch.python_environment_manager diff --git a/docs/articles/api/registry_explorer.md b/docs/articles/api/registry_explorer.md new file mode 100644 index 0000000..45bcd3b --- /dev/null +++ b/docs/articles/api/registry_explorer.md @@ -0,0 +1,3 @@ +# Registry Explorer + +::: hatch.registry_explorer diff --git a/docs/articles/api/template_generator.md b/docs/articles/api/template_generator.md new file mode 100644 index 0000000..7af73df --- /dev/null +++ b/docs/articles/api/template_generator.md @@ -0,0 +1,3 @@ +# Template Generator + +::: hatch.template_generator diff --git a/mkdocs.yml b/mkdocs.yml index 74aea3e..5bf1162 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,13 +4,25 @@ site_url: https://crackingshells.github.io/Hatch/ repo_url: https://github.com/CrackingShells/Hatch repo_name: CrackingShells/Hatch docs_dir: docs -site_logo: resources/images/Logo/hatch_wide_light_bg_transparent.png theme: name: readthedocs plugins: - search + - mkdocstrings: + default_handler: python + handlers: + python: + options: + docstring_style: google + show_source: true + show_root_heading: true + show_object_full_path: false + show_category_heading: true + show_labels: true + show_symbol_type_heading: true + show_symbol_type_toc: true markdown_extensions: - admonition @@ -60,6 +72,23 @@ nav: - Installation Orchestration: articles/devs/implementation_guides/installation_orchestration.md - Package Loader Extensions: articles/devs/implementation_guides/package_loader_extensions.md - Registry Integration: articles/devs/implementation_guides/registry_integration.md + - API Reference: + - Overview: articles/api/index.md + - Core Modules: + - CLI: articles/api/cli.md + - Environment Manager: articles/api/environment_manager.md + - Package Loader: articles/api/package_loader.md + - Python Environment Manager: articles/api/python_environment_manager.md + - Registry Explorer: articles/api/registry_explorer.md + - Template Generator: articles/api/template_generator.md + - Installers: + - Base Installer: articles/api/installers/base.md + - Docker Installer: articles/api/installers/docker.md + - Hatch Installer: articles/api/installers/hatch.md + - Python Installer: articles/api/installers/python.md + - System Installer: articles/api/installers/system.md + - Installation Context: articles/api/installers/context.md + - Dependency Orchestrator: articles/api/installers/orchestrator.md - Appendices: - Overview: articles/appendices/index.md - Glossary: articles/appendices/glossary.md diff --git a/pyproject.toml b/pyproject.toml index 51c6137..290cd1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,12 @@ dependencies = [ "hatch_validator @ git+https://github.com/CrackingShells/Hatch-Validator.git@v0.7.1-dev.1" ] +[project.optional-dependencies] +docs = [ + "mkdocs>=1.4.0", + "mkdocstrings[python]>=0.20.0" +] + [project.scripts] hatch = "hatch.cli_hatch:main"