Skip to content

BREAKING: Change polygon to keyword args #6385

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

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

Conversation

jtran
Copy link
Collaborator

@jtran jtran commented Apr 17, 2025

Before

polygon({
  radius = 10,
  numSides = 6,
  center = [0, 0],
  inscribed = true,
}, %, $myTag)

After

polygon(
  radius = 10,
  numSides = 6,
  center = [0, 0],
  inscribed = true,
  tag = $myTag,
)

@jtran jtran requested a review from adamchalmers April 17, 2025 21:25
Copy link

vercel bot commented Apr 17, 2025

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

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Apr 18, 2025 10:58pm

Copy link

qa-wolf bot commented Apr 17, 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

codspeed-hq bot commented Apr 17, 2025

CodSpeed Instrumentation Performance Report

Merging #6385 will not alter performance

Comparing jtran/kwargs-polygon (65072e6) with main (90acc00)

Summary

✅ 54 untouched benchmarks

Base automatically changed from chalmerstran/kwargs-arc2 to main April 18, 2025 22:40
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.10%. Comparing base (90acc00) to head (65072e6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6385      +/-   ##
==========================================
- Coverage   85.11%   85.10%   -0.01%     
==========================================
  Files         108      108              
  Lines       46327    46324       -3     
==========================================
- Hits        39432    39426       -6     
- Misses       6895     6898       +3     
Flag Coverage Δ
rust 85.10% <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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

num_sides = { docs = "The number of sides in the polygon", include_in_snippet = true },
center = { docs = "The center point of the polygon", include_in_snippet = true },
inscribed = { docs = "Whether the polygon is inscribed (true, the default) or circumscribed (false) about a circle with the specified radius", include_in_snippet = true },
tag = { docs = "Create a new tag which refers to this line" },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not really related to this PR, but: afaict from the body of the function, this sets the tag on every line in the polygon sketch. Probably not what we want! Should this even take a tag param at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

WTF. It should probably not allow a tag. It might be okay if the tag could refer to the entire path, but I don't think we support that yet. I'll look into on Monday.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah. I think we should just remove this tag.

In the future we could consider allowing optional tags like (tagFace1 = $first, tagFace4 = $last)?

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