engineerjoe440 / ElectricPy

Electrical Engineering Formulas in Python
https://electricpy.readthedocs.io/en/latest/
MIT License
86 stars 16 forks source link

Typerror when importing phasor module as in the documentation example #108

Closed Mogit21 closed 1 year ago

Mogit21 commented 1 year ago

The import in the step 3 of the "Installing / Getting Started" in the documentation is not working as expected

# Setup
import electricpy as ep
voltage = ep.phasor(67, 120)
#print(voltage)

# Code which causes failure
voltage = ep.phasor(67, 120)

Expected behavior Printing the following: (-33.499999999999986+58.02370205355739j)

image

Desktop (please complete the following information):

Additional context If I import it as follows it works and prints the complex representation of voltage value correctly:

import electricpy as ep
voltage = ep.phasor.phasor(67, 120)
print(voltage)

image

I've installed electricpy using pip, and I did use pip install --upgrade electricpy to make sure I have the updated version

Mogit21 commented 1 year ago

At this point, I'm not sure whether I'm using an old version of electricpy, or if there is a typo in the documentation. In case of a typo in the documentation's example, please let me know, I will be glad to create my first pull request in this project.

engineerjoe440 commented 1 year ago

Ah, yes... this does look like an issue in the documentation. But it raises a good point that none of the examples are being tested. For some strange reason, I thought this was already happening... :laughing:

Oh well! I'm getting a bit of work done to get that resolved and tidy this up. :wink:

engineerjoe440 commented 1 year ago

I've been holding off on a release for FAR too long. I'm going to slot this in, along with some other tidying up and general improvements, and get that released!