Please download Python 3.10.11 to develop on PyICe
Welcome to PyICe! There is always room for improvement, whether it be new instrument drivers, updated test infrastructure or anything else.
Once you have cloned the PyICe git repository, you will need to create a virtual environment:
python -m venv pyice-env
If you already have an older or newer version of Python installed, you can peg the PyICe virtual environment to Python 3.10 as shown below. Be sure you have added Python 3.10 to the system environment variable Path.
py -3.10 -m venv pyice-env
This will create a directory pyice-env/
with the Python binaries which will allow
you to install packages for that isolated environment.
You can activate your virtual environment in a Windows Powershell:
.\pyice-env\Scripts\activate
or in Linux:
source ./venv/bin/activate
Once the environment is activated, you can install the development packages ( this includes pytest )
python -m pip install -r PyICe/requirements/dev-requirements.txt
You are now all set up to start developing PyICe on your machine!
If you would like to work on an editable copy of PyICe on your machine in a different environment, you can. Go to your cloned copy of PyICe, and in your shell (please make sure to complete the previous step):
python -m pip install --editable .[dev]
Note: if pip gives you a warning to upgrade, please do so. You may need to upgrade
pip to install an editable version of PyICe from the pyproject.toml file.
Adding [dev]
will include the optional development packages in your local
editable install.
Please follow PEP8 as best you can.
General: PyICe inquires: Developers: pyice-developers@analog.com Zachary Lewko: zachary.lewko@analog.com Dave Simmons: david.simmons@analog.com Steve Martin: steve.martin@analog.com
Environment questions or concerns: Tim Laracy: Tlaracy@marvell.com
User group: pyice-users@analog.com
Check out this link for a handy cheatsheet on how to use git. If you find yourself in a pickle, there is also oh s***, git!, which has a several ways to clean up a Git disaster.
When you beging working on a feature, please branch off of the master branch
git checkout master
git branch new_feature_name
Make your commits small - that makes it much easier for other contributors to see your workflow.
To rebuild requirements.txt after editing pyproject.toml
python -m pip install pip-tools
pip-compile --output-file=./requirements/requirements.txt pyproject.toml
To upgrade an environment with a new requirements.txt file
pip install -r requirements.txt --upgrade