Skip to content

Commit 7491ce8

Browse files
authored
Release: smithy-python codegen 0.3.0
* Switch to Google-style docstrings with Markdown and remove Sphinx/RST generation
1 parent 1ee7e5a commit 7491ce8

30 files changed

+735
-1147
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
activate-environment: true
3939
enable-cache: true
4040

41+
- name: Install pandoc
42+
uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e
43+
with:
44+
version: 3.8.2
45+
4146
- name: Setup workspace
4247
run: |
4348
make install

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ With both files your project directory should look like this:
112112

113113
The code generator libraries have not been published yet, so
114114
you'll need to build it yourself. To build and run the generator, you will need
115-
the following prerequisites:
115+
the following prerequisites installed in your environment:
116116

117117
* [uv](https://docs.astral.sh/uv/)
118118
* The [Smithy CLI](https://smithy.io/2.0/guides/smithy-cli/cli_installation.html)
119119
* JDK 17 or newer
120120
* make
121+
* [pandoc](https://pandoc.org/installing.html) CLI
121122

122123
This project uses [uv](https://docs.astral.sh/uv/) for managing all things python.
123124
Once you have it installed, run the following command to check that it's ready to use:
@@ -169,6 +170,16 @@ if __name__ == "__main__":
169170
asyncio.run(main())
170171
```
171172

173+
#### pandoc CLI
174+
175+
Smithy [documentation traits](https://smithy.io/2.0/spec/documentation-traits.html#documentation-trait) are modeled in one of two formats:
176+
177+
- **Raw HTML** for AWS services
178+
- **CommonMark** for all other Smithy-based services (may include embedded HTML)
179+
180+
The code generator uses [pandoc](https://pandoc.org/) to normalize and convert this
181+
content into Markdown suitable for Google-style Python docstrings.
182+
172183
#### Is Java really required?
173184

174185
Only for now. Once the generator has been published, the Smithy CLI will be able

codegen/aws/core/src/main/java/software/amazon/smithy/python/aws/codegen/AwsRstDocFileGenerator.java

Lines changed: 0 additions & 200 deletions
This file was deleted.

codegen/aws/core/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integrations.PythonIntegration

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ software.amazon.smithy.python.aws.codegen.AwsProtocolsIntegration
88
software.amazon.smithy.python.aws.codegen.AwsServiceIdIntegration
99
software.amazon.smithy.python.aws.codegen.AwsUserAgentIntegration
1010
software.amazon.smithy.python.aws.codegen.AwsStandardRegionalEndpointsIntegration
11-
software.amazon.smithy.python.aws.codegen.AwsRstDocFileGenerator

codegen/aws/core/src/test/java/software/amazon/smithy/python/aws/codegen/MarkdownToRstDocConverterTest.java

Lines changed: 0 additions & 118 deletions
This file was deleted.

codegen/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515

1616
allprojects {
1717
group = "software.amazon.smithy.python"
18-
version = "0.2.0"
18+
version = "0.3.0"
1919
}

codegen/buildSrc/src/main/kotlin/smithy-python.java-conventions.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dependencies {
3939
testRuntimeOnly(libs.junit.jupiter.engine)
4040
testRuntimeOnly(libs.junit.platform.launcher)
4141
testImplementation(libs.junit.jupiter.params)
42+
testImplementation(libs.mockito.core)
4243
compileOnly("com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}")
4344
testCompileOnly("com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}")
4445
}

codegen/core/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,4 @@ dependencies {
1515
implementation(libs.smithy.protocol.test.traits)
1616
// We have this because we're using RestJson1 as a 'generic' protocol.
1717
implementation(libs.smithy.aws.traits)
18-
implementation(libs.jsoup)
19-
implementation(libs.commonmark)
2018
}

0 commit comments

Comments
 (0)