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

Pure Python API #714

Merged
merged 130 commits into from
Feb 20, 2024
Merged

Pure Python API #714

merged 130 commits into from
Feb 20, 2024

Conversation

jondavid-black
Copy link
Collaborator

@jondavid-black jondavid-black commented Nov 2, 2023

Description

Significantly reworked the AaC internal API. Now instead of navigating through dicts we have "real classes" to work with. The details are all captured on discussion #691.

Linked Items:

Resolves #691

Added

  • Probably don't have a comprehensive list here but I'll take a shot. One key item is now we have constraints instead of validators and we have validators for the language context, schema, and primitive. These are now defined as part of your plugin and will have stubbed code and unit tests created by gen-plugin.
  • Added more SysML-like structure to usecase
  • A few plugins (really constraints) needed to ensure things were defined correctly

Changed

  • Total rewrite of almost everything except for io (which is now in_out for naming reasons)
  • Moved everything having to do with language context and definitions into the context module
  • Reworked everything execution related (including plugin execution) into the execute module
  • All remaining plugins are now in unique folders under plugins with no distinction between 1st and 3rd party any more
  • Rewrote gen-plugin pretty substantially. It is all now model-driven and jinja2 templates should expect to receive a parsed structure from a dictionary. There's also the ability to drop in helper functions as needed.
  • Changed validate to check and rewrote most of it to accommodate the new constraint definition approach.
  • Refactored the model directory into the features directory and converted it into an automated acceptance test location. Behave is now integrated to ensure we don't break any of our acceptance tests as we go forward.
  • Reworked the docs to align with the updates and new internal API.

Deprecated

  • Probably a lot, but I think the key thing here has to do more with AaC developer workflow than anything. Hopefully there will no longer be any driving design factor that forces you to get into complex parallel dictionary processing. Instead just navigate the instance field of the definition using "plain ole python" techniques.
  • As a result of changing the internal API, almost everything had to be rewritten. There are new ways to work with data, mostly centered around the LanguageContext which now serves as a singleton for all things AaC.

Removed

  • Refactored out anything that wasn't part of the "Core AaC" into separate projects
  • Plant UML
  • VS Code Plugin & LSP
  • Protobuf
  • Maybe a couple others...check the org to see what's been moved into 3rd party repos

Fixed

  • AaC developer workflow. Now writing plugins should be much easier.

Security

  • Refactored out all the javascript and typescript, so we should go down to 0 vulnerabilities in depend-a-bot.

Checklist:

  • I updated project documentation to reflect my changes.
  • My changes generate no new warnings.
  • I updated new and existing unit tests to account for my changes.
  • I linked the associated item(s) to be closed.
  • I bumped the version.
  • I added the labels corresponding to my changes.

@jondavid-black
Copy link
Collaborator Author

I managed to track down the build version issue. It was buried in the developer dependencies within the setup.py file. I also discovered various places where name changes (i.e. adding a space to a plugin name) weren't properly propagated into the implementation and corrected those. I'm about to push these updates, and hopefully the CI will pass again. Then I'll go back to looking at PR comments and recommendations.

Copy link
Collaborator

@lizzcondrey lizzcondrey left a comment

Choose a reason for hiding this comment

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

Team reviewed the latest from an operational stance and the issues we were seeing have been resolved, all comments and suggestions applied to the PR have been addressed, applied, and resolved. So, we should finally be good to move forward. All follow up tasks have been documented for later application and associated work has been evaluated for close out.

@lizzcondrey lizzcondrey dismissed cvchaparro’s stale review February 20, 2024 17:59

All suggestions, requests, and comments have been engaged, incorporated, or captured as follow on effort. He's no longer an active member of the team so cannot remove the "changes requested" himself.

Copy link
Contributor

@crazynewidea crazynewidea left a comment

Choose a reason for hiding this comment

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

paired in team session for final review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changed For when PR includes information in the changed category deprecated For when PR includes information in the deprecated category fixed For when PR includes information in the fixed category removed For when PR includes information in the removed category security For when PR includes information in the security category
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants