Skip to content

Commit 4eb9236

Browse files
committed
feat: update version to 3.0.0 and improve settings initialization
1 parent 14a8cf5 commit 4eb9236

File tree

3 files changed

+13
-36
lines changed

3 files changed

+13
-36
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="macOS_speedtest",
8-
version="2.0.1",
8+
version="3.0.0",
99
author="Aleksandr",
1010
author_email="yourmail@example.com",
1111
description="A macOS application to test internet connection speed",
@@ -30,7 +30,7 @@
3030
],
3131
entry_points={
3232
"console_scripts": [
33-
"alex-speedtest=alex_speedtest:main",
33+
"alex-speedtest=speedtest_app.alexs_speedtest:main",
3434
],
3535
},
3636
include_package_data=True,

speedtest_app/__init__.py

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,16 @@
44
A macOS application to test internet connection speed.
55
"""
66

7-
__version__ = '2.0.1'
7+
__version__ = '3.0.0'
88
__author__ = 'Aleksandr'
99

1010
from .network_adapter_information import get_network_info, get_active_adapter_info
1111
from .test_history import save_test_results, view_history, plot_history
1212

13-
# speedtest_app/gui/__init__.py
14-
"""
15-
GUI components for macOS_application_speedtest_for_python.
16-
"""
17-
18-
# speedtest_app/utils/__init__.py
19-
"""
20-
Utility functions for macOS_application_speedtest_for_python.
21-
"""
22-
23-
# speedtest_app/tests/__init__.py
24-
"""
25-
Test modules for macOS_application_speedtest_for_python.
26-
"""
27-
28-
# main.py
29-
#!/usr/bin/env python3
30-
"""
31-
Entry point for macOS_application_speedtest application.
32-
"""
33-
import os
34-
import sys
35-
36-
# Add the parent directory to sys.path
37-
current_dir = os.path.dirname(os.path.abspath(__file__))
38-
parent_dir = os.path.dirname(current_dir)
39-
sys.path.insert(0, parent_dir)
40-
41-
from speedtest_app.alexs_speedtest import main
42-
43-
if __name__ == "__main__":
44-
main()
13+
__all__ = [
14+
'get_network_info',
15+
'get_active_adapter_info',
16+
'save_test_results',
17+
'view_history',
18+
'plot_history'
19+
]

speedtest_app/utils/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
def get_app_version():
1414
"""Returns the current version of the application."""
15-
return "2.0.1"
15+
return "3.0.0"
1616

1717

1818
def format_speed(speed_mbps):
@@ -65,6 +65,7 @@ def load_settings():
6565
}
6666

6767
if not os.path.exists(settings_file):
68+
save_settings(default_settings)
6869
return default_settings
6970

7071
try:
@@ -74,6 +75,7 @@ def load_settings():
7475
for key, value in default_settings.items():
7576
if key not in settings:
7677
settings[key] = value
78+
settings["last_used"] = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
7779
logger.info(f"Settings loaded from {settings_file}")
7880
return settings
7981
except Exception as e:

0 commit comments

Comments
 (0)