Skip to content
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

Merged
merged 3 commits into from
Oct 23, 2019

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Oct 22, 2019

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.

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.
@rix0rrr rix0rrr requested review from RomainMuller and eladb October 22, 2019 12:32
@rix0rrr rix0rrr requested a review from a team as a code owner October 22, 2019 12:32
@rix0rrr rix0rrr self-assigned this Oct 22, 2019
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather not...

Copy link
Contributor Author

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.

@RomainMuller RomainMuller added the pr/do-not-merge This PR should not be merged at this time. label Oct 23, 2019
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@rix0rrr rix0rrr merged commit 8bacfb1 into master Oct 23, 2019
@rix0rrr rix0rrr deleted the huijbers/module-docstring branch October 23, 2019 13:20
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/do-not-merge This PR should not be merged at this time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants