Skip to content

Commit

Permalink
bug fix, dependency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-SGXXX committed Mar 6, 2024
1 parent 18a3bf7 commit 2a3e4ac
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
./dist
dist
build
pyerm.egg-info
4 changes: 2 additions & 2 deletions pyerm/scripts/db_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Version: 0.1.8
# Version: 0.1.9
import sqlite3
import argparse
import os
Expand Down Expand Up @@ -51,11 +51,11 @@ def main():
parser = argparse.ArgumentParser(description='Merge two SQLite databases.')
parser.add_argument('db_path_destination', type=str, help='Destination database file path.')
parser.add_argument('db_path_source', type=str, help='Source database file path.')
args = parser.parse_args()
if not os.path.exists(args.db_path_destination):
raise FileNotFoundError(f"The database file {args.db_path_destination} does not exist")
if not os.path.exists(args.db_path_source):
raise FileNotFoundError(f"The database file {args.db_path_source} does not exist")
args = parser.parse_args()
merge_db(args.db_path_destination, args.db_path_source)


Expand Down
5 changes: 3 additions & 2 deletions pyerm/scripts/export_xls.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Version: 0.1.7
# Version: 0.1.9

import pandas as pd
import sqlite3
Expand All @@ -46,7 +46,8 @@ def main():
if args.db_path is None:
args.db_path = os.path.join(USER_HOME, 'experiment.db')
if not os.path.exists(args.db_path):
raise FileNotFoundError(f"The database file {args.db_path} does not exist")
print(f"Error: The database file {args.db_path} does not exist, please run any experiment first or check the database path.")
return
export_xls(args.db_path, args.output_path)

if __name__ == "__main__":
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# Version: 0.1.8
# Version: 0.1.9
from setuptools import setup, find_packages

with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()

setup(
name='pyerm',
version='0.1.8',
version='0.1.9',
author='Yuxuan Shao',
author_email='yx_shao@qq.com',
description='This project is an experiment record manager for python based on SQLite DMS, which can help you efficiently save your experiment settings and results for later analysis.',
Expand All @@ -48,4 +48,7 @@
'db_merge=pyerm.scripts.db_merge:main',
],
},
install_requires=[
"pandas",
],
)

0 comments on commit 2a3e4ac

Please sign in to comment.