Skip to content

Conversation

@icweaver
Copy link
Contributor

@icweaver icweaver commented Aug 6, 2025

Documents plotting capabilities with Makie.jl

Depends on:

Based on: #165

@icweaver icweaver mentioned this pull request Aug 6, 2025
2 tasks
@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Benchmark Results (Julia v1.10)

Time benchmarks
main ba1090a... main / ba1090a...
Quantity/creation/Quantity(x) 3.11 ± 0.001 ns 3.11 ± 0.01 ns 1 ± 0.0032
Quantity/creation/Quantity(x, length=y) 3.11 ± 0.01 ns 3.11 ± 0.01 ns 1 ± 0.0046
Quantity/with_numbers/*real 3.11 ± 0.01 ns 3.11 ± 0.001 ns 1 ± 0.0032
Quantity/with_numbers/^int 8.67 ± 2.5 ns 8.67 ± 2.5 ns 1 ± 0.4
Quantity/with_numbers/^int * real 8.37 ± 2.2 ns 8.37 ± 2.2 ns 1 ± 0.37
Quantity/with_quantity/+y 4.05 ± 0.001 ns 4.04 ± 0.001 ns 1 ± 0.00035
Quantity/with_quantity//y 3.42 ± 0.011 ns 3.42 ± 0.011 ns 1 ± 0.0046
Quantity/with_self/dimension 3.1 ± 0.01 ns 3.11 ± 0.01 ns 1 ± 0.0046
Quantity/with_self/inv 3.41 ± 0.01 ns 3.41 ± 0.01 ns 1 ± 0.0042
Quantity/with_self/ustrip 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
QuantityArray/broadcasting/multi_array_of_quantities 0.143 ± 0.0026 ms 0.143 ± 0.0026 ms 0.999 ± 0.025
QuantityArray/broadcasting/multi_normal_array 0.0558 ± 0.0031 ms 0.0558 ± 0.0031 ms 1 ± 0.078
QuantityArray/broadcasting/multi_quantity_array 0.157 ± 0.0009 ms 0.157 ± 0.00084 ms 1 ± 0.0079
QuantityArray/broadcasting/x^2_array_of_quantities 24.2 ± 1.9 μs 23.7 ± 1.9 μs 1.02 ± 0.11
QuantityArray/broadcasting/x^2_normal_array 4.43 ± 0.77 μs 4.3 ± 0.77 μs 1.03 ± 0.26
QuantityArray/broadcasting/x^2_quantity_array 6.93 ± 0.34 μs 6.92 ± 0.29 μs 1 ± 0.065
QuantityArray/broadcasting/x^4_array_of_quantities 0.0815 ± 0.00057 ms 0.0815 ± 0.00051 ms 1 ± 0.0094
QuantityArray/broadcasting/x^4_normal_array 0.0498 ± 0.00017 ms 0.0498 ± 0.00016 ms 1 ± 0.0047
QuantityArray/broadcasting/x^4_quantity_array 0.0499 ± 0.00018 ms 0.0499 ± 0.00017 ms 1 ± 0.005
time_to_load 0.203 ± 0.0011 s 0.201 ± 0.0009 s 1.01 ± 0.0072
Memory benchmarks
main ba1090a... main / ba1090a...
Quantity/creation/Quantity(x) 0 allocs: 0 B 0 allocs: 0 B
Quantity/creation/Quantity(x, length=y) 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/*real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int * real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity/+y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity//y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/dimension 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/inv 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/ustrip 0 allocs: 0 B 0 allocs: 0 B
QuantityArray/broadcasting/multi_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/multi_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/multi_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^2_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^2_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^2_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^4_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^4_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^4_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
time_to_load 0.153 k allocs: 14.5 kB 0.153 k allocs: 14.5 kB 1

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

Benchmark Results (Julia v1)

Time benchmarks
main ba1090a... main / ba1090a...
Quantity/creation/Quantity(x) 3.1 ± 0.01 ns 3.72 ± 0.01 ns 0.835 ± 0.0035
Quantity/creation/Quantity(x, length=y) 3.73 ± 0 ns 3.43 ± 0.011 ns 1.09 ± 0.0035
Quantity/with_numbers/*real 2.79 ± 0 ns 3.41 ± 0.01 ns 0.82 ± 0.0024
Quantity/with_numbers/^int 8.67 ± 2.2 ns 8.98 ± 2.2 ns 0.965 ± 0.34
Quantity/with_numbers/^int * real 9.29 ± 2.2 ns 9.29 ± 2.2 ns 1 ± 0.33
Quantity/with_quantity/+y 4.35 ± 0 ns 4.04 ± 0.01 ns 1.08 ± 0.0027
Quantity/with_quantity//y 3.41 ± 0.01 ns 3.11 ± 0.001 ns 1.1 ± 0.0032
Quantity/with_self/dimension 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
Quantity/with_self/inv 3.11 ± 0.001 ns 3.42 ± 0.011 ns 0.909 ± 0.0029
Quantity/with_self/ustrip 4.02 ± 0.001 ns 2.79 ± 0.01 ns 1.44 ± 0.0052
QuantityArray/broadcasting/multi_array_of_quantities 0.0904 ± 0.00098 ms 0.0907 ± 0.00092 ms 0.998 ± 0.015
QuantityArray/broadcasting/multi_normal_array 0.0498 ± 0.00036 ms 0.0498 ± 0.00027 ms 1 ± 0.009
QuantityArray/broadcasting/multi_quantity_array 0.0623 ± 0.00036 ms 0.0534 ± 0.0062 ms 1.17 ± 0.13
QuantityArray/broadcasting/x^2_array_of_quantities 15.9 ± 4.3 μs 17 ± 4.1 μs 0.932 ± 0.34
QuantityArray/broadcasting/x^2_normal_array 2.4 ± 1.9 μs 3.46 ± 1.8 μs 0.696 ± 0.65
QuantityArray/broadcasting/x^2_quantity_array 3.48 ± 0.13 μs 4.06 ± 0.55 μs 0.857 ± 0.12
QuantityArray/broadcasting/x^4_array_of_quantities 0.0843 ± 0.00085 ms 0.0873 ± 0.00088 ms 0.966 ± 0.014
QuantityArray/broadcasting/x^4_normal_array 0.0497 ± 0.00023 ms 0.0497 ± 0.00018 ms 1 ± 0.0059
QuantityArray/broadcasting/x^4_quantity_array 0.0468 ± 0.00032 ms 0.0499 ± 0.0092 ms 0.937 ± 0.17
time_to_load 0.226 ± 0.0012 s 0.228 ± 0.003 s 0.993 ± 0.014
Memory benchmarks
main ba1090a... main / ba1090a...
Quantity/creation/Quantity(x) 0 allocs: 0 B 0 allocs: 0 B
Quantity/creation/Quantity(x, length=y) 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/*real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int * real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity/+y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity//y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/dimension 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/inv 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/ustrip 0 allocs: 0 B 0 allocs: 0 B
QuantityArray/broadcasting/multi_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/multi_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/multi_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^2_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^2_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^2_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^4_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^4_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^4_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
time_to_load 0.159 k allocs: 11.2 kB 0.159 k allocs: 11.2 kB 1

@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (8c7883a) to head (ba1090a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #183   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files          21       21           
  Lines        1292     1292           
=======================================
  Hits         1281     1281           
  Misses         11       11           

☔ 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.

v0 = 250m/s
θ = deg2rad(60)
g = 9.81m/s^2
nothing # hide
Copy link
Member

Choose a reason for hiding this comment

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

Can you use ; instead of a new line with this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh right, it got buried in the previous PR, but I think I was running into this when trying to do that. It's been a while though, so I'll go back and try it again

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, yea, still looks like no dice with @example blocks + semicolon suppression:

```@example projectile
# Can explicitly import units:
using DynamicQuantities: km, m, s, min

y0 = 10km
v0 = 250m/s
θ = deg2rad(60)
g = 9.81m/s^2;
```
image

It looks like this may be a design decision

On the flip side, we could use a @repl block if you like and output all the things equally:

```@repl projectile
# Can explicitly import units:
using DynamicQuantities: km, m, s, min

y0 = 10km
v0 = 250m/s
θ = deg2rad(60)
g = 9.81m/s^2
```
image

For completeness, the semicolon also works here, but it's probably not what we want in this case:

```@repl projectile
# Can explicitly import units:
using DynamicQuantities: km, m, s, min

y0 = 10km
v0 = 250m/s
θ = deg2rad(60)
g = 9.81m/s^2;
```
image

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