2.4 KiB
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Getting started
- Install python >= 3.6.0
- Ensure you have python 3.x's installer
pip3
- For the Ubuntu distribution 16.04+, the command should be
sudo apt-get install python3-pip
- For the Ubuntu distribution 16.04+, the command should be
- (Recommended) Get familiar with Python's
venv
orvirtualenv
- This allows for compartmentalizing any development work
pip3 install -r src/requirements.txt
- Ready to code and run
Testing
Note: Ensure you've first completed the Getting started steps!
python3 -m pytest src/test/
Dependency Management
In this project, we manage dependencies this way (because it's simple and meets our minimum requirements).
To add dependencies:
- Add an entry to
requirements-to-freeze.txt
- Then run
pip install -r requirements-to-freeze.txt
- Finally, when ready to lock versions (before release), run
pip freeze > requirements.txt
- Gotcha: Beware, there is a known bug where a package
pkg-resources==0.0.0
gets added if you have a virtual environment running. Remove this line before pushing it to any pipeline.
- Gotcha: Beware, there is a known bug where a package
To update dependencies:
- Run
pip install -r requirements-to-freeze.txt --upgrade
- Finally, when ready to lock versions (before release), run
pip freeze > requirements.txt
Packaging
To create production binaries (releases), see package/README.md.