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

R20 update #314

Merged
merged 65 commits into from
Oct 25, 2023
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d51c131
add tests for r20 units and start work on getting the database for r2…
phlptp Mar 22, 2020
23c485f
add more output for the test
phlptp Mar 22, 2020
e1fda20
more additions to r20
phlptp Mar 26, 2020
e0d6233
add a bunch more r20 translations
phlptp Apr 21, 2020
d7ebc63
more r20 conversions
phlptp Apr 23, 2020
f10a690
more updates for r20
phlptp Apr 25, 2020
bafa13e
added some more r20 conversions
phlptp Nov 26, 2020
5717809
add more units and conversions
phlptp Dec 1, 2020
e98e13e
start modifying the commodities to match up with the harmonized system
phlptp Dec 2, 2020
7dac3a9
more commodities updates
phlptp Feb 5, 2021
6932cbb
more commodity definitions.
phlptp May 16, 2022
982aeb5
update commodity docs
phlptp May 16, 2022
05cc4b7
more commodity definitions to merge in main
phlptp Dec 29, 2022
8a0254d
update some more units
phlptp May 27, 2023
c7bdf7f
more work on updating commodities and packaging
phlptp Jun 3, 2023
d5ec57c
Merge branch 'main' into r20_update
phlptp Aug 28, 2023
df2dcf6
Merge remote-tracking branch 'remotes/origin/main' into r20_update
phlptp Sep 2, 2023
aca9ac3
all r20 commodities off default
phlptp Sep 14, 2023
a17fc20
fix more conversions and tests, fix issues with parsing square/square…
phlptp Sep 19, 2023
b6df882
more units to match
phlptp Sep 21, 2023
f138d3e
rework unit constructors to be more unambiguous
phlptp Sep 23, 2023
26cd9a1
more test fixes
phlptp Sep 24, 2023
09359ba
rearrange the bracketmodifiers section
phlptp Sep 27, 2023
c1f4e0f
more work on the unit string conversions
phlptp Oct 1, 2023
017056c
clear more mismatches
phlptp Oct 2, 2023
750512a
fix a few more units
phlptp Oct 2, 2023
f0b2901
fix more unit and conversions
phlptp Oct 5, 2023
f77bb9c
fix a few more conversions
phlptp Oct 16, 2023
ac682f3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2023
e2eb613
update pre-commit
phlptp Oct 16, 2023
23b70e1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2023
a57d439
fix a few code checks
phlptp Oct 16, 2023
76fc084
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 16, 2023
4b4f6a2
fix a few of the tests
phlptp Oct 17, 2023
2e86472
Merge branch 'r20_update' of https://github.com/LLNL/units into r20_u…
phlptp Oct 17, 2023
ed6e646
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 17, 2023
78055f4
fix a few more unit conversions
phlptp Oct 18, 2023
81d8245
rework pressure units
phlptp Oct 20, 2023
0f9e38c
Merge branch 'r20_update' of https://github.com/LLNL/units into r20_u…
phlptp Oct 20, 2023
3ce619b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 20, 2023
5d9e9b9
better handing of US and repeated modifiers
phlptp Oct 20, 2023
871c5eb
fix remaining tests
phlptp Oct 22, 2023
6c60d21
Merge branch 'r20_update' of https://github.com/LLNL/units into r20_u…
phlptp Oct 22, 2023
3a17e7e
fix some compilation issues with the recommendation 20 unit inclusion…
phlptp Oct 23, 2023
78031ed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 23, 2023
6c12255
clang tidy and gcc 4.8 compilation
phlptp Oct 23, 2023
6ed3bdd
Merge branch 'r20_update' of https://github.com/LLNL/units into r20_u…
phlptp Oct 23, 2023
6b23813
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 23, 2023
d10ee52
line length fixes
phlptp Oct 23, 2023
c857f1c
Merge branch 'r20_update' of https://github.com/LLNL/units into r20_u…
phlptp Oct 23, 2023
1118dd8
add fuzzing test
phlptp Oct 23, 2023
8bf1cff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 23, 2023
ea5b4f2
add additional check on the r20 unit conversions
phlptp Oct 23, 2023
0387ff2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 23, 2023
40cf626
fix a fuzzing issue
phlptp Oct 24, 2023
c4cf996
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 24, 2023
0f31648
clang-tidy fixes
phlptp Oct 24, 2023
71b63dc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 24, 2023
f2bdc2c
more clang-tidy fixes
phlptp Oct 24, 2023
83d96e8
Merge branch 'r20_update' of https://github.com/LLNL/units into r20_u…
phlptp Oct 24, 2023
d5bc696
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 24, 2023
ad7a507
fix fuzz issue
phlptp Oct 25, 2023
3af298a
Merge branch 'r20_update' of https://github.com/LLNL/units into r20_u…
phlptp Oct 25, 2023
7303e26
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 25, 2023
de48700
more clang-tidy fixes
phlptp Oct 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more clang-tidy fixes
phlptp committed Oct 24, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f2bdc2cc709dd6b7127e0483ea8d4cb3d590b22a
2 changes: 1 addition & 1 deletion units/commodities.cpp
Original file line number Diff line number Diff line change
@@ -340,7 +340,7 @@ uint32_t getCommodity(std::string comm)
}

if (comm.compare(0, 7, "cxcomm[") == 0) {
return static_cast<int32_t>(atoi(comm.c_str() + 7));
return strtoul(comm.c_str() + 7,nullptr,0);
}
if ((comm.size() < 6) && std::all_of(comm.begin(), comm.end(), [](char x) {
return (x == ' ' || (x >= '_' && x <= '}'));
14 changes: 7 additions & 7 deletions units/r20_conv.cpp
Original file line number Diff line number Diff line change
@@ -1115,9 +1115,9 @@ namespace precise {
unitD{"EQ", "equivalent gallon", gal},
unitD{"EV", "envelope", {1.0, count, commodities::packaging::envelope}},
unitD{"F01", "bit per cubic metre", data::bit / m.pow(3)},
unitD{"F02", "kelvin per kelvin", K / K},
unitD{"F02", "kelvin per kelvin", pu*K},
unitD{"F03", "kilopascal per bar", kilo* Pa / bar},
unitD{"F04", "millibar per bar", milli* bar / bar},
unitD{"F04", "millibar per bar", milli* pu*bar},
unitD{"F05", "megapascal per bar", mega* Pa / bar},
unitD{"F06", "poise per bar", cgs::poise / bar},
unitD{"F07", "pascal per bar", Pa / bar},
@@ -1862,7 +1862,7 @@ namespace precise {
"kilomole per cubic metre bar",
kilo* mol / (m.pow(3) * bar)},
unitD{"K61", "kilomole per minute", kilo* mol / min},
unitD{"K62", "litre per litre", L / L},
unitD{"K62", "litre per litre", pu*L},
unitD{"K63", "reciprocal litre", L.inv()},
unitD{
"K64",
@@ -2096,7 +2096,7 @@ namespace precise {
unitD{"L49", "peck (US dry) per hour", us::dry::peck / hr},
unitD{"L50", "peck (US dry) per minute", us::dry::peck / min},
unitD{"L51", "peck (US dry) per second", us::dry::peck / s},
unitD{"L52", "psi per psi", pressure::psi / pressure::psi},
unitD{"L52", "psi per psi", pu*pressure::psi},
unitD{"L53", "pint (UK) per day", imp::pint / day},
unitD{"L54", "pint (UK) per hour", imp::pint / hr},
unitD{"L55", "pint (UK) per minute", imp::pint / min},
@@ -2227,7 +2227,7 @@ namespace precise {
unitD{"M25", "percent per degree Celsius", percent / degC},
unitD{"M26", "gigaohm per metre", giga* ohm / m},
unitD{"M27", "megahertz metre", mega* Hz* m},
unitD{"M29", "kilogram per kilogram", kg / kg},
unitD{"M29", "kilogram per kilogram", pu*kg},
unitD{
"M30",
"reciprocal volt - ampere reciprocal second",
@@ -2301,7 +2301,7 @@ namespace precise {
"million Btu per 1000 cubic foot",
mega* btu / (thousand * ft.pow(3))},
unitD{"M90", "kilopound per hour", kilo* lbf / hr},
unitD{"M91", "pound per pound", lb / lb},
unitD{"M91", "pound per pound", pu*lb},
unitD{"M92", "pound-force foot", lbf* ft},
unitD{"M93", "newton metre per radian", N* m / rad},
unitD{"M94", "kilogram metre", kg* m},
@@ -2827,7 +2827,7 @@ namespace precise {
unitD{"Q23", "weber to the power minus one", weber.inv()},
unitD{"Q24", "reciprocal inch", in.inv()},
unitD{"Q25", "dioptre", clinical::diopter},
unitD{"Q26", "one per one", count / count},
unitD{"Q26", "one per one", pu*count},
unitD{"Q27", "newton metre per metre", N* m / m},
unitD{
"Q28",