The python text statistics project simply gets statistics based on the imputed text files. This project is simple, so simple its used for teaching computer science in a college 121 class. Why am I redoing a beginner level cs project? Well I am using the text statistics as a base for me to run those functions using sockets. The server will be doing the text processing while the client passes the files to be analyzed. Demonstrating a knowledge of simple sockets in Python.
- Python 3
- pip 3
- poetry
Project uses Poetry for package management, have Poetry installed pip install poetry and run the below command.
poetry installWhen in the repo, use the command. python ProcessText.py <textFile>
If wanting to launch the ProcessText server use command, python server.py -s [host] -p [port]
When that is running a client can connect with command python client.py -s [host] -p [port] <file>
Python linting uses pylint and flake8.
A general pylint check will use following pylint command pylint $(git ls-files '*.py');
A general flake8 check will check for everything. But for continuous integration the command used will be flake8 . --count --show-source --statistics --exclude flaskEnv/
flake8 --exclude flaskEnv/Linting can also be done with Python Black, python black <file>
Testing is done using unittest; to start testing,
poetry shell; \
python -m pytest ./test/Here are some useful articles that have helped me through this project.