-
Notifications
You must be signed in to change notification settings - Fork 0
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
ADSECGH-99: Create Section Tests #136
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces a new function for creating sections and adapts it for use in the Grasshopper environment to support section testing functionality.
- Adds CreateSectionFunction with metadata and organisation settings.
- Implements a GH component adapter by subclassing the new function.
- Integrates necessary using statements to support the new component structure.
Reviewed Changes
File | Description |
---|---|
AdSecCore/Functions/CreateSectionFunction.cs | Introduces a function class for section creation with associated metadata. |
AdSecGH/Components/3_Section/CreateSection.cs | Adopts a component adapter pattern by extending the function class for Grasshopper integration. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
AdSecGH/Components/3_Section/CreateSection.cs:29
- [nitpick] The class name 'CreateSectionGh' could be more descriptive. Consider renaming it to clearly reflect its role as an adapter for the CreateSectionFunction in the Grasshopper context.
public class CreateSectionGh : CreateSectionFunction {
ccd631f
to
8553d2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces tests and updates to the section creation functionality across both core libraries and Grasshopper components. Key changes include:
- Adding unit tests for both the core CreateSectionFunction and the Grasshopper CreateSection component.
- Updating the ProfileBuilder and SectionBuilder implementations to support the new test requirements.
- Enhancing parameter classes and helper conversions for improved consistency in the API usage.
Reviewed Changes
File | Description |
---|---|
AdSecCoreTests/Functions/CreateSectionFunctionTests.cs | New unit tests validating input/output counts and section creation. |
AdSecGHTests/Components/03_Section/CreateSectionTests.cs | New tests checking the component’s input/output parameters. |
AdSecCore/Builders/ProfileBuilder.cs | Added builder methods for profile creation. |
AdSecCore/Functions/CreateSectionFunction.cs | Implementation of section creation logic using SectionBuilder. |
AdSecGH/Components/3_Section/CreateSection.cs | Updated GH component with event handling and output mapping. |
AdSecCore/Builders/SectionBuilder.cs | Revised builder logic with renaming of internal dimensions. |
AdSecCore/Functions/ParametersGeneric.cs | Added new parameter classes for profiles and materials. |
AdSecGH/Helpers/BusinessExtensions.cs | Updated helper to convert parameters to GH types. |
AdSecGH/Components/2_Profile/CreateProfile.cs | Adjusted type annotations in profile creation component. |
AdSecGH/Components/3_Section/FlattenRebar.cs | Minor formatting update in Rebar flattening component. |
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
AdSecCore/Builders/SectionBuilder.cs:107
- [nitpick] The method 'WithHeight' sets the internal variable '_depth', which may be inconsistent with its name. Consider renaming it to 'WithDepth' for clarity.
public SectionBuilder WithHeight(double height) {
…reduce duplication
…tion to SectionBuilder
…ll to the CalibrateReinforcementGroupsForSection
…into simple steps method overload, sonarcloud warning
… non ISingleBars case
9563545
to
45695cc
Compare
…d rebars and perimeter profile
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
=======================================
+ Coverage 50.0% 51.0% +1.0%
=======================================
Files 103 106 +3
Lines 6931 6994 +63
Branches 870 872 +2
=======================================
+ Hits 3467 3570 +103
+ Misses 3391 3350 -41
- Partials 73 74 +1
🚀 New features to boost your workflow:
|
|
…organisation