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(*): MapDeclaration Parse & Print #641

Merged
merged 18 commits into from
May 10, 2023

Conversation

jonathan-casey
Copy link
Member

@jonathan-casey jonathan-casey commented Apr 25, 2023

Closes #

The implementation of the map declaration feature will be delivered incrementally through a phased approach. The first phase involves updating the parser grammar, & enabling both Parse and Print for map types. As part of this process, test data for both the cto and ast representation of a map declaration is added to test the print and parse functionalities.

At its core, a MapDeclaration consists of one MapKeyType and a general AggregateValueType, which may in some cases be specialized to an AggregateRelationshipValueType—both of which may be annotated, as too can the parent declaration.

For more information on the design specification see here

Changes

  • Updated Parser.pegjs
  • Updated Printer
  • Added test data for CTO and AST representation

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

@jonathan-casey jonathan-casey requested a review from a team April 25, 2023 20:50
@jonathan-casey jonathan-casey force-pushed the jcasey/map_declaration_grammar_rules branch from 8f4d36e to 3b37465 Compare April 25, 2023 21:00
Signed-off-by: jonathan.casey <[email protected]>
@mttrbrts mttrbrts changed the title feat(*) MapDeclaration Parse & Print feat(*): MapDeclaration Parse & Print Apr 26, 2023
packages/concerto-core/types/lib/model/identifiable.d.ts Outdated Show resolved Hide resolved
packages/concerto-core/types/lib/modelutil.d.ts Outdated Show resolved Hide resolved
packages/concerto-cto/lib/parser.pegjs Outdated Show resolved Hide resolved
packages/concerto-cto/lib/printer.js Outdated Show resolved Hide resolved
packages/concerto-cto/test/cto/map.cto Outdated Show resolved Hide resolved
@jonathan-casey jonathan-casey force-pushed the jcasey/map_declaration_grammar_rules branch from 4296b3f to f05a205 Compare April 27, 2023 11:17
@mttrbrts mttrbrts enabled auto-merge (squash) May 10, 2023 09:19
@mttrbrts mttrbrts merged commit 9cebae0 into main May 10, 2023
@mttrbrts mttrbrts deleted the jcasey/map_declaration_grammar_rules branch May 10, 2023 09:22
ragi-dayananda pushed a commit to ragi-dayananda/concerto that referenced this pull request May 22, 2023
* feat(*): add grammar rules for MapDeclaration

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add MapDeclaration case to Printer

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add cto & ast test data, for Parse & Print tests

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): type definitions updated

Signed-off-by: jonathan.casey <[email protected]>

* chore(*): package-lock update

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): fix JSDoc

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): remove MapPropertyKeyDeclaration & MapPropertValueDeclaration as top level declaration

Signed-off-by: jonathan.casey <[email protected]>

* test(*): decorators on map top level and props

Signed-off-by: jonathan.casey <[email protected]>

* test(*): negative case for map type - too many properties

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add MapRelationshipPropertyValue

Signed-off-by: jonathan.casey <[email protected]>

* test(*): add more test cov

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): parser.js update

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): AST  rename

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): printer evaluates AggregateRelationshipValueType

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): update test data

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): cleanup

* feat(*): cleanup

* feat(*): update parser.js

---------

Signed-off-by: jonathan.casey <[email protected]>
Signed-off-by: [email protected] <[email protected]>
mttrbrts added a commit that referenced this pull request May 22, 2023
* feat(*): MapDeclaration Parse & Print (#641)

* feat(*): add grammar rules for MapDeclaration

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add MapDeclaration case to Printer

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add cto & ast test data, for Parse & Print tests

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): type definitions updated

Signed-off-by: jonathan.casey <[email protected]>

* chore(*): package-lock update

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): fix JSDoc

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): remove MapPropertyKeyDeclaration & MapPropertValueDeclaration as top level declaration

Signed-off-by: jonathan.casey <[email protected]>

* test(*): decorators on map top level and props

Signed-off-by: jonathan.casey <[email protected]>

* test(*): negative case for map type - too many properties

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add MapRelationshipPropertyValue

Signed-off-by: jonathan.casey <[email protected]>

* test(*): add more test cov

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): parser.js update

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): AST  rename

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): printer evaluates AggregateRelationshipValueType

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): update test data

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): cleanup

* feat(*): cleanup

* feat(*): update parser.js

---------

Signed-off-by: jonathan.casey <[email protected]>
Signed-off-by: [email protected] <[email protected]>

* chore(deps): bump yaml from 2.0.0-9 to 2.2.2 in /packages/concerto-vocabulary (#640)

chore(deps): bump yaml in /packages/concerto-vocabulary

Bumps [yaml](https://github.com/eemeli/yaml) from 2.0.0-9 to 2.2.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](eemeli/yaml@v2.0.0-9...v2.2.2)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: [email protected] <[email protected]>

* Support string length validation in concerto core

Signed-off-by: [email protected] <[email protected]>

* instance generator changes
enhance edge cases for string validator

Signed-off-by: [email protected] <[email protected]>

* enhance test cases and update compare tests

Signed-off-by: [email protected] <[email protected]>

* add test cases for concerto-analysis

Signed-off-by: [email protected] <[email protected]>

* docs(readme): fix badges

Signed-off-by: [email protected] <[email protected]>

---------

Signed-off-by: jonathan.casey <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jonathan-Casey <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Roberts <[email protected]>
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.

2 participants