This is just a sample helloworld project which aims to provide some good (at least not so bad) praticies to start a new project.
Basically, you can clone this repository and run sed -i 's/helloworld/YOURPROJECTNAME/g' ;)
Install latest version from repository using pip
$ pip3 install --user git+https://github.com/essembeh/python-helloworldOr setup a development environment
# Clone the source $ git clone https://github.com/essembeh/python-helloworld $ cd python-helloworld # Build the virtualenv $ make venv # Load the venv $ source venv/bin/activate # Install your app in the venv (venv) $ pip install -e . # equivalent (venv) $ make installVSCodium is a good editor and the Python support is pretty nice. Some workspace settings in .vscode/settings.json are configured for example to work with the virtual environment.
Flake8 is configured with some plugins (in requirements-dev.txt) to report many warnings/errors (and VSCodium is configured to show them).
Black code formatter will automatically format source code on save using VSCodium.
Some usefull commands:
make venvto create or update the virtualenv in the folder namedvenvmake install, simple alias topip install -e .to install your app in the virtualenv in development mode, ie: no need to reinstall when the code changespytestto run the teststoxto run all the test with coverage and flake8 analysis (equivalent tomake test)make docker-testto run tox in a docker image containing all supported Python versions, see multipy- Finally the
make publish(ormake publish-test) to build and publish the project on PyPI.