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

[PTRun][UnitConverter]Add support for sq prefix for square units #37862

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

Conversation

PesBandi
Copy link
Contributor

@PesBandi PesBandi commented Mar 10, 2025

Summary of the Pull Request

Adds support for using sq instead of ^2, for example sqcm instead of cm^2.

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • Replaces sq with ² if before a unit that can be square.
  • Works for the following units: s, μm, mm, cm, dm, m, km, mil, in, ft, yd, mi, nmi, ft (US)
  • Unlike the original PR, this also works with more complex units, such as m/sqs instead of m/s^2.

Screenshots that weren't possible before:
image
image

Validation Steps Performed

Added tests, manually tested a bunch of units

This comment has been minimized.

@moooyo
Copy link
Contributor

moooyo commented Mar 14, 2025

LGTM.

But, could you please add at least one picture in the description to show the usage of your new units format?

@moooyo
Copy link
Contributor

moooyo commented Mar 14, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PesBandi
Copy link
Contributor Author

Hi @moooyo, thanks for the review. I've added some screenshots to the description, you can check them out.

@PesBandi
Copy link
Contributor Author

Do you think I should mention this in the docs?

@moooyo
Copy link
Contributor

moooyo commented Mar 17, 2025

Do you think I should mention this in the docs?

I believe so. It's better.

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