-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pacmak): put translated README into module docstring #900
Conversation
We put in all this effort to convert code samples from TypeScript to Python, but they only were written in translated form to a README file that was used to publish to PyPI. When the packages are installed to a Python library directory, the README is gone (and so cannot be used by Sphinx to insert into the docs). Our own Sphinx generator was reading the README from the jsii assembly, but that README still contains the TypeScript examples. Insert the README content as a module-level docstrings so that the doc generator can read the right translated README version and put it in the docs. We keep the module docstring in MarkDown, not convert it to ReST, since our ReST conversion is not very reliable yet.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
package.json
Outdated
@@ -27,5 +27,8 @@ | |||
"nohoist": [ | |||
"**/jsii-calc-bundled" | |||
] | |||
}, | |||
"dependencies": { | |||
"yarn": "^1.19.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather not...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was actually added by accident, so I'm happy to take it out. But I do wonder: why not, actually? Isn't it a convenient way to bootstrap yarn by using NPM? And then we can keep it nice & isolated.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
We put in all this effort to convert code samples from TypeScript
to Python, but they only were written in translated form to a README
file that was used to publish to PyPI. When the packages are installed
to a Python library directory, the README is gone (and so cannot be used
by Sphinx to insert into the docs).
Our own Sphinx generator was reading the README from the jsii assembly,
but that README still contains the TypeScript examples.
Insert the README content as a module-level docstrings so that the doc
generator can read the right translated README version and put it in the
docs. We keep the module docstring in MarkDown, not convert it to ReST,
since our ReST conversion is not very reliable yet.
Fixes #
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.