44` macOS_application_speedtest_for_python ` is a macOS application designed to test your internet connection
55speed using Python. The program provides a convenient interface for measuring download, upload, and ping speeds,
66and also supports retesting and viewing test history.
7- The project is built based on another one of my applications, which you can check out on GitHub:
7+
8+ This project is built based on another one of my applications, which you can check out on GitHub:
89[ Internet Speed Test] ( https://github.com/AlexTkDev/different_mini-apps/tree/main/check_internrt_speed )
910
11+ ### What's New in Version 2.0.1
12+ - Added comprehensive logging system for better debugging
13+ - Improved error handling throughout the application
14+ - Enhanced visualization of test history with interactive graphs
15+ - Added export functionality for test history data
16+ - Better network adapter information collection
17+ - Improved progress reporting during tests
18+ - Added unit tests for core functionality
19+ - Reorganized project structure for better maintainability
20+
1021### Installation
1122
1223#### System Requirements
@@ -20,38 +31,79 @@ To install the dependencies, execute the following commands:
2031``` bash
2132# Clone repository
2233git clone https://github.com/AlexTkDev/macOS_application_speedtest_for_python.git
34+ cd macOS_application_speedtest_for_python
35+
36+ # Method 1: Using requirements.txt
2337# Create a virtual environment (recommended)
2438python -m venv .venv
2539source .venv/bin/activate
2640# Install dependencies
2741pip install -r requirements.txt
42+
43+ # Method 2: Installing as a package (development mode)
44+ pip install -e .
2845```
2946
3047### Usage
3148After installation, you can run the application by executing:
3249``` bash
50+ # If installed using requirements.txt
3351python alexs_speedtest.py
52+
53+ # If installed as a package
54+ python -m speedtest_app
3455```
3556
3657#### Features
3758- ** Internet Speed Measurement** : The app allows you to test download and upload speeds, as well as ping (latency) of your internet connection.
3859- ** Graphical Display** : After completing a test, users can view the test results and optionally plot the test history.
60+ - ** Interactive Graphs** : View your speed test history as interactive graphs with the ability to zoom and navigate.
61+ - ** Export Data** : Export your test history to CSV format for further analysis.
62+ - ** Detailed Network Information** : View comprehensive information about your network adapters.
3963- ** Repeat Test** : After a test is completed, users can repeat the test without needing to restart the application.
40- - ** Test History ** : The app saves the results of previous tests, allowing users to view the test history and visualize changes in speed .
64+ - ** Logging System ** : The application now logs all activities to help with troubleshooting .
4165
4266#### Key Components
4367- ** Tkinter** : Used for creating the graphical user interface (GUI), which includes buttons for starting tests, viewing results, and plotting graphs.
4468- ** Speedtest-cli** : A library for performing internet speed tests, which powers the app's functionality.
45- - ** Matplotlib** : A library for visualizing the test history by plotting graphs.
69+ - ** Matplotlib** : A library for visualizing the test history by plotting interactive graphs.
4670- ** JSON** : A library for reading and writing test results stored in JSON format.
71+ - ** Logging** : Python's built-in logging module for tracking application behavior.
72+ - ** Psutil** : For retrieving system and network adapter information.
73+
74+ #### Project Structure
75+ ```
76+ macOS_application_speedtest_for_python/
77+ ├── speedtest_app/ # Main package
78+ │ ├── __init__.py # Package initialization
79+ │ ├── alexs_speedtest.py # Main application module
80+ │ ├── network_adapter_information.py # Network info module
81+ │ ├── test_history.py # History management module
82+ │ ├── gui/ # GUI components
83+ │ │ └── __init__.py
84+ │ ├── utils/ # Utility functions
85+ │ │ └── __init__.py
86+ │ └── tests/ # Unit tests
87+ │ ├── __init__.py
88+ │ ├── test_network_adapter.py
89+ │ └── test_test_history.py
90+ ├── main.py # Entry point script
91+ ├── setup.py # Installation script
92+ ├── requirements.txt # Dependencies
93+ ├── .pylintrc # Pylint configuration
94+ ├── .github/workflows/ # GitHub Actions configuration
95+ │ └── pylint.yml
96+ ├── LICENSE # MIT License
97+ └── README.md # This documentation
98+ ```
4799
48100#### How It Works
491011 . When the app is launched, users can click the ** "Start Speed Test"** button to initiate the test.
50- 2 . The app runs a speed test using the ** speedtest-cli** library, measuring download speed, upload speed, and ping.
102+ 2 . The app first finds the best server, then runs a speed test using the ** speedtest-cli** library, measuring download speed, upload speed, and ping.
511033 . Once the test is completed, the results are displayed in the app's interface.
52- 4 . Users can save the test results to the ** history.json** file and visualize the data using ** matplotlib** .
104+ 4 . Users can save the test results to the ** history.json** file and visualize the data using ** matplotlib** 's interactive graphs .
531055 . For a repeat test, users can simply click the ** "Repeat Speed Test"** button, which hides the history buttons until the new test is finished.
54-
106+ 6 . All application activities are logged to a file in the user's Documents folder for troubleshooting.
55107
56108#### Building the Application
57109To build the application in ` .app ` format, run the following command:
@@ -61,8 +113,19 @@ pyinstaller main.spec
61113After building, the application will be located in the ` dist ` directory, and you can launch it by double-clicking the icon.
62114
63115### Configuration
64- The project include a ` alexs_speedtest.py ` file, where you can find settings such as
65- parameters for speed testing. Feel free to modify these parameters according to your needs.
116+ The project includes several configuration files:
117+ - ` .pylintrc ` : Contains settings for the Pylint code analysis tool
118+ - ` main.spec ` : Configuration for PyInstaller to build the macOS application
119+
120+ ### Running Tests
121+ The project includes unit tests to ensure functionality. To run the tests:
122+ ``` bash
123+ # Run all tests
124+ python -m unittest discover
125+
126+ # Run specific test module
127+ python -m unittest speedtest_app.tests.test_network_adapter
128+ ```
66129
67130### License
68131This project is licensed under the MIT License. Please refer to the ` LICENSE ` file for more detailed information.
@@ -72,26 +135,39 @@ This project uses **Pylint** for static code analysis to ensure that code adhere
72135best practices and follows PEP 8 style guidelines. Pylint checks for errors, potential issues,
73136and enforces consistent coding style, making it a valuable tool for maintaining code quality.
74137
75- ### How to Install Pylint
138+ #### How to Install Pylint
76139To install Pylint, use the following command in your terminal:
77140``` bash
78141pip install pylint
79142```
80- ### Running Pylint
143+
144+ #### Running Pylint
81145Once installed, you can run Pylint on a specific Python file with:
82146``` bash
83147pylint your_file.py
84148```
85149Or, to analyze all Python files in the project, run:
86150``` bash
87- pylint * .py
151+ pylint speedtest_app/ * .py
88152```
89153This setup is also configured to run automatically within GitHub Actions on every code push,
90154checking the code with multiple Python versions for compatibility.
91155
92156### Contribution
93157If you would like to contribute to the project, please create a fork of the repository and submit a Pull Request with your changes.
94158
95- ### Contact
96- For questions or suggestions, you can reach out to me via [ GitHub] ( https://github.com/AlexTkDev ) .
159+ #### Contribution Guidelines
160+ 1 . Fork the repository
161+ 2 . Create a feature branch (` git checkout -b feature/your-feature-name ` )
162+ 3 . Commit your changes (` git commit -am 'Add some feature' ` )
163+ 4 . Push to the branch (` git push origin feature/your-feature-name ` )
164+ 5 . Create a new Pull Request
97165
166+ ### Troubleshooting
167+ If you encounter issues with the application, check the log file located in:
168+ ```
169+ ~/Documents/SpeedTest_Logs/speedtest_log.log
170+ ```
171+
172+ ### Contact
173+ For questions or suggestions, you can reach out to me via [ GitHub] ( https://github.com/AlexTkDev ) .
0 commit comments