documentation: updating based on new structure.

This commit is contained in:
Jeff MacKinnon 2026-02-18 14:17:01 -04:00
parent f893955616
commit 9f3d2cf4fa
13 changed files with 158 additions and 31 deletions

5
.gitignore vendored
View file

@ -1,7 +1,6 @@
# Python-generated files # Python-generated files
__pycache__/ __pycache__/
*.py[oc] *.py[oc]
build/
dist/ dist/
wheels/ wheels/
*.egg-info *.egg-info
@ -14,6 +13,10 @@ wheels/
uv.lock uv.lock
.python-version .python-version
# docs folders
docs/build/
# MacOS things # MacOS things
.DS_Store* .DS_Store*

View file

@ -0,0 +1,13 @@
Circuit Functions
================================
.. toctree::
:maxdepth: 2
:caption: Contents:
.. automodule:: jmktools.circuits
:members:

View file

@ -3,17 +3,26 @@
# For the full list of built-in configuration values, see the documentation: # For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html # https://www.sphinx-doc.org/en/master/usage/configuration.html
# Configure autodoc
import os
import sys
sys.path.insert(0, os.path.abspath('../src/jmktools/'))
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'JMK Engineering Python Library' project = 'JMK Engineering Python Tools'
copyright = '2025, Jeff MacKinnon' copyright = '2025, Jeff MacKinnon'
author = 'Jeff MacKinnon' author = 'Jeff MacKinnon'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [] extensions = ['sphinx.ext.autodoc',]
templates_path = ['_templates'] templates_path = ['_templates']
exclude_patterns = [] exclude_patterns = []
@ -23,5 +32,13 @@ exclude_patterns = []
# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'alabaster' html_theme = "sphinx_book_theme"
html_static_path = ['_static'] html_static_path = ['_static']
html_title = "JMK Engineering Python Tools Documentation"
html_theme_options = {
"repository_url": "https://git.jmkengineering.com/JMK_Engineering_Inc/JMKTools",
"repository_provider": "github",
"use_repository_button": True,
}

View file

@ -1,4 +1,4 @@
JEPL General Functions General Functions
================================ ================================
@ -7,3 +7,6 @@ JEPL General Functions
:caption: Contents: :caption: Contents:
va va
.. automodule:: jmktools.general
:members:

View file

@ -4,7 +4,7 @@ va - Volt-Amps
.. function:: va(voltage, current, phases=3) .. function:: va(voltage, current, phases=3)
:module: JEPL.general :module: src.jmktools.general
:param voltage: The voltage of the circuit :param voltage: The voltage of the circuit
:type voltage: float :type voltage: float
:param current: The current of the circuit :param current: The current of the circuit

View file

@ -0,0 +1,10 @@
Grounding Functions
================================
.. toctree::
:maxdepth: 2
:caption: Contents:
.. automodule:: jmktools.grounding
:members:

View file

@ -3,17 +3,21 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
JMK Engineering Python Library documentation JMK Engineering Python Tools Documentation
============================================ ============================================
Add your content using ``reStructuredText`` syntax. See the This site is the official documentation for `jmktools <https://git.jmkengineering.com/JMK_Engineering_Inc/JMKTools>`_.
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
documentation for details.
The package is broken into various modules to keep the functions "clean". Currently they are
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 1
:caption: Contents: :caption: Contents:
installation
general/index general/index
pvsolar/index
circuits/index
grounding/index

View file

@ -0,0 +1,12 @@
Installation
==============
The project releases, complete with release details are found on the `JMK Engineering git site <https://git.jmkengineering.com/JMK_Engineering_Inc/JMKTools/releases>`_. We are also including pypi installable releases `here <https://pypi.org/project/jmktools/>`_.
To install use ``pip install jmktools``. We recommend using `uv <https://docs.astral.sh/uv/>`_ for managing python projects.
Once you have it installed you would use:
``uv init``
``uv add jmktools``

View file

@ -0,0 +1,18 @@
PV Solar Functions
================================
.. toctree::
:maxdepth: 2
:caption: Contents:
voc
.. automodule:: jmktools.pvsolar
:members:

View file

@ -0,0 +1,40 @@
PV Voc Functions
================================
When designing the strings for a PV solar system, the string voltage shall never be higher than the input voltage of the inverter or storage controller. PV panels nameplate voltage is typically shown at the standard testing condition (STC) temperature of 25C. As the outside temperature drops, the open-circuit voltage of the panel will increase.
To ensure that this voltage doesn't over-voltage the connected equipment, we need to use the minimum site temperature, and the :math:`\beta` of the panel. We will assume that it is -0.5 unless you pass a different value.
Temp Adjusted Voc
--------------------
.. function:: temp_adj_Voc(Voc,temp,beta=-0.5,STCtemp = 25)
:no-index:
:module: src.jmktools.pvsolar
:param Voc: The open-circuit voltage of the PV Panel
:type Voc: float
:param temp: The minimum temperature that the panel will be operating.
:type temp: float
:returns: Adjusted Voc in volts
:rtype: float
The Voc of a panel will increase as the temperature decreases.
The datasheet Voc is typically at STC, or 25C. As the temperature decreases this Voc needs to be adjusted.
This adjustment is linear based on the beta value with the units %/C.
This beta value will be shown as a negative indicating that as the temperature increases, then the Voc will decrease.
This Voc decrease results in derating of power during temperature above 25C.
Voc = The STC panel open circuit voltage
temp = The min or max temperature for the PV plant.
beta = The panel temperature coefficient. default -0.5%/C, typical values will range from -0.2 to -0.45.
The adjusted Voc is Voc minus the voltage shift. When the outside temperature is above the STC value then the Vocadj will be lower.

View file

@ -19,3 +19,9 @@ jmktools = "jmktools:main"
[build-system] [build-system]
requires = ["uv_build>=0.10.0,<0.11.0"] requires = ["uv_build>=0.10.0,<0.11.0"]
build-backend = "uv_build" build-backend = "uv_build"
[dependency-groups]
docs = [
"sphinx>=9.1.0",
"sphinx-book-theme>=1.1.4",
]

View file

@ -228,26 +228,27 @@ cec24table6C = [
] ]
# TODO - Add tables 6D thru 6K # TODO - Add tables 6D thru 6K
# Table 9A/B Internal diameter and cross-sectional areas of various trade conduit and tubing
# Only using the internal diameter (ID) for each of these conduits, along with the trade size. This will be used to calculate the area and fill for the various limits per Table 8
''' '''
rmc = rigid metal conduit Table 9A/B Internal diameter and cross-sectional areas of various trade conduit and tubing
fmc = flexible metal conduit
rpvc = rigid PVC Only using the internal diameter (ID) for each of these conduits, along with the trade size. This will be used to calculate the area and fill for the various limits per Table 8
db2 = rigid Type EB1 PVC and rigid type DB2/ES2 PVC conduit
mlt = metallic liquid tight, flexible conduit - rmc = rigid metal conduit
nmlt = non-metallic liquid tight conduit - fmc = flexible metal conduit
emt = electrical metallic tubing - rpvc = rigid PVC
ent = electrical non-metallic tubing - db2 = rigid Type EB1 PVC and rigid type DB2/ES2 PVC conduit
rtrcips = rigid RTRC conduit marked IPS - mlt = metallic liquid tight, flexible conduit
rtrcid = rigid RTRC conduit marked ID - nmlt = non-metallic liquid tight conduit
sch40 = HDPE conduit schedule 40 - emt = electrical metallic tubing
sch80 = HDPE conduit schedule 80 - ent = electrical non-metallic tubing
dr9 = HDPE DR9 conduit - rtrcips = rigid RTRC conduit marked IPS
dr11 = HDPE DR11 conduit - rtrcid = rigid RTRC conduit marked ID
dr13 = HDPE DR13.5 conduit - sch40 = HDPE conduit schedule 40
dr15 = HDPE DR15.5 conduit - sch80 = HDPE conduit schedule 80
- dr9 = HDPE DR9 conduit
- dr11 = HDPE DR11 conduit
- dr13 = HDPE DR13.5 conduit
- dr15 = HDPE DR15.5 conduit
''' '''
cec24table9AB = [ cec24table9AB = [
['size','RMC', 'FMC', 'RPVC', 'DB2', 'LTMC', 'LTNMC','EMT', 'ENT', 'RTRCIPS', 'RTRCID', 'SCH40', 'SCH80', 'DR9','DR11', 'DR13', 'DR15'], ['size','RMC', 'FMC', 'RPVC', 'DB2', 'LTMC', 'LTNMC','EMT', 'ENT', 'RTRCIPS', 'RTRCID', 'SCH40', 'SCH80', 'DR9','DR11', 'DR13', 'DR15'],

View file

@ -5,7 +5,7 @@ by: Jeff MacKinnon
email: jeff@jmkengineering.com email: jeff@jmkengineering.com
Some General Functions and things Some General Functions and things
----------------------------------
''' '''
import pandas as pd import pandas as pd
import numpy as np import numpy as np