Skip to content

Commit

Permalink
Merge pull request #16 from thomasthaddeus/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
thomasthaddeus authored May 6, 2024
2 parents 7fc3e04 + 0fd5d37 commit 65e5b96
Show file tree
Hide file tree
Showing 33 changed files with 132 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
58 changes: 57 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,66 @@ requires-python = ">=3.8"
keywords = ["data analysis", "CSV", "statistics", "data cleaning", "data visualization"]
# include = ["src/**/*.py", "docs/**/*.md"]
# exclude = ["tests/", "examples/"]
dependencies = [
"backports.tarfile==1.1.1",
"build==1.2.1",
"certifi==2024.2.2",
"charset-normalizer==3.3.2",
"click==8.1.7",
"colorama==0.4.6",
"contourpy==1.2.1",
"cycler==0.12.1",
"docutils==0.21.2",
"fonttools==4.51.0",
"greenlet==3.0.3",
"idna==3.7",
"importlib_metadata==7.1.0",
"jaraco.classes==3.4.0",
"jaraco.context==5.3.0",
"jaraco.functools==4.0.1",
"joblib==1.4.2",
"keyring==25.2.0",
"kiwisolver==1.4.5",
"markdown-it-py==3.0.0",
"matplotlib==3.8.4",
"mdurl==0.1.2",
"more-itertools==10.2.0",
"nh3==0.2.17",
"nltk==3.8.1",
"numpy==1.26.4",
"packaging==24.0",
"pandas==2.2.2",
"pillow==10.3.0",
"pkginfo==1.10.0",
"Pygments==2.18.0",
"pyparsing==3.1.2",
"pyproject_hooks==1.1.0",
"python-dateutil==2.9.0.post0",
"pytz==2024.1",
"pywin32-ctypes==0.2.2",
"readme_renderer==43.0",
"regex==2024.4.28",
"requests==2.31.0",
"requests-toolbelt==1.0.0",
"rfc3986==2.0.0",
"rich==13.7.1",
"scikit-learn==1.4.2",
"scipy==1.13.0",
"seaborn==0.13.2",
"six==1.16.0",
"SQLAlchemy==2.0.30",
"threadpoolctl==3.5.0",
"tqdm==4.66.4",
"twine==5.0.0",
"typing_extensions==4.11.0",
"tzdata==2024.1",
"urllib3==2.2.1",
"zipp==3.18.1"
]

[project.optional-dependencies]
dev = ["pytest", "pytest-mock", "check-manifest"]
docs = ["sphinx>=2.2"]
docs = ["myst-parser", "sphinx", "nbsphinx", "sphinx-rtd-theme", "sphinxcontrib-websupport"]

[tool.setuptools.dynamic]
version = {attr = "dataanalysistoolkit.__version__"}
Expand Down
54 changes: 54 additions & 0 deletions requirements2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
backports.tarfile==1.1.1
build==1.2.1
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.1
cycler==0.12.1
docutils==0.21.2
fonttools==4.51.0
greenlet==3.0.3
idna==3.7
importlib_metadata==7.1.0
jaraco.classes==3.4.0
jaraco.context==5.3.0
jaraco.functools==4.0.1
joblib==1.4.2
keyring==25.2.0
kiwisolver==1.4.5
markdown-it-py==3.0.0
matplotlib==3.8.4
mdurl==0.1.2
more-itertools==10.2.0
nh3==0.2.17
nltk==3.8.1
numpy==1.26.4
packaging==24.0
pandas==2.2.2
pillow==10.3.0
pkginfo==1.10.0
Pygments==2.18.0
pyparsing==3.1.2
pyproject_hooks==1.1.0
python-dateutil==2.9.0.post0
pytz==2024.1
pywin32-ctypes==0.2.2
readme_renderer==43.0
regex==2024.4.28
requests==2.31.0
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.7.1
scikit-learn==1.4.2
scipy==1.13.0
seaborn==0.13.2
six==1.16.0
SQLAlchemy==2.0.30
threadpoolctl==3.5.0
tqdm==4.66.4
twine==5.0.0
typing_extensions==4.11.0
tzdata==2024.1
urllib3==2.2.1
zipp==3.18.1
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ def __init__(self, filename):
filename (_type_): _description_
"""
self.data = self.load_data(filename)
self.visualizer = DataVisualizer(self.data)
self.visualizer = DataVisualizer(self.data, config_path='.conf/plot_config.json')
self.imputer = DataImputer(self.data)
self.preprocessor = DataPreprocessor(self.data)
self.feature_engineer = FeatureEngineer(self.data)
# No value for argument 'X_test' in constructor callPylintE1120:no-value-for-parameter
# No value for argument 'y_test' in constructor callPylintE1120:no-value-for-parameter
self.evaluator = ModelEvaluator(self.data)
self.report_generator = ReportGenerator(self.data)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .data_sources import test_api_connector, test_excel_connector, test_sql_connector
from .generators import test_csv_data_generator, test_generate_data, test_report_generator
from .integrators import test_data_integrator
from .model import test_feature_engineer, test_model_evaluator
from .preprocessor import test_data_prep
from .utils import test_data_imputer
from .visualizer import test_data_visualizer
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/data_sources/test_api_connector.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
import requests
import requests_mock
from src.data_sources.api_connector import APIConnector
from dataanalysistoolkit.data_sources.api_connector import APIConnector

@pytest.fixture
def api_connector():
Expand Down
2 changes: 1 addition & 1 deletion tests/data_sources/test_excel_connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
import pandas as pd
from src.data_sources.excel_connector import ExcelConnector
from dataanalysistoolkit.data_sources.excel_connector import ExcelConnector

# Create a sample Excel file for testing
@pytest.fixture(scope="module")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_data_analysis_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

import pytest
import pandas as pd
from src.data_analysis_toolkit import DataAnalysisToolkit
from dataanalysistoolkit.data_analysis_toolkit import DataAnalysisToolkit


@pytest.fixture
def analyzer():
return DataAnalysisToolkit("../data/test.csv")
return DataAnalysisToolkit("./data/test_random.csv")


def test_calculate_budget_statistics(analyzer):
Expand Down

0 comments on commit 65e5b96

Please sign in to comment.