POCS icon indicating copy to clipboard operation
POCS copied to clipboard

Developing on Mac (and potentially windows)

Open programatt opened this issue 3 years ago • 0 comments

In order to reduce the friction to developing on POCS on OSX, I have figured out how to install the dependencies for POCS on a mac in a reproducible and isolated way and how to modify the test setup to work.

Describe the solution you'd like Setup Steps on a Mac

# Create a virtualenv
python3 -m venv <path/to/venv>
source <path/to/venv>/bin/activate
# wherever the root of the repo is on your machine
cd $POCS_HOME 
pip install .[google,focuser,testing,sensors]

Combined with a change to conftest.py to address multiprocessing using spawn on windows and osx instead of fork by default Should allow you to run pytest as usual.

Describe alternatives you've considered Since we are moving away from docker, this is the 2nd best option in my opinion to make it really easy for contributors to be able to do the common pattern with open source projects. Which is to clone a repo, make a change, run tests to validate the change is working as expected, create a PR. Without having to jump through hoops or have intimate knowledge of how the project works.

programatt avatar Jan 20 '22 03:01 programatt