-
Notifications
You must be signed in to change notification settings - Fork 122
Declare public symbols #811
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
Open
Eben60
wants to merge
9
commits into
JuliaPhysics:master
Choose a base branch
from
Eben60:mark_public_units
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+355
−168
Open
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ec8669e
add declaration of public variables
Eben60 6cde5e4
check if variables declared as public/exported, or listed as private
Eben60 448bd54
Merge branch 'master' into mark_public_units
Eben60 2e41dae
declare public names via macros
Eben60 47657b4
change makepublic=autodocs to makepublic=false
Eben60 e7cd240
change docstrings due to changed display after declaring vars as public
Eben60 5296073
remove empty line
Eben60 9011846
set makepublic=false; add testset "Declare Public"
Eben60 1321861
replace explicit declaration of :u as public by @unit macro argument
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,219 @@ | ||
|
|
||
| # underline prepended names | ||
| """ | ||
| _Quantity, _affineerror, _basefactors, _colon, _convfact_floattype, _dimerr, _fma, | ||
| _gconv, _isapprox, _isless, _le, _lt, _muladd, _offset_for_steprangelen, | ||
| _promote_unit, _rounderr, _unitful_start_step_length, _unitful_start_stop, | ||
| _unitful_start_stop_length, _unitful_step_stop_length | ||
| """ | ||
|
|
||
| # module names | ||
| """ | ||
| DefaultSymbols | ||
| """ | ||
|
|
||
| # Base names | ||
| """ | ||
| GC, TP, _colon, cd, cot, csc, eval, include, sec, slug, ≤ | ||
| """ | ||
|
|
||
| # private fns | ||
| """ | ||
| abbr, abs2_fast, abs_fast, affinetranslation, affineunit, base, basefactor, | ||
| basefactors_expr, colon, colonstartstop, conj_fast, convfact, convfact_floattype, | ||
| dimtype, expfn, fp_overflow_underflow, fromlog, gaintype, genericunit, get_T, | ||
| has_unit_spacing, inv_fast, isrootpower, isrootpower_dim, isunitless, leveltype, | ||
| logfn, lookup_units, name, numtype, power, prefactor, preferunits, prefix, | ||
| print_closing_bracket, print_opening_bracket, printed_length, promote_to_derived, | ||
| promote_unit, quantitytype, register, showrep, showval, sign_fast, sortexp, | ||
| superscript, tens, tensfactor, tolog, try_uconvert, uconvert_affine, unwrap, | ||
| ustrcheck_bool | ||
| """ | ||
|
|
||
| # nodims units | ||
| public deg, pcm, percent, permille, pertenthousand, ppb, ppm, ppq, ppt, rad, sr, ° | ||
|
|
||
| # phys constants | ||
| public G, Na, R, R∞, Z0, c0, gn, h, k, me, mn, mp, q, ħ, Φ0, ε0, μ0, μB, σ, ϵ0 | ||
|
|
||
| # basic dims | ||
| public Amount, Current, Length, Luminosity, Mass, Temperature, Time | ||
|
|
||
| # compound dims | ||
| public Acceleration, Action, Area, BField, Capacitance, Charge, DField, Density, | ||
| DynamicViscosity, EField, ElectricDipoleMoment, ElectricQuadrupoleMoment, | ||
| ElectricalConductance, ElectricalConductivity, ElectricalResistance, | ||
| ElectricalResistivity, Energy, Force, Frequency, HField, Inductance, | ||
| KinematicViscosity, MagneticDipoleMoment, MagneticFlux, MassFlow, Molality, | ||
| MolarFlow, MolarMass, Molarity, Momentum, Power, Pressure, Velocity, Voltage, Volume, | ||
| VolumeFlow, Wavenumber | ||
|
|
||
| # unit names | ||
| public A, Ba, Bq, C, EA, EBa, EBq, EC, EF, EGal, EGauss, EGy, EH, EHz, EHz2π, EJ, EK, EL, | ||
| EM, EMx, EN, EOe, EP, EPa, ES, ESt, ESv, ET, ETorr, EV, EW, EWb, Eatm, Eb, Ebar, | ||
| Ecal, Ecd, Edyn, EeV, Eerg, Eg, Ekat, El, Elm, Elx, Em, Emol, Erad, Es, Esr, Eyr, EΩ, | ||
| F, GA, GBa, GBq, GF, GGal, GGauss, GGy, GH, GHz, GHz2π, GJ, GK, GL, GM, GMx, GN, GOe, | ||
| GP, GPa, GS, GSt, GSv, GT, GTorr, GV, GW, GWb, Gal, Gatm, Gauss, Gb, Gbar, Gcal, Gcd, | ||
| Gdyn, GeV, Gerg, Gg, Gkat, Gl, Glm, Glx, Gm, Gmol, Grad, Gs, Gsr, Gy, Gyr, GΩ, H, Hz, | ||
| Hz2π, J, K, L, M, MA, MBa, MBq, MC, MF, MGal, MGauss, MGy, MH, MHz, MHz2π, MJ, MK, | ||
| ML, MM, MMx, MN, MOe, MP, MPa, MS, MSt, MSv, MT, MTorr, MV, MW, MWb, Matm, Mb, Mbar, | ||
| Mcal, Mcd, Mdyn, MeV, Merg, Mg, Mkat, Ml, Mlm, Mlx, Mm, Mmol, Mrad, Ms, Msr, Mx, Myr, | ||
| MΩ, N, Oe, P, PA, PBa, PBq, PC, PF, PGal, PGauss, PGy, PH, PHz, PHz2π, PJ, PK, PL, | ||
| PM, PMx, PN, POe, PP, PPa, PS, PSt, PSv, PT, PTorr, PV, PW, PWb, Pa, Patm, Pb, Pbar, | ||
| Pcal, Pcd, Pdyn, PeV, Perg, Pg, Pkat, Pl, Plm, Plx, Pm, Pmol, Prad, Ps, Psr, Pyr, PΩ, | ||
| Ra, S, St, Sv, T, TA, TBa, TBq, TC, TF, TGal, TGauss, TGy, TH, THz, THz2π, TJ, TK, | ||
| TL, TM, TMx, TN, TOe, TPa, TS, TSt, TSv, TT, TTorr, TV, TW, TWb, Tatm, Tb, Tbar, | ||
| Tcal, Tcd, Tdyn, TeV, Terg, Tg, Tkat, Tl, Tlm, Tlx, Tm, Tmol, Torr, Trad, Ts, Tsr, | ||
| Tyr, TΩ, V, W, Wb, YA, YBa, YBq, YC, YF, YGal, YGauss, YGy, YH, YHz, YHz2π, YJ, YK, | ||
| YL, YM, YMx, YN, YOe, YP, YPa, YS, YSt, YSv, YT, YTorr, YV, YW, YWb, Yatm, Yb, Ybar, | ||
| Ycal, Ycd, Ydyn, YeV, Yerg, Yg, Ykat, Yl, Ylm, Ylx, Ym, Ymol, Yrad, Ys, Ysr, Yyr, YΩ, | ||
| ZA, ZBa, ZBq, ZC, ZF, ZGal, ZGauss, ZGy, ZH, ZHz, ZHz2π, ZJ, ZK, ZL, ZM, ZMx, ZN, | ||
| ZOe, ZP, ZPa, ZS, ZSt, ZSv, ZT, ZTorr, ZV, ZW, ZWb, Zatm, Zb, Zbar, Zcal, Zcd, Zdyn, | ||
| ZeV, Zerg, Zg, Zkat, Zl, Zlm, Zlx, Zm, Zmol, Zrad, Zs, Zsr, Zyr, ZΩ, a, aA, aBa, aBq, | ||
| aC, aF, aGal, aGauss, aGy, aH, aHz, aHz2π, aJ, aK, aL, aM, aMx, aN, aOe, aP, aPa, aS, | ||
| aSt, aSv, aT, aTorr, aV, aW, aWb, aatm, ab, abar, ac, acal, acd, adyn, aeV, aerg, ag, | ||
| akat, al, alm, alx, am, amol, angstrom, arad, as, asr, atm, ayr, aΩ, b, bar, btu, c, | ||
| cA, cBa, cBq, cC, cF, cGal, cGauss, cGy, cH, cHz, cHz2π, cJ, cK, cL, cM, cMx, cN, | ||
| cOe, cP, cPa, cS, cSt, cSv, cT, cTorr, cV, cW, cWb, cal, catm, cb, cbar, ccal, ccd, | ||
| cdyn, ceV, cerg, cg, ckat, cl, clm, clx, cm, cmol, crad, cs, csr, cyr, cΩ, d, dA, | ||
| dBa, dBq, dC, dF, dGal, dGauss, dGy, dH, dHz, dHz2π, dJ, dK, dL, dM, dMx, dN, dOe, | ||
| dP, dPa, dS, dSt, dSv, dT, dTorr, dV, dW, dWb, daA, daBa, daBq, daC, daF, daGal, | ||
| daGauss, daGy, daH, daHz, daHz2π, daJ, daK, daL, daM, daMx, daN, daOe, daP, daPa, | ||
| daS, daSt, daSv, daT, daTorr, daV, daW, daWb, daatm, dab, dabar, dacal, dacd, dadyn, | ||
| daeV, daerg, dag, dakat, dal, dalm, dalx, dam, damol, darad, das, dasr, datm, dayr, | ||
| daΩ, db, dbar, dcal, dcd, ddyn, deV, derg, dg, dkat, dl, dlm, dlx, dm, dmol, dr, | ||
| drad, ds, dsr, dyn, dyr, dΩ, eV, erg, fA, fBa, fBq, fC, fF, fGal, fGauss, fGy, fH, | ||
| fHz, fHz2π, fJ, fK, fL, fM, fMx, fN, fOe, fP, fPa, fS, fSt, fSv, fT, fTorr, fV, fW, | ||
| fWb, fatm, fb, fbar, fcal, fcd, fdyn, feV, ferg, fg, fkat, fl, flm, flx, fm, fmol, | ||
| frad, fs, fsr, ft, fyr, fΩ, g, ge, gr, hA, hBa, hBq, hC, hF, hGal, hGauss, hGy, hH, | ||
| hHz, hHz2π, hJ, hK, hL, hM, hMx, hN, hOe, hP, hPa, hS, hSt, hSv, hT, hTorr, hV, hW, | ||
| hWb, ha, hatm, hb, hbar, hcal, hcd, hdyn, heV, herg, hg, hkat, hl, hlm, hlx, hm, | ||
| hmol, hr, hrad, hs, hsr, hyr, hΩ, inch, kA, kBa, kBq, kC, kF, kGal, kGauss, kGy, kH, | ||
| kHz, kHz2π, kJ, kK, kL, kM, kMx, kN, kOe, kP, kPa, kS, kSt, kSv, kT, kTorr, kV, kW, | ||
| kWb, kat, katm, kb, kbar, kcal, kcd, kdyn, keV, kerg, kg, kkat, kl, klm, klx, km, | ||
| kmol, krad, ks, ksr, kyr, kΩ, l, lb, lbf, lm, lx, m, mA, mBa, mBq, mC, mF, mGal, | ||
| mGauss, mGy, mH, mHz, mHz2π, mJ, mK, mL, mM, mMx, mN, mOe, mP, mPa, mS, mSt, mSv, mT, | ||
| mTorr, mV, mW, mWb, matm, mb, mbar, mcal, mcd, mdyn, meV, merg, mg, mi, mil, minute, | ||
| mkat, ml, mlm, mlx, mm, mmol, mol, mrad, ms, msr, myr, mΩ, nA, nBa, nBq, nC, nF, | ||
| nGal, nGauss, nGy, nH, nHz, nHz2π, nJ, nK, nL, nM, nMx, nN, nOe, nP, nPa, nS, nSt, | ||
| nSv, nT, nTorr, nV, nW, nWb, natm, nb, nbar, ncal, ncd, ndyn, neV, nerg, ng, nkat, | ||
| nl, nlm, nlx, nm, nmol, nrad, ns, nsr, nyr, nΩ, oz, pA, pBa, pBq, pC, pF, pGal, | ||
| pGauss, pGy, pH, pHz, pHz2π, pJ, pK, pL, pM, pMx, pN, pOe, pP, pPa, pS, pSt, pSv, pT, | ||
| pTorr, pV, pW, pWb, patm, pb, pbar, pcal, pcd, pdyn, peV, perg, pg, pkat, pl, plm, | ||
| plx, pm, pmol, prad, ps, psi, psr, pyr, pΩ, rpm, rps, s, u, wk, yA, yBa, yBq, yC, yF, | ||
| yGal, yGauss, yGy, yH, yHz, yHz2π, yJ, yK, yL, yM, yMx, yN, yOe, yP, yPa, yS, ySt, | ||
| ySv, yT, yTorr, yV, yW, yWb, yatm, yb, ybar, ycal, ycd, yd, ydyn, yeV, yerg, yg, | ||
| ykat, yl, ylm, ylx, ym, ymol, yr, yrad, ys, ysr, yyr, yΩ, zA, zBa, zBq, zC, zF, zGal, | ||
| zGauss, zGy, zH, zHz, zHz2π, zJ, zK, zL, zM, zMx, zN, zOe, zP, zPa, zS, zSt, zSv, zT, | ||
| zTorr, zV, zW, zWb, zatm, zb, zbar, zcal, zcd, zdyn, zeV, zerg, zg, zkat, zl, zlm, | ||
| zlx, zm, zmol, zrad, zs, zsr, zyr, zΩ, °C, °F, Å, Ω, μA, μBa, μBq, μC, μF, μGal, | ||
| μGauss, μGy, μH, μHz, μHz2π, μJ, μK, μL, μM, μMx, μN, μOe, μP, μPa, μS, μSt, μSv, μT, | ||
| μTorr, μV, μW, μWb, μatm, μb, μbar, μcal, μcd, μdyn, μeV, μerg, μg, μkat, μl, μlm, | ||
| μlx, μm, μmol, μrad, μs, μsr, μyr, μΩ | ||
|
|
||
| # basic units | ||
| public amol, cmol, damol, dmol, Emol, fmol, Gmol, hmol, kmol, Mmol, mmol, mol, nmol, | ||
| Pmol, pmol, Tmol, Ymol, ymol, Zmol, zmol, μmol, A, aA, cA, dA, daA, EA, fA, GA, hA, | ||
| kA, MA, mA, nA, PA, pA, TA, YA, yA, ZA, zA, μA, am, angstrom, cm, dam, dm, Em, fm, | ||
| ft, Gm, hm, inch, km, m, mi, mil, Mm, mm, nm, Pm, pm, Tm, yd, Ym, ym, Zm, zm, Å, μm, | ||
| acd, alm, ccd, cd, clm, dacd, dalm, dcd, dlm, Ecd, Elm, fcd, flm, Gcd, Glm, hcd, hlm, | ||
| kcd, klm, lm, Mcd, mcd, Mlm, mlm, ncd, nlm, Pcd, pcd, Plm, plm, Tcd, Tlm, Ycd, ycd, | ||
| Ylm, ylm, Zcd, zcd, Zlm, zlm, μcd, μlm, ag, cg, dag, dg, dr, Eg, fg, g, Gg, gr, hg, | ||
| kg, lb, Mg, mg, ng, oz, Pg, pg, slug, Tg, u, Yg, yg, Zg, zg, μg, aK, cK, daK, dK, EK, | ||
| fK, GK, hK, K, kK, MK, mK, nK, PK, pK, Ra, TK, YK, yK, ZK, zK, °C, °F, μK, as, ayr, | ||
| cs, cyr, d, das, dayr, ds, dyr, Es, Eyr, fs, fyr, Gs, Gyr, hr, hs, hyr, ks, kyr, | ||
| minute, Ms, ms, Myr, myr, ns, nyr, Ps, ps, Pyr, pyr, s, Ts, Tyr, wk, yr, Ys, ys, Yyr, | ||
| yyr, Zs, zs, Zyr, zyr, μs, μyr | ||
|
|
||
| # compound units | ||
| public aGal, cGal, daGal, dGal, EGal, fGal, Gal, ge, GGal, hGal, kGal, MGal, mGal, nGal, | ||
| PGal, pGal, TGal, YGal, yGal, ZGal, zGal, μGal, a, ab, ac, b, cb, dab, db, Eb, fb, | ||
| Gb, ha, hb, kb, Mb, mb, nb, Pb, pb, Tb, Yb, yb, Zb, zb, μb, aGauss, aT, cGauss, cT, | ||
| daGauss, daT, dGauss, dT, EGauss, ET, fGauss, fT, Gauss, GGauss, GT, hGauss, hT, | ||
| kGauss, kT, MGauss, mGauss, MT, mT, nGauss, nT, PGauss, pGauss, PT, pT, T, TGauss, | ||
| TT, YGauss, yGauss, YT, yT, ZGauss, zGauss, ZT, zT, μGauss, μT, aF, cF, daF, dF, EF, | ||
| F, fF, GF, hF, kF, MF, mF, nF, PF, pF, TF, YF, yF, ZF, zF, μF, aC, C, cC, daC, dC, | ||
| EC, fC, GC, hC, kC, MC, mC, nC, PC, pC, TC, YC, yC, ZC, zC, μC, aP, cP, daP, dP, EP, | ||
| fP, GP, hP, kP, MP, mP, nP, P, PP, pP, TP, YP, yP, ZP, zP, μP, aS, cS, daS, dS, ES, | ||
| fS, GS, hS, kS, MS, mS, nS, PS, pS, S, TS, YS, yS, ZS, zS, μS, aΩ, cΩ, daΩ, dΩ, EΩ, | ||
| fΩ, GΩ, hΩ, kΩ, MΩ, mΩ, nΩ, PΩ, pΩ, TΩ, YΩ, yΩ, ZΩ, zΩ, μΩ, Ω, acal, aerg, aeV, aJ, | ||
| btu, cal, ccal, cerg, ceV, cJ, dacal, daerg, daeV, daJ, dcal, derg, deV, dJ, Ecal, | ||
| Eerg, EeV, EJ, erg, eV, fcal, ferg, feV, fJ, Gcal, Gerg, GeV, GJ, hcal, herg, heV, | ||
| hJ, J, kcal, kerg, keV, kJ, Mcal, mcal, Merg, merg, MeV, meV, MJ, mJ, ncal, nerg, | ||
| neV, nJ, Pcal, pcal, Perg, perg, PeV, peV, PJ, pJ, Tcal, Terg, TeV, TJ, Ycal, ycal, | ||
| Yerg, yerg, YeV, yeV, YJ, yJ, Zcal, zcal, Zerg, zerg, ZeV, zeV, ZJ, zJ, μcal, μerg, | ||
| μeV, μJ, adyn, aN, cdyn, cN, dadyn, daN, ddyn, dN, dyn, Edyn, EN, fdyn, fN, Gdyn, GN, | ||
| hdyn, hN, kdyn, kN, lbf, Mdyn, mdyn, MN, mN, N, ndyn, nN, Pdyn, pdyn, PN, pN, Tdyn, | ||
| TN, Ydyn, ydyn, YN, yN, Zdyn, zdyn, ZN, zN, μdyn, μN, aBq, aHz, aHz2π, Bq, cBq, cHz, | ||
| cHz2π, daBq, daHz, daHz2π, dBq, dHz, dHz2π, EBq, EHz, EHz2π, fBq, fHz, fHz2π, GBq, | ||
| GHz, GHz2π, hBq, hHz, hHz2π, Hz, Hz2π, kBq, kHz, kHz2π, MBq, mBq, MHz, mHz, MHz2π, | ||
| mHz2π, nBq, nHz, nHz2π, PBq, pBq, PHz, pHz, PHz2π, pHz2π, rpm, rps, TBq, THz, THz2π, | ||
| YBq, yBq, YHz, yHz, YHz2π, yHz2π, ZBq, zBq, ZHz, zHz, ZHz2π, zHz2π, μBq, μHz, μHz2π, | ||
| aOe, cOe, daOe, dOe, EOe, fOe, GOe, hOe, kOe, MOe, mOe, nOe, Oe, POe, pOe, TOe, YOe, | ||
| yOe, ZOe, zOe, μOe, aH, cH, daH, dH, EH, fH, GH, H, hH, kH, MH, mH, nH, PH, pH, TH, | ||
| YH, yH, ZH, zH, μH, aSt, cSt, daSt, dSt, ESt, fSt, GSt, hSt, kSt, MSt, mSt, nSt, PSt, | ||
| pSt, St, TSt, YSt, ySt, ZSt, zSt, μSt, aMx, aWb, cMx, cWb, daMx, daWb, dMx, dWb, EMx, | ||
| EWb, fMx, fWb, GMx, GWb, hMx, hWb, kMx, kWb, MMx, mMx, MWb, mWb, Mx, nMx, nWb, PMx, | ||
| pMx, PWb, pWb, TMx, TWb, Wb, YMx, yMx, YWb, yWb, ZMx, zMx, ZWb, zWb, μMx, μWb, akat, | ||
| ckat, dakat, dkat, Ekat, fkat, Gkat, hkat, kat, kkat, Mkat, mkat, nkat, Pkat, pkat, | ||
| Tkat, Ykat, ykat, Zkat, zkat, μkat, aM, cM, daM, dM, EM, fM, GM, hM, kM, M, MM, mM, | ||
| nM, PM, pM, TM, YM, yM, ZM, zM, μM, aW, cW, daW, dW, EW, fW, GW, hW, kW, MW, mW, nW, | ||
| PW, pW, TW, W, YW, yW, ZW, zW, μW, aatm, aBa, abar, aPa, atm, aTorr, Ba, bar, catm, | ||
| cBa, cbar, cPa, cTorr, daatm, daBa, dabar, daPa, datm, daTorr, dBa, dbar, dPa, dTorr, | ||
| Eatm, EBa, Ebar, EPa, ETorr, fatm, fBa, fbar, fPa, fTorr, Gatm, GBa, Gbar, GPa, | ||
| GTorr, hatm, hBa, hbar, hPa, hTorr, katm, kBa, kbar, kPa, kTorr, Matm, matm, MBa, | ||
| mBa, Mbar, mbar, MPa, mPa, MTorr, mTorr, natm, nBa, nbar, nPa, nTorr, Pa, Patm, patm, | ||
| PBa, pBa, Pbar, pbar, PPa, pPa, psi, PTorr, pTorr, Tatm, TBa, Tbar, Torr, TPa, TTorr, | ||
| Yatm, yatm, YBa, yBa, Ybar, ybar, YPa, yPa, YTorr, yTorr, Zatm, zatm, ZBa, zBa, Zbar, | ||
| zbar, ZPa, zPa, ZTorr, zTorr, μatm, μBa, μbar, μPa, μTorr, c, aV, cV, daV, dV, EV, | ||
| fV, GV, hV, kV, MV, mV, nV, PV, pV, TV, V, YV, yV, ZV, zV, μV, aL, al, cL, cl, daL, | ||
| dal, dL, dl, EL, El, fL, fl, GL, Gl, hL, hl, kL, kl, L, l, ML, Ml, mL, ml, nL, nl, | ||
| PL, Pl, pL, pl, TL, Tl, YL, Yl, yL, yl, ZL, Zl, zL, zl, μL, μl | ||
|
|
||
| # dim abbreviations | ||
| public 𝐈, 𝐉, 𝐋, 𝐌, 𝐍, 𝐓, 𝚯 | ||
|
|
||
| # quantities | ||
| public AbsoluteScaleTemperature, RelativeScaleTemperature | ||
|
|
||
| # unit types | ||
| public AccelerationFreeUnits, AccelerationUnits, ActionFreeUnits, ActionUnits, | ||
| AffineUnits, AmountFreeUnits, AmountUnits, AreaFreeUnits, AreaUnits, BFieldFreeUnits, | ||
| BFieldUnits, CapacitanceFreeUnits, CapacitanceUnits, ChargeFreeUnits, ChargeUnits, | ||
| ContextUnits, CurrentFreeUnits, CurrentUnits, DFieldFreeUnits, DFieldUnits, | ||
| DensityFreeUnits, DensityUnits, DimensionlessUnits, DynamicViscosityFreeUnits, | ||
| DynamicViscosityUnits, EFieldFreeUnits, EFieldUnits, ElectricDipoleMomentFreeUnits, | ||
| ElectricDipoleMomentUnits, ElectricQuadrupoleMomentFreeUnits, | ||
| ElectricQuadrupoleMomentUnits, ElectricalConductanceFreeUnits, | ||
| ElectricalConductanceUnits, ElectricalConductivityFreeUnits, | ||
| ElectricalConductivityUnits, ElectricalResistanceFreeUnits, | ||
| ElectricalResistanceUnits, ElectricalResistivityFreeUnits, | ||
| ElectricalResistivityUnits, EnergyFreeUnits, EnergyUnits, FixedUnits, ForceFreeUnits, | ||
| ForceUnits, FreeOrContextUnits, FreeUnits, FrequencyFreeUnits, FrequencyUnits, | ||
| HFieldFreeUnits, HFieldUnits, InductanceFreeUnits, InductanceUnits, | ||
| KinematicViscosityFreeUnits, KinematicViscosityUnits, LengthFreeUnits, LengthUnits, | ||
| LuminosityFreeUnits, LuminosityUnits, MagneticDipoleMomentFreeUnits, | ||
| MagneticDipoleMomentUnits, MagneticFluxFreeUnits, MagneticFluxUnits, | ||
| MassFlowFreeUnits, MassFlowUnits, MassFreeUnits, MassUnits, MolalityFreeUnits, | ||
| MolalityUnits, MolarFlowFreeUnits, MolarFlowUnits, MolarMassFreeUnits, | ||
| MolarMassUnits, MolarityFreeUnits, MolarityUnits, MomentumFreeUnits, MomentumUnits, | ||
| PowerFreeUnits, PowerUnits, PressureFreeUnits, PressureUnits, ScalarUnits, | ||
| TemperatureFreeUnits, TemperatureUnits, TimeFreeUnits, TimeUnits, Units, | ||
| VelocityFreeUnits, | ||
| VelocityUnits, VoltageFreeUnits, VoltageUnits, | ||
| VolumeFlowFreeUnits, VolumeFlowUnits, VolumeFreeUnits, VolumeUnits, | ||
| WavenumberFreeUnits, WavenumberUnits | ||
|
|
||
| # log units | ||
| public B, B_p, B_rp, Np, Np_p, Np_rp, cNp, cNp_p, cNp_rp, dB, dBFS, dBHz, dBS, dBSPL, | ||
| dBV, dB_p, dB_rp, dBm, dBu, dBΩ, dBμV | ||
|
|
||
| # abstract types | ||
| public AbstractQuantity, AffineQuantity, BracketStyle, LogScaled, ScalarQuantity, | ||
| Unitlike | ||
|
|
||
| # concrete types | ||
| public Affine, AffineError, Bel, Centineper, Decibel, Dimension, DimensionError, | ||
| Dimensions, IsRootPowerRatio, LogInfo, MixedUnits, Neper, NoBrackets, PowerRatio, | ||
| RealOrRealQuantity, ReferenceQuantity, RootPowerRatio, RoundBrackets, SquareBrackets, | ||
| Unit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.juliaextension instead of.jl?@unit/@dimension/@derived_dimensionto make the symbol public looks a much more sustainable solution going forwardThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, and would look into a macro solution.
Independent on that: Before I continue, I'd prefer to know whether the the variables sorting into private and public, as currently implemented in
public.juliais OK, or needs any changes.May I ask the maintainers to have a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would declare the following as public:
@dimension/@derived_dimension,AbstractQuantity,@refunit/@unit, but some, likehaandÅ, will have to be treated manually). For@affineunit, adding an extra argument to the macro has less of an advantage, since it only defines one symbol, but it could be done just to be consistent with@refunit/@unit.Those are all the symbols I would declare public right now. Others can be added later.
I’m not sure about the logarithmic units. I wouldn’t declare them public for now, since I consider them broken in a way that cannot be fixed without major (and breaking) changes, but on the other hand, they can be accesssed through
u"…"and are widely used (I think).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sostock On log units: They are intended for the package user, not for some internal purposes. Therefore IMO they should be declared public, too. I'd suggest adding a warning to the docstrings about their experimental nature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another question:
@dimensionreturns the dimension,@unitreturns the unit, whereas@derived_dimensionreturnsnothing. If that is intended, what's the reason? Otherwise I'd change@derived_dimensionto return the dimension, tooThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dimension 𝐋 "𝐋" Length truereturnsUnitful.𝐋(notUnitful.Length), so if@derived_dimension Area 𝐋^2 truereturned something, it should return𝐋^2, anything else would be inconsistent. But the value𝐋^2is not bound to any symbol by the macro, so I can see why there is no use in returning it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sostock
Each
@dimensiondefines four bindings, eg. forLenthwe create and declare as public𝐋, Length, LengthUnits, LengthFreeUnits. My current macro implementation makes all them public - but I'm not sure it is what you meant, or was it just the first two of them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s what I would do as well.