Skip to content

Latest commit

 

History

History
100 lines (81 loc) · 3.18 KB

CONTRIBUTING.md

File metadata and controls

100 lines (81 loc) · 3.18 KB

Contributing to PyICe

Please download Python 3.10.11 to develop on PyICe

Introduction

Welcome to PyICe! There is always room for improvement, whether it be new instrument drivers, updated test infrastructure or anything else.

Installation and Setup

Create a virtual Environment

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.

Activate your virtual 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 )

Install the development packages

python -m pip install -r PyICe/requirements/dev-requirements.txt

You are now all set up to start developing PyICe on your machine!

Get an editable copy of 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.

Contributing Guidelines

Coding Standards

Please follow PEP8 as best you can.

Contact info

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

New Git Users!

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.

PyICe Maintainers Tips and Tricks!

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