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: complexity checker plugin #169

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

kharrop
Copy link

@kharrop kharrop commented Sep 24, 2024

Addresses #162.

Covers the following scenarios:

  • Asset nodes
  • Asset node complexity based on type
  • Nested assets within templates (and nested templates)
  • View nodes
  • View node complexity based on type
  • State expressions
  • Model - get expressions
  • Model - evaluations

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
📦 Published PR as canary version: 0.8.1--canary.169.3682

Try this version out locally by upgrading relevant packages to 0.8.1--canary.169.3682

@kharrop kharrop linked an issue Sep 24, 2024 that may be closed by this pull request
4 tasks
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.00%. Comparing base (260892c) to head (136d9ae).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
- Coverage   75.35%   75.00%   -0.35%     
==========================================
  Files          87       85       -2     
  Lines       13033    12860     -173     
  Branches     1225     1199      -26     
==========================================
- Hits         9821     9646     -175     
- Misses       3212     3214       +2     
Flag Coverage Δ
75.00% <100.00%> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

*/
maxWarningLevel?: number;
/** If set, maps complexity based on asset or view type */
assetComplexity?: Record<string, number>;
Copy link
Member

@sugarmanz sugarmanz Sep 25, 2024

Choose a reason for hiding this comment

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

We might want to consider accepting any as a key so we can assign weights for assets that are registered with more than just a type, as those might have more complexity than the base asset is, i.e. if { type: 'asset', role: 'enhanced' } accepts another asset slot than just { type: 'asset' }

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for this callout - agreed that including other slots than just type to measure asset complexity would provide additional data points, but at this time we're going to keep it simple just to get this out. I've added in TODO comments so that we don't forget about this.

@kharrop
Copy link
Author

kharrop commented Sep 26, 2024

/canary

1 similar comment
@kharrop
Copy link
Author

kharrop commented Sep 26, 2024

/canary

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.

Build Out Code Complexity Metrics
3 participants