Skip to content

Commit

Permalink
ohmslaw 1.0.0 Released
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanBindez committed Jun 15, 2024
1 parent 4e3fa87 commit 21e929e
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 50 deletions.
54 changes: 36 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,61 @@ from ohmslaw import Ohms
### current multiplied by resistance = voltage

```python

o = Ohms()
results = o.volts(2, 4)

print(results)
>>> o = Ohms()
>>> results = o.volts(I=12, R=4)
>>>
>>> print(results)
48
>>>

```

### voltage Divided by resistance = current

```python

o = Ohms()
results = o.current(12, 4)

print(results)

>>> o = Ohms()
>>> results = o.current(V=12, R=4)
>>>
>>> print(results)
3.0
>>>
```

### voltage divided by current = resistance

```python
>>> o = Ohms()
>>> results = o.resistance(V=48, I=4)
>>>
>>> print(results)
12.0
>>>

o = Ohms()
results = o.resistance(48, 4)
```

### Watts

print(results)
```python
>>> o = Ohms()
>>> results = o.watts(I=2, R=15)
>>>
>>> print(results)
60
>>>

```

### find the resistance value to limit the electrical voltage of a circuit

```python

o = Ohms()
results = o.find_resistor(source=48, component_voltage=12)# Led

print(results)
>>> o = Ohms()
>>> results = o.find_resistor(source=48,
... component_voltage=12,
... component_current=1)
>>>
>>> print(results)
36.0
>>>

```
4 changes: 2 additions & 2 deletions build.rocketfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
git add .
git commit -m 'update'
git commit -m 'ohmslaw 1.0.0 Released'
git push -u origin main
git tag v1.0-rc13
git tag v1.0.0
git push --tag
make clean
make upload
6 changes: 2 additions & 4 deletions docs/user/current.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ Current:

**returns the electrical current:**::

>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>> results = o.current(12, 4)
>>> results = o.current(V=12, R=4)
>>>
>>> print(results)
3.0

>>>
8 changes: 4 additions & 4 deletions docs/user/find_resistor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Find Resistor:

**find the resistance value to limit the electrical voltage of a circuit:**::

>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>> results = o.find_resistor(source=48, component_voltage=12)# Led
>>> results = o.find_resistor(source=48,
... component_voltage=12,
... component_current=1)
>>>
>>> print(results)
1800.0
36.0
>>>
4 changes: 2 additions & 2 deletions docs/user/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Quickstart:
>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>> results = o.resistance(48, 4)
>>> results = o.resistance(V=48, I=4)
>>>
>>> print(results)
12.0
Expand All @@ -24,7 +24,7 @@ Quickstart:
>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>> results = o.current(12, 4)
>>> results = o.current(V=12, R=4)
>>>
>>> print(results)
3.0
4 changes: 1 addition & 3 deletions docs/user/resistance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ Resistance:

**calculate resistance in ohms:**::

>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>> results = o.resistance(48, 4)
>>> results = o.resistance(V=48, I=4)
>>>
>>> print(results)
12.0
Expand Down
6 changes: 1 addition & 5 deletions docs/user/volts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ volts:

**calculate volts using ohms law:**::

>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>> results = o.volts(12, 4)
>>>
>>> results = o.volts(I=12, R=4)
>>>
>>> print(results)
48
>>>


7 changes: 3 additions & 4 deletions docs/user/watts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ watts

**calculate power in watts:**::

>>> from ohmslaw import Ohms
>>>
>>> o = Ohms()
>>> results = o.watts(2, 15)
>>> results = o.watts(I=2, R=15)
>>>
>>> print(results)
60

>>>
6 changes: 0 additions & 6 deletions main.py

This file was deleted.

2 changes: 1 addition & 1 deletion ohmslaw/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0-rc13"
__version__ = "1.0.0"

if __name__ == "__main__":
print(__version__)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ohmslaw"
version = "1.0-rc13"
version = "1.0.0"
authors = [
{ name="Juan Bindez", email="juanbindez780@gmail.com" },
]
Expand Down

0 comments on commit 21e929e

Please sign in to comment.