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

More numeric types baby steps #5388

Merged
merged 3 commits into from
Feb 19, 2025
Merged

More numeric types baby steps #5388

merged 3 commits into from
Feb 19, 2025

Conversation

nrc
Copy link
Contributor

@nrc nrc commented Feb 14, 2025

This adds propagation for numeric types through simple arithmetic, but only in the easiest cases. It also propagates a little more through geometry and lays the foundations for propagating through Paths.

Copy link

qa-wolf bot commented Feb 14, 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 14, 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 19, 2025 7:37pm

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 88.80000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 85.84%. Comparing base (b2e1d21) to head (9ca6727).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/execution/kcl_value.rs 73.33% 8 Missing ⚠️
src/wasm-lib/kcl/src/docs/mod.rs 89.79% 5 Missing ⚠️
src/wasm-lib/kcl/src/lsp/kcl/mod.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5388      +/-   ##
==========================================
- Coverage   85.84%   85.84%   -0.01%     
==========================================
  Files          94       94              
  Lines       34707    34803      +96     
==========================================
+ Hits        29794    29876      +82     
- Misses       4913     4927      +14     
Flag Coverage Δ
wasm-lib 85.84% <88.80%> (-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.

@nrc nrc marked this pull request as ready for review February 19, 2025 04:25
@nrc nrc requested a review from jtran February 19, 2025 04:35
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.

Great!

Comment on lines +654 to +656
schemars::schema::SingleOrVec::Vec(items) => {
if items.len() == 2 {
// Get the second item and see if its a NumericType.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we create a wrapper type? Jess suggested it might simplify building the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I might as a follow-up. It's kind of annoying because it's only used where we're extracting the number out of a value, it shouldn't be user-facing at all. There's a lot of places which would need to be changed too

@nrc nrc merged commit 45707d2 into main Feb 19, 2025
37 checks passed
@nrc nrc deleted the nrc-num-ty2 branch February 19, 2025 21:12
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