Conda environment providing tools for formatting, profiling, and testing Python code, and for counting lines of code.
# -i : make changes to file in place.
# --max-line-length : maximum line length.
# -a : enable agressive (non-whitespace) changes; repeat to increase agression.
autopep8 -i --max-line-length 80 -a -a <file>
# -l : maximum line length.
black -l 80 <file_or_directory>
pylint <module_or_package>
pygount --format=summary <file_or_directory>
pytest [file_or_directory]
- pytest-cov
(Used with
pytest
.)
pytest --cov=<path_to_package> <path_to_tests>
python -m cProfile [-o output_file] <python_script>
snakeviz <cProfile_output_file>