- Get the code
git clone https://github.com/Microsoft/mu_pip_python_library.git
- Install development dependencies
pip install --upgrade -r requirements.txt
- Uninstall any copy of mu_python_library
pip uninstall mu_python_library
- Install from local source (run command from root of repo)
pip install -e .
- Run a Basic Syntax/Lint Check (using flake8) and resolve any issues
flake8 MuPythonLibrary
!!! info Newer editors are very helpful in resolving source formatting errors (whitespace, indentation, etc). In VSCode open the py file and use ++alt+shift+f++ to auto format.
- Run pytest with coverage data collected
pytest -v --junitxml=test.junit.xml --html=pytest_MuPythonLibrary_report.html --self-contained-html --cov=MuPythonLibrary --cov-report html:cov_html --cov-report xml:cov.xml --cov-config .coveragerc
- Look at the reports
- pytest_MuPythonLibrary_report.html
- cov_html/index.html