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(sampiler): initial version of sample transpiler #827

Merged
merged 9 commits into from
Oct 3, 2019

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Sep 27, 2019

This is the initial version of a tool that will parse the TypeScript
samples and emit equivalent sample code in Python.

For now, its use is limited:

  • only supports Python
  • doesn't support properly integrating/compiling with a multi-package
    build yet.

However, it will be an initial version we can demo and iterate on.

For a slightly outdated example of generated code, see: https://gist.github.com/rix0rrr/7c4a651f8eef1e94b006059209e805dd


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This is the initial version of a tool that will parse the TypeScript
samples and emit equivalent sample code in Python.

For now, its use is limited:

- only supports Python
- doesn't support properly integrating/compiling with a multi-package
  build yet.

However, it will be an initial version we can demo and iterate on.
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('./jsii-snippet.js');
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename to jsii-samplier I guess


Has knowledge about jsii language translation conventions to do the
translations. Only supports a limited set of TypeScript language features.

Copy link
Contributor

Choose a reason for hiding this comment

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

Describe the usage of the tool

});

test('non-null expression', () => {
expectPython([
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe prepare for the next language: expect(input, { python: output })

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, totally planning to do that. It's the only way to cover all features across all languages.

"version": "0.16.0",
"description": "Translate TypeScript code snippets to other languages",
"main": "lib/index.js",
"bin": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Obviously just did a cursory scan.

I was wondering about the tool usage... I’d expect the lowest level building block to work against a pure code snippet and markdown stuff to only be layered on top.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@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 c9a7002 into master Oct 3, 2019
@rix0rrr rix0rrr deleted the huijbers/translate branch October 3, 2019 11:33
mergify bot pushed a commit that referenced this pull request Feb 3, 2022
…/packages/jsii-pacmak/lib/targets/python (#3367)

Updates the requirements on [twine](https://github.com/pypa/twine) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pypa/twine/releases">twine's releases</a>.</em></p>
<blockquote>
<h2>3.8.0</h2>
<p><a href="https://pypi.org/project/twine/3.8.0/">https://pypi.org/project/twine/3.8.0/</a></p>
<p><a href="https://twine.readthedocs.io/en/stable/changelog.html#twine-3-8-0-2022-02-02">Changelog</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/twine/blob/main/docs/changelog.rst">twine's changelog</a>.</em></p>
<blockquote>
<h2>Twine 3.8.0 (2022-02-02)</h2>
<p>Features
^^^^^^^^</p>
<ul>
<li>Add <code>--verbose</code> logging for querying keyring credentials. (<code>[#849](pypa/twine#849) &lt;https://github.com/pypa/twine/issues/849&gt;</code>_)</li>
<li>Log all upload responses with <code>--verbose</code>. (<code>[#859](pypa/twine#859) &lt;https://github.com/pypa/twine/issues/859&gt;</code>_)</li>
<li>Show more helpful error message for invalid metadata. (<code>[#861](pypa/twine#861) &lt;https://github.com/pypa/twine/issues/861&gt;</code>_)</li>
</ul>
<p>Bugfixes
^^^^^^^^</p>
<ul>
<li>Require a recent version of urllib3. (<code>[#858](pypa/twine#858) &lt;https://github.com/pypa/twine/issues/858&gt;</code>_)</li>
</ul>
<h2>Twine 3.7.1 (2021-12-07)</h2>
<p>Improved Documentation
^^^^^^^^^^^^^^^^^^^^^^</p>
<ul>
<li>Fix broken link to packaging tutorial. (<code>[#844](pypa/twine#844) &lt;https://github.com/pypa/twine/issues/844&gt;</code>_)</li>
</ul>
<h2>Twine 3.7.0 (2021-12-01)</h2>
<p>Features
^^^^^^^^</p>
<ul>
<li>Add support for core metadata version 2.2, defined in PEP 643. (<code>[#833](pypa/twine#833) &lt;https://github.com/pypa/twine/issues/833&gt;</code>_)</li>
</ul>
<h2>Twine 3.6.0 (2021-11-10)</h2>
<p>Features
^^^^^^^^</p>
<ul>
<li>Add support for Python 3.10. (<code>[#827](pypa/twine#827) &lt;https://github.com/pypa/twine/issues/827&gt;</code>_)</li>
</ul>
<h2>Twine 3.5.0 (2021-11-02)</h2>
<p>Features
^^^^^^^^</p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/twine/commit/c5769e0fe27064c77cd5b09512d686913d420f95"><code>c5769e0</code></a> Update 3.8.0 release date (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/863">#863</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/a8333644f21c8f2cf2c086375753fa04aa5b4424"><code>a833364</code></a> Update changelog for 3.8.0 (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/862">#862</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/cf9295f6af8c396a88968b3bef55af981fb62457"><code>cf9295f</code></a> Log all upload responses with <code>--verbose</code> (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/859">#859</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/a60c565dd4560f4afd4780f87ceba84973ffb9fa"><code>a60c565</code></a> Display a more helpful error message for invalid metadata (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/861">#861</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/fd8607d2524356f7e5a17ffa051bf4d2335b74bd"><code>fd8607d</code></a> Fix mypy error from <code>urllib.Retry</code> kwargs (<a href="https://github-redirect.dependabot.com/pypa/twine/issues/858">#858</a>)</li>
<li><a href="https://github.com/pypa/twine/commit/ce87465e0917ed1a9154beb911146e3fe5b022f9"><code>ce87465</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/twine/issues/850">#850</a> from bhrutledge/847-log-keyring</li>
<li><a href="https://github.com/pypa/twine/commit/7d608424a77dfe10d63910a18db17723cb2ff213"><code>7d60842</code></a> Add changelog entry</li>
<li><a href="https://github.com/pypa/twine/commit/5f1a5a478ca1f61f2ff99a951e021aed6863401c"><code>5f1a5a4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/twine/issues/849">#849</a> from bhrutledge/847-log-keyring</li>
<li><a href="https://github.com/pypa/twine/commit/86723c468b8cba1afc61419d1df6363beccb34a3"><code>86723c4</code></a> Add verbose logging for getting keyring credentials</li>
<li>See full diff in <a href="https://github.com/pypa/twine/compare/3.7.1...3.8.0">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants