diff --git a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/SetupGenerator.java b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/SetupGenerator.java index 899848e5e..97e966f1b 100644 --- a/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/SetupGenerator.java +++ b/codegen/core/src/main/java/software/amazon/smithy/python/codegen/generators/SetupGenerator.java @@ -288,6 +288,7 @@ private static void writeDocsSkeleton( .orElse(context.settings().service().getName())); writeConf(settings, context, projectName); writeIndexes(context, projectName); + writeDocsReadme(context); writeMakeBat(context); writeMakeFile(context); } @@ -447,6 +448,31 @@ private static void writeIndexes(GenerationContext context, String projectName) writeIndexFile(context, "docs/models/index.rst", "Models"); } + + /** + * Write the readme in the docs folder describing instructions for generation + * + * @param context The generation context containing the writer delegator. + */ + private static void writeDocsReadme( + GenerationContext context + ) { + context.writerDelegator().useFileWriter("docs/README.md", writer -> { + writer.write(""" + ## Generating Documentation + + Sphinx is used for documentation. You can generate HTML locally with the + following: + + ``` + $$ uv pip install ".[docs]" + $$ cd docs + $$ make html + ``` + """); + }); + } + /** * Helper method to write an index file with the given title. * This method creates an index file at the specified file path with the provided title.