|
| 1 | +# Installing PyEPICS |
| 2 | + |
| 3 | +## Supported Python Versions |
| 4 | + |
| 5 | +PyEPICS requires **Python 3.11 or later** (3.11, 3.12, 3.13). |
| 6 | + |
| 7 | +## Quick Install from PyPI |
| 8 | + |
| 9 | +```bash |
| 10 | +pip install epics |
| 11 | +``` |
| 12 | + |
| 13 | +This installs the core package with the minimum required dependencies |
| 14 | +(`numpy`, `h5py`, `endf`). |
| 15 | + |
| 16 | +## Optional Extras |
| 17 | + |
| 18 | +PyEPICS defines optional dependency groups you can install as needed: |
| 19 | + |
| 20 | +| Extra | What it adds | Install command | |
| 21 | +|------------|-------------------------------------|------------------------------------------| |
| 22 | +| `download` | `requests`, `beautifulsoup4` | `pip install "epics[download]"` | |
| 23 | +| `pandas` | `pandas` | `pip install "epics[pandas]"` | |
| 24 | +| `plot` | `matplotlib` | `pip install "epics[plot]"` | |
| 25 | +| `all` | All optional dependencies | `pip install "epics[all]"` | |
| 26 | +| `dev` | Testing + linting + docs tooling | `pip install "epics[dev]"` | |
| 27 | + |
| 28 | +### Examples |
| 29 | + |
| 30 | +```bash |
| 31 | +# Core only (reading ENDF files and converting to HDF5) |
| 32 | +pip install epics |
| 33 | + |
| 34 | +# With plotting and pandas for interactive exploration |
| 35 | +pip install "epics[plot,pandas]" |
| 36 | + |
| 37 | +# Everything (including download support) |
| 38 | +pip install "epics[all]" |
| 39 | +``` |
| 40 | + |
| 41 | +## Developer Install |
| 42 | + |
| 43 | +Clone the repository and install in editable mode with development |
| 44 | +dependencies: |
| 45 | + |
| 46 | +```bash |
| 47 | +git clone https://github.com/melekderman/PyEPICS.git |
| 48 | +cd PyEPICS |
| 49 | + |
| 50 | +# Create a virtual environment (recommended) |
| 51 | +python -m venv .venv |
| 52 | +source .venv/bin/activate # Linux/macOS |
| 53 | +# .venv\Scripts\activate # Windows |
| 54 | + |
| 55 | +# Editable install with dev dependencies |
| 56 | +pip install -e ".[dev]" |
| 57 | +``` |
| 58 | + |
| 59 | +This gives you: |
| 60 | + |
| 61 | +- `pytest` for running tests |
| 62 | +- `ruff` for linting |
| 63 | +- `sphinx`, `sphinx-rtd-theme`, `myst-parser` for building docs |
| 64 | +- All optional runtime dependencies (`pandas`, `matplotlib`, etc.) |
| 65 | + |
| 66 | +## Running Tests |
| 67 | + |
| 68 | +```bash |
| 69 | +# Run all tests |
| 70 | +python -m pytest tests/ -v |
| 71 | + |
| 72 | +# Run only the client API tests |
| 73 | +python -m pytest tests/test_client.py -v |
| 74 | + |
| 75 | +# Run with coverage (if pytest-cov is installed) |
| 76 | +python -m pytest tests/ --cov=pyepics --cov-report=term-missing |
| 77 | +``` |
| 78 | + |
| 79 | +## Building Documentation |
| 80 | + |
| 81 | +```bash |
| 82 | +cd docs |
| 83 | +pip install -r requirements.txt # if not using [dev] extra |
| 84 | +make html |
| 85 | +``` |
| 86 | + |
| 87 | +The built HTML will be in `docs/_build/html/`. |
| 88 | + |
| 89 | +## Building Distributions |
| 90 | + |
| 91 | +To build source and wheel distributions for publishing: |
| 92 | + |
| 93 | +```bash |
| 94 | +pip install build |
| 95 | +python -m build |
| 96 | +``` |
| 97 | + |
| 98 | +This produces: |
| 99 | + |
| 100 | +``` |
| 101 | +dist/ |
| 102 | +├── epics-0.1.0.tar.gz # sdist |
| 103 | +└── epics-0.1.0-py3-none-any.whl # wheel |
| 104 | +``` |
| 105 | + |
| 106 | +## Verifying the Install |
| 107 | + |
| 108 | +After installation, verify everything works: |
| 109 | + |
| 110 | +```python |
| 111 | +import pyepics |
| 112 | +print(pyepics.__version__) # "0.1.0" |
| 113 | + |
| 114 | +# Check that the client API is available |
| 115 | +from pyepics import EPICSClient |
| 116 | +print("EPICSClient loaded successfully") |
| 117 | +``` |
| 118 | + |
| 119 | +## Platform Notes |
| 120 | + |
| 121 | +- **macOS / Linux / Windows**: All supported via pure-Python code. |
| 122 | + Binary dependencies (`numpy`, `h5py`) provide pre-built wheels for |
| 123 | + all major platforms. |
| 124 | +- **Conda**: You can also install dependencies via conda-forge: |
| 125 | + |
| 126 | + ```bash |
| 127 | + conda install numpy h5py |
| 128 | + pip install epics |
| 129 | + ``` |
0 commit comments