diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 905296d..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include LICENSE -include README.md -recursive-include docs * diff --git a/README.md b/README.md index 0becf2d..f5cda20 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ -# JEPL +# JMK Engineering Python Library -JMK Engineering Python Library \ No newline at end of file +or JEPL for short. + +I don't know if this should be called a library or a set of modules. What it is, is a set of functions that replace calculations that I do on a weekly basis. + +The library is broken into sections, with more being added later, including circuits and pv. + +Some of these libraries rely on publicly accessible information, including manufacturer data sheets. The libraries that rely on copyrighted information you need to make sure that you have a copy of the standard, code, etc before initializing the software. + +Use the example python notebook to get started. + +## What we're missing + +Tests, I haven't written any real tests for this set of libraries, yet. That will be coming soon, probably the next time that we have a slow time. \ No newline at end of file diff --git a/jepl/init.ipynb b/jepl/init.ipynb deleted file mode 100644 index dcbfab5..0000000 --- a/jepl/init.ipynb +++ /dev/null @@ -1,86 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd\n", - "\n", - "import sqlite3\n", - "\n", - "def insert(database,table,data):\n", - " '''\n", - " This function creates a database from the current \n", - " source data to be used in the modules.\n", - "\n", - " Running this function will replace any data that is already in the database.\n", - " '''\n", - "\n", - " conn = sqlite3.connect(database) \n", - " data.to_sql(table, conn, if_exists='replace', index=False) \n", - " conn.close()\n", - "\n", - "def create_database(name,tables): \n", - " '''\n", - " This function loops over the source data lists to create tables in the database.\n", - " '''\n", - " \n", - " for i in range(len(tables)):\n", - " db = tables[i][0]\n", - " table = tables[i][1]\n", - " source = tables[i][2]\n", - " data = pd.read_csv(source)\n", - "\n", - " insert(db,table,data) # Call the database insert function to add the data\n", - "\n", - "\n", - "'''\n", - " This is all the tables and their sources that will be added to the databases.\n", - "\n", - " \n", - "'''\n", - "\n", - "db_name = 'jepl-cec21.db'\n", - "CEC21_database = [\n", - " [db_name,'Table1','Tables/CEC-Tables/CEC21-table1.csv'],\n", - " [db_name,'Table2','Tables/CEC-Tables/CEC21-table2.csv'],\n", - " [db_name,'Table3','Tables/CEC-Tables/CEC21-table2.csv'],\n", - " [db_name,'Table4','Tables/CEC-Tables/CEC21-table2.csv'],\n", - " ]\n", - "\n", - "create_database(db_name,CEC21_database)\n", - "\n", - "\n", - "db_name = 'jepl-cable.db'\n", - "cable_database = [\n", - " [db_name,'SW-Spec 25055','Tables/Manufacturer/SW-Spec-23055.csv'],\n", - " ]\n", - "create_database(db_name,cable_database)\n", - "\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.1" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/jepl/tables.py b/jepl/tables.py deleted file mode 100644 index 92a27cc..0000000 --- a/jepl/tables.py +++ /dev/null @@ -1,168 +0,0 @@ -import pandas as pd -import sqlite3 - - - -''' - The purpose of this file is to create the database(s) needed for the project. - - There are two databases that are created, the first is public information and the other is copyrighted. - - If you don't own the code version listed you can't use this portion of the library. - -''' - - - -CEC21_table1 = pd.DataFrame([ - ['14',25,30,35], - ['12',30,35,40], - ['10',40,50,55], - ['8',60,70,80], - ['6',80,95,105], - ['4',105,125,140], - ['3',120,145,165], - ['2',140,170,190], - ['1',165,195,220], - ['0',195,230,260], - ['00',220,265,300], - ['000',260,310,350], - ['0000',300,360,405], - ['250',340,405,455], - ['300',370,445,500], - ['350',425,505,570], - ['400',455,545,615], - ['500',520,620,700], - ['600',580,690,780], - ['700',630,755,850], - ['750',655,785,885], - ['800',680,815,920], - ['1000',785,870,980], - ['1250',890,1065,1200], - ['1500',985,1175,1325], - ['1750',1070,1280,1445], - ['2000',1160,1385,1560] - ], - columns = ['size','60','75','90'] - ) - -CEC21_table2 = pd.DataFrame([ - ['14',15,20,25], - ['12',20,25,30], - ['10',30,35,40], - ['8',40,50,55], - ['6',40,50,55], - ['4',70,85,95], - ['3',85,100,115], - ['2',95,115,130], - ['1',110,130,145], - ['0',125,150,170], - ['00',145,175,195], - ['000',165,200,225], - ['0000',195,230,260], - ['250',215,255,290], - ['300',240,285,320], - ['350',260,310,350], - ['400', 280,335,380], - ['500',320,380,430], - ['600',350,420,475], - ['700',385,460,520], - ['750',400,475,535], - ['800',410,490,555], - ['900',435,520,585], - ['1000',455,545,615], - ['1250',495,590,615], - ['1500',525,625,705], - ['1750',545,650,735], - ['2000',555,665,750] - ], - columns = ['size','60','75','90'] - ) - -CEC21_table3 = pd.DataFrame([ - ['12',25,30,35], - ['10',35,40,45], - ['8',45,55,60], - ['4',65,75,85], - ['3',95,115,130], - ['2',115,135,150], - ['1',1340,155,175], - ['0',150,180,205], - ['00',175,210,235], - ['000',200,240,270], - ['0000',235,280,315], - ['250',265,315,355], - ['300',295,350,395], - ['350',330,395,445], - ['400',355,425,480], - ['500',405,485,545], - ['600',455,545,615], - ['700',500,595,670], - ['750',520,620,700], - ['800',540,645,725], - ['900',585,700,790], - ['1000',630,750,845], - ['1250',715,855,965], - ['1500',795,950,1070], - ['1750',880,1050,1185], - ['2000',965,1150,1295] - ], - columns = ['size','60','75','90'] - ) - -CEC21_table4 = pd.DataFrame([ - ['12',15,20,25], - ['10',25,30,35], - ['8',35,40,45], - ['6',40,50,55], - ['4',55,65,75], - ['3',65,75,85], - ['2',75,90,100], - ['1',85,100,115], - ['0',100,120,165], - ['00',115,165,150], - ['000',160,155,175], - ['0000',150,180,205], - ['250',170,205,230], - ['300',195,230,260], - ['350',210,250,280], - ['400',225,270,305], - ['500',260,310,350], - ['600',285,340,385], - ['700',315,375,425], - ['750',320,385,435], - ['800',330,395,445], - ['900',355,425,480], - ['1000',375,445,500], - ['1250',405,485,545], - ['1500',435,520,585], - ['1750',455,545,615], - ['2000',470,560,630] - ], - columns = ['size','60','75','90'] - ) - -CEC_table1 = CEC21_table1 -CEC_table2 = CEC21_table2 -CEC_table3 = CEC21_table3 -CEC_table4 = CEC21_table4 - -# 3C TECK90 1000V Aluminum power cable -# Southwire Spec 25055 Revision 1.000.010 - -al_3C_cable_table = pd.DataFrame([ - ['6', 2.66], - ['4',1.67], - ['2',1.05], - ['1',0.83], - ['0',0.66], - ['00',0.52], - ['000',0.41], - ['0000',0.33], - ['250',0.28], - ['350',0.2], - ['500',0.14], - ['750',0.1] - ], - columns = ['size','AC Resistance'] - ) diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index c515c82..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,3 +0,0 @@ -[build-system] -requires = ['setuptools>=40.8.0'] -build-backend = 'setuptools.build_meta' \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3c60263..0000000 --- a/setup.cfg +++ /dev/null @@ -1,29 +0,0 @@ -[metadata] -name = jepl -version = 0.1 -description = A Library for Elecrical Engineeing -long_description = file: readme.md -url = https://www.jmkengineering.com -author = Jeff MacKinnon -author_email = jeff@jmkengineering.com -license = GNU-AFFERO -classifiers = - Intended Audience :: Developers - License :: GNU AFFERO - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - -[options] -include_package_data = true -packages = find: -python_requires = >=3.8 -install_requires = - Numpy - Pandas \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index fc1f76c..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup() \ No newline at end of file