Adds setup.py
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,7 +1,9 @@
|
|||||||
*.pyc
|
build/
|
||||||
.vscode
|
.vscode
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
|
*.pyc
|
||||||
|
*.so
|
||||||
*.c
|
*.c
|
||||||
|
|
||||||
*.so
|
yoshi_seals.egg-info/
|
||||||
|
|||||||
35
setup.py
Normal file
35
setup.py
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import setuptools
|
||||||
|
import os
|
||||||
|
|
||||||
|
__name = "yoshi_seals"
|
||||||
|
|
||||||
|
__version_sufix = os.environ.get('VERSION_SUFIX')
|
||||||
|
if not __version_sufix:
|
||||||
|
__version_sufix = "dev"
|
||||||
|
|
||||||
|
__version = f"2.0.{__version_sufix}"
|
||||||
|
|
||||||
|
with open("README.md", "r") as fh:
|
||||||
|
long_description = fh.read()
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
name=__name,
|
||||||
|
version=__version,
|
||||||
|
author="Vitor Hideyoshi",
|
||||||
|
author_email="vitor.h.n.batista@gmail.com",
|
||||||
|
description="Numeric Calculus python module in the topic of Linear Algebra",
|
||||||
|
long_description=long_description,
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
url="https://github.com/HideyoshiNakazone/Seals-NumericCalculus.git",
|
||||||
|
packages=setuptools.find_packages(),
|
||||||
|
classifiers=[
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
||||||
|
"Operating System :: OS Independent"
|
||||||
|
],
|
||||||
|
python_requires='>=3.6',
|
||||||
|
install_requires=[
|
||||||
|
'numpy',
|
||||||
|
'pandas',
|
||||||
|
],
|
||||||
|
)
|
||||||
@@ -54,13 +54,13 @@ class TestProcess(unittest.TestCase):
|
|||||||
ps.vstack(a, b)
|
ps.vstack(a, b)
|
||||||
|
|
||||||
def test_gauss(self):
|
def test_gauss(self):
|
||||||
a = np.array(([4., 3.], [3., 2.]))
|
a = np.array(([4., 10., 8.], [10., 26., 26], [8., 26., 61.]))
|
||||||
b = np.array(([1.], [1.]))
|
b = np.array(([44.], [128.], [214.]))
|
||||||
|
|
||||||
matrix = ps.gauss(a, b)
|
matrix = ps.gauss(a, b)
|
||||||
expected_matrix = np.array([[1.], [-1.]])
|
expected_matrix = np.array([[-8.], [6.], [2.]])
|
||||||
|
|
||||||
npt.assert_array_equal(matrix, expected_matrix)
|
npt.assert_almost_equal(matrix, expected_matrix)
|
||||||
|
|
||||||
def test_cholesky(self):
|
def test_cholesky(self):
|
||||||
a = np.array(([4., 10., 8.], [10., 26., 26], [8., 26., 61.]))
|
a = np.array(([4., 10., 8.], [10., 26., 26], [8., 26., 61.]))
|
||||||
@@ -72,19 +72,19 @@ class TestProcess(unittest.TestCase):
|
|||||||
npt.assert_almost_equal(matrix, expected_matrix)
|
npt.assert_almost_equal(matrix, expected_matrix)
|
||||||
|
|
||||||
def test_decomposition(self):
|
def test_decomposition(self):
|
||||||
a = np.array(([4., 3.], [3., 2.]))
|
a = np.array(([4., 10., 8.], [10., 26., 26], [8., 26., 61.]))
|
||||||
b = np.array(([1.], [1.]))
|
b = np.array(([44.], [128.], [214.]))
|
||||||
|
|
||||||
matrix = ps.decomposition(a, b)
|
matrix = ps.decomposition(a, b)
|
||||||
expected_matrix = np.array([[1.], [-1.]])
|
expected_matrix = np.array([[-8.], [6.], [2.]])
|
||||||
|
|
||||||
npt.assert_array_equal(matrix, expected_matrix)
|
npt.assert_almost_equal(matrix, expected_matrix)
|
||||||
|
|
||||||
def test_cramer(self):
|
def test_cramer(self):
|
||||||
a = np.array(([4., 3.], [3., 2.]))
|
a = np.array(([4., 10., 8.], [10., 26., 26], [8., 26., 61.]))
|
||||||
b = np.array(([1.], [1.]))
|
b = np.array(([44.], [128.], [214.]))
|
||||||
|
|
||||||
matrix = ps.cramer(a, b)
|
matrix = ps.cramer(a, b)
|
||||||
expected_matrix = np.array([[1.], [-1.]])
|
expected_matrix = np.array([[-8.], [6.], [2.]])
|
||||||
|
|
||||||
npt.assert_array_equal(matrix, expected_matrix)
|
npt.assert_almost_equal(matrix, expected_matrix)
|
||||||
|
|||||||
Reference in New Issue
Block a user