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

KCL: Sweep stdlib fn now uses keyword args #5300

Merged
merged 7 commits into from
Feb 7, 2025
Merged

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Feb 7, 2025

Before:

|> sweep({ path = myPath }, %)

After:

|> sweep(path = myPath)

Copy link

qa-wolf bot commented Feb 7, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 7, 2025 6:20pm

@adamchalmers adamchalmers force-pushed the achalmers/kw-sweep branch 2 times, most recently from ad468ed to 8f0a43c Compare February 7, 2025 14:23
@adamchalmers adamchalmers marked this pull request as ready for review February 7, 2025 14:24
Copy link
Collaborator

@pierremtb pierremtb left a comment

Choose a reason for hiding this comment

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

I believe you'll need to fix the point-and-click tests for Sweep, see

const sweepDeclaration = 'sweep001 = sweep({ path = sketch002 }, sketch001)'

const declaration = createVariableDeclaration(name, sweep)
modifiedAst.body.push(declaration)
const pathToNode: PathToNode = [
['body', ''],
[modifiedAst.body.length - 1, 'index'],
['declaration', 'VariableDeclaration'],
['init', 'VariableDeclarator'],
['arguments', 'CallExpression'],
[0, 'index'],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was surprised that this referred to the SweepData object (e.g. {path: myPath}). I thought it would refer to the sketch being swept.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe I had messed this one up?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to update the docs after this change.

args = {
sketch = { docs = "The sketch that should be swept in space" },
path = { docs = "The path to sweep the sketch along" },
sectional = { docs = "If true, the sweep will be broken up into sub-sweeps (extrusions, revolves, sweeps) based on the trajectory path components." },
Copy link
Collaborator

@pierremtb pierremtb Feb 7, 2025

Choose a reason for hiding this comment

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

Just a note here: sectional is missing from point-and-click implementation today, created an issue to track it #5301 (v1 scope creep candidate labeled ofc!)

Copy link
Collaborator

@pierremtb pierremtb left a comment

Choose a reason for hiding this comment

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

Looks good, tested locally. Hope we won't need to babysit the tests too much to get it merged! I see the snapshots are acting up

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.04%. Comparing base (f6e975d) to head (211af8a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5300      +/-   ##
==========================================
- Coverage   86.04%   86.04%   -0.01%     
==========================================
  Files          92       92              
  Lines       33254    33250       -4     
==========================================
- Hits        28613    28609       -4     
  Misses       4641     4641              
Flag Coverage Δ
wasm-lib 86.04% <100.00%> (-0.01%) ⬇️

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.

@adamchalmers adamchalmers merged commit 30b1dae into main Feb 7, 2025
31 checks passed
@adamchalmers adamchalmers deleted the achalmers/kw-sweep branch February 7, 2025 18:35
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.

3 participants