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

Feature/4401 creating langium parser git graph #5664

Conversation

Austin-Fulbright
Copy link
Contributor

@Austin-Fulbright Austin-Fulbright commented Jul 24, 2024

📑 Summary

This PR changes gitGraphAst.js to use typescript gitGraphAst.ts. There needs to be a lot of refactoring involving the types that each function in gitGraphAst.ts can accept. Since gitGraphAst.ts was originally written in javascript there is a lot of variables that are used to store completely different types in different functions. I am working on fixing some of the failed tests that the commitType is now causing. Other than that this PR request also has a new parser that uses the gitGraph langium parser.

Resolves

📏 Design Decisions

📋 Tasks

Make sure you

@github-actions github-actions bot added the Type: Enhancement New feature or request label Jul 24, 2024
Copy link

netlify bot commented Jul 24, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 5deaef4
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/66c8917ca651b90008fee0ce
😎 Deploy Preview https://deploy-preview-5664--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

argos-ci bot commented Jul 24, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 669 added, 2 failures Aug 23, 2024, 1:53 PM

@Austin-Fulbright
Copy link
Contributor Author

To fix the error.hash(). It looks like in the sequenceDB.ts someone wanted to create our own Error class in order to make this type safe:
Screenshot 2024-07-24 at 6 47 44 AM

@Austin-Fulbright Austin-Fulbright marked this pull request as draft July 24, 2024 13:23
Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 2357 lines in your changes missing coverage. Please review.

Project coverage is 5.21%. Comparing base (078038b) to head (5deaef4).
Report is 60 commits behind head on develop.

Files Patch % Lines
...kages/mermaid/src/diagrams/git/gitGraphRenderer.ts 0.00% 1350 Missing ⚠️
packages/mermaid/src/diagrams/git/gitGraphAst.ts 0.00% 522 Missing ⚠️
...ackages/mermaid/src/diagrams/git/gitGraphParser.ts 0.00% 243 Missing ⚠️
packages/mermaid/src/diagrams/git/gitGraphTypes.ts 0.00% 134 Missing ⚠️
packages/parser/src/language/gitGraph/module.ts 0.00% 52 Missing ⚠️
packages/parser/tests/test-util.ts 0.00% 24 Missing ⚠️
packages/parser/src/language/index.ts 0.00% 11 Missing ⚠️
packages/parser/src/parse.ts 0.00% 9 Missing ⚠️
...kages/parser/src/language/gitGraph/tokenBuilder.ts 0.00% 7 Missing ⚠️
...ckages/mermaid/src/diagrams/git/gitGraphDiagram.ts 0.00% 4 Missing ⚠️
... and 1 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #5664      +/-   ##
==========================================
- Coverage     5.31%   5.21%   -0.11%     
==========================================
  Files          318     323       +5     
  Lines        45173   46094     +921     
  Branches       531     536       +5     
==========================================
  Hits          2402    2402              
- Misses       42771   43692     +921     
Flag Coverage Δ
unit 5.21% <0.00%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
packages/parser/src/language/gitGraph/index.ts 0.00% <0.00%> (ø)
...ckages/mermaid/src/diagrams/git/gitGraphDiagram.ts 0.00% <0.00%> (ø)
...kages/parser/src/language/gitGraph/tokenBuilder.ts 0.00% <0.00%> (ø)
packages/parser/src/parse.ts 0.00% <0.00%> (ø)
packages/parser/src/language/index.ts 0.00% <0.00%> (ø)
packages/parser/tests/test-util.ts 0.00% <0.00%> (ø)
packages/parser/src/language/gitGraph/module.ts 0.00% <0.00%> (ø)
packages/mermaid/src/diagrams/git/gitGraphTypes.ts 0.00% <0.00%> (ø)
...ackages/mermaid/src/diagrams/git/gitGraphParser.ts 0.00% <0.00%> (ø)
packages/mermaid/src/diagrams/git/gitGraphAst.ts 0.00% <0.00%> (ø)
... and 1 more

@Austin-Fulbright Austin-Fulbright marked this pull request as ready for review July 24, 2024 14:48
@Austin-Fulbright
Copy link
Contributor Author

I am going to try and make sure the langium file works with the import and then add more tests for coverage and then it should be good to merge

Copy link
Member

@sidharthv96 sidharthv96 left a comment

Choose a reason for hiding this comment

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

Some tangential cleanup comments, some of them might be pre-existing code that's not aligned with the current conventions.

packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphParser.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphParser.ts Outdated Show resolved Hide resolved
packages/parser/src/language/gitGraph/module.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/parser/gitGraph.jison Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
Austin Fulbright and others added 3 commits July 27, 2024 03:51
Co-authored-by: Sidharth Vinod <github@sidharth.dev>
Co-authored-by: Sidharth Vinod <github@sidharth.dev>
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphAst.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphRenderer.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphTypes.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphTypes.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphTypes.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/git/gitGraphTypes.ts Outdated Show resolved Hide resolved
Copy link

changeset-bot bot commented Aug 23, 2024

🦋 Changeset detected

Latest commit: 5deaef4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@mermaid-js/parser Minor
mermaid Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

* develop: (34 commits)
  Mermaid version v11.0.0
  Run release drafter in release branch
  [autofix.ci] apply automated fixes
  Updating syntax reference with code showing how to select layout and look.
  Fix for selecting the correct diagramPadding for flowcharts
  Fix for turned arrow heads and missing edge sections
  Basic fix for handdrawn subgraph styling
  Fix for text alignment issue
  mermaid-js#5237 Fix for weird line intersection
  Fix config
  docs: Update release version
  docs: Update release version
  chore: Revert version changes
  chore: Revert version changes
  Remove release drafter
  Add changeset to PR template
  Remove changesets
  Update changelog format
  verify Docs version before publish
  chore: Remove prePublishOnly
  ...
@sidharthv96 sidharthv96 merged commit a10f469 into mermaid-js:develop Aug 23, 2024
13 of 14 checks passed
Copy link

mermaid-bot bot commented Aug 23, 2024

@Austin-Fulbright, Thank you for the contribution!
You are now eligible for a year of Premium account on MermaidChart.
Sign up with your GitHub account to activate.

@Austin-Fulbright Austin-Fulbright deleted the feature/4401_creating_langium_parser_gitGraph branch August 23, 2024 16:31
@github-actions github-actions bot mentioned this pull request Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants