-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
125 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
*.vscode/* | ||
*build/* | ||
*/dist/* | ||
*.egg-info/* | ||
*.egg-info/* | ||
.pypirc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
[testpypi] | ||
username = __token__ | ||
password = pypi-AgENdGVzdC5weXBpLm9yZwIkNjFiYzZkYWItMzMwYy00N2ZjLTliYTQtMDA2NWI4MjA0NThiAAIleyJwZXJtaXNzaW9ucyI6ICJ1c2VyIiwgInZlcnNpb24iOiAxfQAABiBwOUBIFc8NI00O1yGyw9qxoo16hgd4OeSiueYrTgHKMQ | ||
password = pypi-AgENdGVzdC5weXBpLm9yZwIkZGI5YzBkNWQtNDUyYS00YzJjLTkyMWUtZDc2ZDNmM2E3MjQxAAIqWzMsImQxNjUyNjE5LTVkYjQtNDRiMy1iZGQ2LTVmZGE2NmMyMTZkNCJdAAAGIMPxamz6UNGefB0mxRTT1Ujgr8cZgeOh7uQatx4yecpq | ||
|
||
|
||
[pypi] | ||
username = __token__ | ||
password = pypi-AgEIcHlwaS5vcmcCJDcwMDdkM2VhLTI4MzctNDNlMy04YTFhLWUzYzM3ZDUzMjI5YgACJXsicGVybWlzc2lvbnMiOiAidXNlciIsICJ2ZXJzaW9uIjogMX0AAAYgECSzotZs3nCgsAPvMuT-nVjOdyTklsuusVE1672KstQ | ||
username = __token__ | ||
password = pypi-AgEIcHlwaS5vcmcCJGMwMDFmZjFiLWYzZTItNDJjZC05ZDVjLWUxYWUzMWI4YzhhMQACKlszLCJlYTc2YmQzZC0zYTRlLTQwNzktOTNiZC1mZWUyNzUwZDgxOTkiXQAABiCC3lD_W_bJZK7nTGrV70m4pLazLDqvJkWr5wwhD_y8iw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
from ._api import * | ||
|
||
print("Version: 0.2.1") | ||
print("Version: 0.2.5") |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
pandas>=2.2.1 | ||
psycopg2>=2.9.9 | ||
pytest>=8.0.2 | ||
pyufunc>=0.2.1 | ||
setuptools>=68.2.2 | ||
SQLAlchemy>=2.0.27 | ||
tqdm | ||
shapely | ||
numpy | ||
beautifulsoup4 | ||
requests | ||
urllib3 | ||
sphinx | ||
pyodbc | ||
exceltosqlserver | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- coding:utf-8 -*- | ||
############################################################## | ||
# Created Date: Sunday, March 3rd 2024 | ||
# Contact Info: luoxiangyong01@gmail.com | ||
# Author/Copyright: Mr. Xiangyong Luo | ||
############################################################## | ||
|
||
|
||
import pytest | ||
from exceltosqlserver import ExcelToDB | ||
|
||
import sqlalchemy | ||
import pyodbc | ||
import pandas as pd | ||
import sys | ||
from pathlib import Path | ||
sys.path.append(str(Path(__file__).parent.parent.absolute())) | ||
|
||
|
||
def test_db_connection(): | ||
"""This function is used to test the database connection.""" | ||
excel2db = ExcelToDB(filePath="test_data/test_data.xlsx", | ||
host_ip="localhost", | ||
usrID="sa", | ||
pwd="123456", | ||
db_name="TestDB", | ||
rename_table="TestTable") | ||
|
||
excel2db.connect2DB() | ||
assert excel2db.dbType == ["sqlserver"] | ||
assert excel2db.host_ip == "localhost" | ||
assert excel2db.db_name == "TestDB" | ||
assert excel2db.usrID == "sa" | ||
assert excel2db.pwd == "123456" | ||
assert excel2db.rename_table == "TestTable" | ||
assert excel2db.engine is not None |