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

Tags should refer to full paths, not just base paths. #4299

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Oct 25, 2024

See "Problem 2" in #4297

This is a pure refactor, it should not change any behaviour at all.
It adds more information into the tag system, but nothing reads that
extra information yet. It will be used to address problem 3 of the above
issue.

@adamchalmers adamchalmers requested a review from jessfraz October 25, 2024 01:14
Copy link

qa-wolf bot commented Oct 25, 2024

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 Oct 25, 2024

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

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Oct 25, 2024 1:40pm

See "Problem 2" in #4297

This is a pure refactor, it should not change any behaviour at all.
It adds more information into the tag system, but nothing reads that
extra information yet. It will be used to address problem 3 of the above
issue.
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 58.06452% with 13 lines in your changes missing coverage. Please review.

Project coverage is 85.80%. Comparing base (dfe7cfc) to head (d69fb2d).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/executor.rs 52.38% 10 Missing ⚠️
src/wasm-lib/kcl/src/std/sketch.rs 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4299      +/-   ##
==========================================
- Coverage   85.82%   85.80%   -0.03%     
==========================================
  Files          77       77              
  Lines       27167    27189      +22     
==========================================
+ Hits        23317    23330      +13     
- Misses       3850     3859       +9     
Flag Coverage Δ
wasm-lib 85.80% <58.06%> (-0.03%) ⬇️

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 enabled auto-merge (squash) October 25, 2024 14:20
Copy link
Contributor

@lf94 lf94 left a comment

Choose a reason for hiding this comment

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

LGTM. I kinda wish we errored when length is called on a non-linear line but I'm hoping the current method is very temporary. If it's not very temporary (< 1 month) we should do it

Comment on lines +1725 to +1731
pub fn get_from(&self) -> &[f64; 2] {
&self.get_base().from
}
/// Where does this path segment end?
pub fn get_to(&self) -> &[f64; 2] {
&self.get_base().to
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the unnecessary indirection?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the future we're not going to know the start/end of lines so easily (we'll need to query wasm or the API) so this change is preparation for that.

Copy link
Contributor

Choose a reason for hiding this comment

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

get_base() though is already abstracting

@adamchalmers adamchalmers merged commit 1140ced into main Oct 25, 2024
30 of 32 checks passed
@adamchalmers adamchalmers deleted the achalmers/path-seg-type-in-tag branch October 25, 2024 14:27
Copy link
Collaborator

@jtran jtran left a comment

Choose a reason for hiding this comment

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

Nice.

@adamchalmers
Copy link
Collaborator Author

LGTM. I kinda wish we errored when length is called on a non-linear line but I'm hoping the current method is very temporary. If it's not very temporary (< 1 month) we should do it

will be done today

@lf94 lf94 mentioned this pull request Oct 25, 2024
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