Skip to content

Conversation

@treo
Copy link
Contributor

@treo treo commented Feb 17, 2023

Description

The old compiler relied heavily on string concatenation to produce the output code.

This new compiler uses the python ast module to enforce syntactically correct code generation.

Caveat: at the moment it does not care about the debug mode. We will rebuild the debug mode in a follow up PR.

Extra:
A Xircuits command has been added in this PR. Users can now compile .xircuits canvas from outside Jupyterlab using xircuits-compile example_canvas.xircuits output.py.

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

  1. Used the compiler with the provided examples. Simply opening, compiling and running them.
  2. Compile a xircuits canvas using the syntax xircuits-compile example_canvas.xircuits output.py.

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

TODO

  • Add support for components in non-standard paths
  • Add support for python 3.8

@treo treo marked this pull request as draft February 17, 2023 11:52
@treo treo marked this pull request as ready for review February 20, 2023 13:50
@MFA-X-AI MFA-X-AI merged commit d3654ab into master Feb 20, 2023
@MFA-X-AI MFA-X-AI deleted the paul/compiler branch February 26, 2023 18:53
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