Repository: connorferster/handcalcs (language: python)

Issue:
Trouble Installing Through pip
Hey Connor, 

I'm having some trouble installing handcalcs through the pip interface, and was wondering if you could give me any suggestions.

Specifically, I was able to run the install command, but only the "init" module was downloaded. In "init" there is one function, "main", which is an equation from CSA S16-14.
If it helps, I'm using python through the Anaconda distribution.

Thanks, Christian 


Discussion / hints:
Hi cslotboom,

Thank you for that heads up. It turns out I had completely made a mess of my PyPI upload. It should be fixed now in pip. Use `pip install handcalcs -U` to upgrade to the new version.

Fix patch:
diff --git a/README.md b/README.md
index a7e37eb..ccbb1d6 100644
--- a/README.md
+++ b/README.md
@@ -305,32 +305,32 @@ Subscripts in variable names are automatically created when `_` is used in the v
 
 Any variable name that contains a Greek letter (e.g. "pi", "upsilon", "eta", etc.) as a string or substring will be replaced by the appropriate Latex code to represent that Greek letter.
 
-| symbol | substitution | symbol | substitution |
-|--------|--------------|--------|--------------|
-| `alpha` |         α     | `Alpha` |       Α       |
-| `beta`  |        β      | `Beta` |        Β       |
-| `gamma` |        γ     | `Gamma` |        Γ      |
-| `delta` |       δ      | `Delta` |        Δ      |
-| `epsilon` |    ε       | `Epsilon` |      Ε      |
-| `zeta`  |     ζ        | `Zeta`  |        Ζ      |
-| `eta`  |       η       | `Eta`  |          Η     |
-| `theta`|       θ       | `Theta` |         Θ     |
-| `iota` |       ι       | `Iota` |         Ι      |
-| `kappa` |      κ       | `Kappa` |         Κ     |
-| `lamb`  |     λ        | `Lamb` |          Λ     |
-| `mu`    |     μ        | `Mu` |           Μ      |
-| `nu`    |      ν       | `Nu` |           N      |
-| `xi`    |      ξ       | `Xi` |            Ξ     |
-| `omicron` |    ο       | `Omicron` |       Ο     |
-| `pi`    |      π       | `Pi` |            Π     |
-| `rho`  |       ρ       | `Rho` |           Ρ     |
-| `sigma` |      σ       | `Sigma` |         Σ     |
-| `tau`   |      τ       | `Tau`  |          Τ     |
-| `upsilon` |    υ       | `Upsilon` |       Υ     |
-| `phi`    |     φ       | `Phi`  |          Φ     |
-| `chi`    |     χ       | `Chi`   |         Χ     |
-| `psi`   |      ψ       | `Psi`   |         Ψ     |
-| `omega` |      ω       | `Omega` |         Ω     |  
+| symbol                  | substitution | symbol | substitution |
+|-------------------------|--------------|--------|--------------|
+| `alpha`                 | α            | `Alpha` |       Α       |
+| `beta`                  | β            | `Beta` |        Β       |
+| `gamma`                 | γ            | `Gamma` |        Γ      |
+| `delta`                 | δ            | `Delta` |        Δ      |
+| `epsilon`, `varepsilon` | ϵ, ε         | `Epsilon` |      Ε      |
+| `zeta`                  | ζ            | `Zeta`  |        Ζ      |
+| `eta`                   | η            | `Eta`  |          Η     |
+| `theta`, `vartheta`     | θ, ϑ         | `Theta` |         Θ     |
+| `iota`                  | ι            | `Iota` |         Ι      |
+| `kappa`                 | κ            | `Kappa` |         Κ     |
+| `lamb`                  | λ            | `Lamb` |          Λ     |
+| `mu`                    | μ            | `Mu` |           Μ      |
+| `nu`                    | ν            | `Nu` |           N      |
+| `xi`                    | ξ            | `Xi` |            Ξ     |
+| `omicron`               | ο            | `Omicron` |       Ο     |
+| `pi`, `varpi`           | π, ϖ         | `Pi` |            Π     |
+| `rho`, `varrho`         | ρ, ϱ         | `Rho` |           Ρ     |
+| `sigma`, `varsigma`     | σ, ς         | `Sigma` |         Σ     |
+| `tau`                   | τ            | `Tau`  |          Τ     |
+| `upsilon`               | υ            | `Upsilon` |       Υ     |
+| `phi`, `varphi`         | φ, ϕ         | `Phi`  |          Φ     |
+| `chi`                   | χ            | `Chi`   |         Χ     |
+| `psi`                   | ψ            | `Psi`   |         Ψ     |
+| `omega`                 | ω            | `Omega` |         Ω     |  
 
 * Using lower case letters as your variable name will make a lower case Greek letter.
 
diff --git a/handcalcs/__init__.py b/handcalcs/__init__.py
index b68eedf..6b48c4d 100644
--- a/handcalcs/__init__.py
+++ b/handcalcs/__init__.py
@@ -14,7 +14,7 @@
 """
 Render arithmetic calucations in Jupyter as though they were written by hand.
 """
-__version__ = "1.7.0"  #
+__version__ = "1.7.1"  #
 from .decorator import handcalc
 from .global_config import set_option, save_config
 
diff --git a/handcalcs/constants.py b/handcalcs/constants.py
index 66c11c6..0d3fa08 100644
--- a/handcalcs/constants.py
+++ b/handcalcs/constants.py
@@ -4,8 +4,10 @@
     "gamma": "\\gamma",
     "delta": "\\delta",
     "epsilon": "\\epsilon",
+    "varepsilon": "\\varepsilon",
     "zeta": "\\zeta",
     "theta": "\\theta",
+    "vartheta": "\\vartheta",
     "iota": "\\iota",
     "kappa": "\\kappa",
     "mu": "\\mu",
@@ -13,11 +15,15 @@
     "xi": "\\xi",
     "omicron": "\\omicron",
     "pi": "\\pi",
+    "varpi": "\\varpi",
     "rho": "\\rho",
+    "varrho": "\\varrho",
     "sigma": "\\sigma",
+    "varsigma": "\\varsigma",
     "tau": "\\tau",
     "upsilon": "\\upsilon",
     "phi": "\\phi",
+    "varphi": "\\varphi",
     "chi": "\\chi",
     "omega": "\\omega",
     "eta": "\\eta",


Test patch:
diff --git a/test_handcalcs/cell_10.py b/test_handcalcs/cell_10.py
index cc81f66..e7f278f 100644
--- a/test_handcalcs/cell_10.py
+++ b/test_handcalcs/cell_10.py
@@ -5,4 +5,19 @@
 eta = sqrt(1 / log10(6) / log(32))
 kappa = floor(23 / 4.5)  # Last comment
 
+varepsilon = 45 + sin(34 + 2) / 2  # Comment
+epsilon = sin(log2(log(3, 9)))
+vartheta = sqrt(1 / log10(6) / log(32))
+theta = sqrt(1 / log10(6) / log(32))
+varpi = sqrt(1 / log10(6) / log(32))
+pi = sqrt(1 / log10(6) / log(32))
+varrho = sqrt(1 / log10(6) / log(32))
+rho = sqrt(1 / log10(6) / log(32))
+varsigma = sqrt(1 / log10(6) / log(32))
+sigma = sqrt(1 / log10(6) / log(32))
+varphi = sqrt(1 / log10(6) / log(32))
+phi = sqrt(1 / log10(6) / log(32))
+
+Omega = varepsilon + epsilon + vartheta + theta + varpi + pi + varrho + rho + varsigma + sigma + varphi + phi
+
 calc_results = globals()
diff --git a/test_handcalcs/test_handcalcs_file.py b/test_handcalcs/test_handcalcs_file.py
index 518fbac..da855eb 100644
--- a/test_handcalcs/test_handcalcs_file.py
+++ b/test_handcalcs/test_handcalcs_file.py
@@ -327,9 +327,8 @@ def test_integration():
     )
     assert (
         cell_10_renderer.render(config_options=config_options)
-        == "\\[\n\\begin{aligned}\n\\mu &= 45 + \\frac{ \\sin \\left( 34 + 2 \\right) }{ 2 } &= 4.450 \\times 10 ^ {1} \\; \\;\\textrm{(Comment)}\n\\\\[10pt]\n\\tau &= \\sin \\left( \\log_{2} \\left( \\log_{9} \\left( 3 \\right) \\right) \\right) &= -8.415 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\eta &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\kappa &= \\left \\lfloor \\frac{ 23 }{ 4.5 } \\right \\rfloor &= 5 \\; \\;\\textrm{(Last comment)}\n\\end{aligned}\n\\]"
+        == '\\[\n\\begin{aligned}\n\\mu &= 45 + \\frac{ \\sin \\left( 34 + 2 \\right) }{ 2 } &= 4.450 \\times 10 ^ {1} \\; \\;\\textrm{(Comment)}\n\\\\[10pt]\n\\tau &= \\sin \\left( \\log_{2} \\left( \\log_{9} \\left( 3 \\right) \\right) \\right) &= -8.415 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\eta &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\kappa &= \\left \\lfloor \\frac{ 23 }{ 4.5 } \\right \\rfloor &= 5 \\; \\;\\textrm{(Last comment)}\n\\\\[10pt]\n\\varepsilon &= 45 + \\frac{ \\sin \\left( 34 + 2 \\right) }{ 2 } &= 4.450 \\times 10 ^ {1} \\; \\;\\textrm{(Comment)}\n\\\\[10pt]\n\\epsilon &= \\sin \\left( \\log_{2} \\left( \\log_{9} \\left( 3 \\right) \\right) \\right) &= -8.415 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\vartheta &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\theta &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\varpi &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\pi &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\varrho &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\rho &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\varsigma &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\sigma &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\varphi &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\phi &= \\sqrt { \\frac{ 1 }{ \\log_{10} \\left( 6 \\right) } \\cdot \\frac{1} { \\ln \\left( 32 \\right) } } &= 6.089 \\times 10 ^ {-1}  \n\\\\[10pt]\n\\Omega &= \\varepsilon + \\epsilon + \\vartheta + \\theta + \\varpi + \\pi + \\varrho + \\rho + \\varsigma + \\sigma + \\varphi + \\phi \\\\&= 4.450 \\times 10 ^ {1} + -8.415 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} + 6.089 \\times 10 ^ {-1} \\\\&= 4.975 \\times 10 ^ {1}  \\\\[10pt]\n\\end{aligned}\n\\]'
     )
-
     assert (
         cell_11_renderer.render(config_options=config_options)
         == "\\[\n\\begin{aligned}\nF_{e_{x}} &= \\frac{ \\operatorname{euler\\ buckling\\ load} \\left( E ,\\  I_{x} ,\\  k_{x} ,\\  L \\right) }{ \\mathrm{area} }  = \\frac{ \\operatorname{euler\\ buckling\\ load} \\left( 200000.000 ,\\  300000000.000 ,\\  1.000 ,\\  3500 \\right) }{ 1000 } &= 4.500  \n\\\\[10pt]\nF_{e_{y}} &= \\frac{ \\operatorname{euler\\ buckling\\ load} \\left( E ,\\  I_{y} ,\\  k_{y} ,\\  L \\right) }{ \\mathrm{area} }  = \\frac{ \\operatorname{euler\\ buckling\\ load} \\left( 200000.000 ,\\  150000000.000 ,\\  1.000 ,\\  3500 \\right) }{ 1000 } &= 4.500  \n\\\\[10pt]\nF_{e} &= \\operatorname{min} \\left( F_{e_{x}} ,\\  F_{e_{y}} \\right)  = \\operatorname{min} \\left( 4.500 ,\\  4.500 \\right) &= 4.500  \n\\\\[10pt]\n\\lambda &= \\sqrt { \\frac{ f_{y} }{ F_{e} } }  = \\sqrt { \\frac{ 350 }{ 4.500 } } &= 8.819  \n\\\\[10pt]\nP_{r} &= \\phi \\cdot \\mathrm{area} \\cdot f_{y} \\cdot \\left( 1 + \\left( \\lambda \\right) ^{ \\left( 2 \\cdot n \\right) } \\right) ^{ \\left( \\frac{ \\left( - 1 \\right) }{ n } \\right) } \\\\&= 0.900 \\cdot 1000 \\cdot 350 \\cdot \\left( 1 + \\left( 8.819 \\right) ^{ \\left( 2 \\cdot 1.340 \\right) } \\right) ^{ \\left( \\frac{ \\left( - 1 \\right) }{ 1.340 } \\right) } \\\\&= 4041.179  \\\\[10pt]\n\\end{aligned}\n\\]"