Metadata-Version: 2.4
Name: pyrpoc
Version: 3.1.0
Summary: Real-time Precision Opto-Control Toolkit
Author-email: Ishaan Singh <sing1125@purdue.com>
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: opencv-python
Requires-Dist: pyqt6
Requires-Dist: PyQt6Ads
Requires-Dist: pyqtgraph
Requires-Dist: nidaqmx
Requires-Dist: tifffile
Dynamic: license-file

# pyrpoc v3.1

Author: Ishaan Singh, Zhang Group (https://sites.google.com/view/zhangresearchgroup). With any feedback or suggestions, please reach out to sing1125@purdue.edu.

The instructions for install below are only for windows, as your instrument control system likely is a windows computer. If you would like instructions for a linux or mac system, please email.

## Installation

This project uses a free tool called `uv` that handles everything for you. To get set up with it on windows, install the instuctions below. 

1. Click the Windows start button and search for powershell. 
2. In the list that appears, right-click on powershell and choose **run as administrator**. If a popup comes up to ask *"Do you want to allow this app to make changes?"*, click yes.
3. Type the word **PowerShell**.
4. Copy the line below, paste it into that window, and press enter to run the command. This command is straight from [Astral's instructions for installing uv](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2).

   ```
   powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
   ```
5. After install is complete, fully close powershell. 

Now that `uv` is installed, you can install the pyrpoc software itself.

1. Open PowerShell again (Windows start button → search **PowerShell** → click it). You do **not** need administrator mode. 
2. Copy the line below, paste it into the window (right-click inside the window to paste), and press **Enter**:

   ```
   uv tool install pyrpoc
   ```

3. Wait until the text stops scrolling. This step downloads the correct version of Python and every component the software needs, so the first install can take several minutes.
## Running the software

Any time you want to open pyrpoc:

1. Open PowerShell 
2. Type the command below

   ```
   pyrpoc
   ```
That's all.

## Updating to a newer version

When a new version is released, open PowerShell and run:

```
uv tool upgrade pyrpoc
```
## Developer installation (editable mode)

1. Navigate to the desired project directory and clone the repository:
   ```
   git clone https://github.com/FishyIshyFishy/pyrpoc.git
   cd pyrpoc
   ```


2. Create the virtual environment and install the project in editable mode along with the development dependencies
   ```
   uv sync
   ```

3. Run the software from the clone:
   ```
   uv run pyrpoc
   ```

   `uv run` automatically uses the project's `.venv`, so you never need to activate it manually. If you prefer to activate it anyway:

   ```
   .venv\Scripts\Activate.ps1
   pyrpoc
   ```

   To run tests, use `uv run pytest`, and to type check, `uv run pyright`. 

4. When dependencies change, adjust `pyproject.toml` and rerun `uv sync`. To add packages, use `uv add <package-name>`. To add a dev only package, use `uv add -dev <package-name>`.
