|
2 | 2 |
|
3 | 3 | ## Prerequisites |
4 | 4 |
|
5 | | -- Python 3.7+ |
6 | | -- [Anaconda](https://www.anaconda.com/) (recommended) |
| 5 | +- Python 3.9+ |
| 6 | +- [Anaconda](https://www.anaconda.com/) or any Python virtual environment manager |
7 | 7 |
|
8 | | -## Installation |
9 | | - |
10 | | -### 1. Create a virtual environment |
| 8 | +## Quick Install (with Make) |
11 | 9 |
|
12 | 10 | ```bash |
13 | | -conda create -n Argos python=3.7 |
14 | | -conda activate Argos |
| 11 | +git clone git@github.com:argosp/pyargos.git |
| 12 | +cd pyargos |
| 13 | +make install |
15 | 14 | ``` |
16 | 15 |
|
17 | | -### 2. Install dependencies |
| 16 | +This will: |
| 17 | + |
| 18 | +1. Install all Python dependencies from `requirements.txt` |
| 19 | +2. Prompt to add `PYTHONPATH` to your `~/.bashrc` (or `~/.zshrc` for zsh users) |
| 20 | + |
| 21 | +After installation, open a new terminal or run `source ~/.bashrc` to activate. |
| 22 | + |
| 23 | +## Manual Install |
| 24 | + |
| 25 | +### 1. Clone the repository |
18 | 26 |
|
19 | 27 | ```bash |
20 | | -pip install paho-mqtt numpy pandas urllib3 requests |
| 28 | +git clone git@github.com:argosp/pyargos.git |
| 29 | +cd pyargos |
21 | 30 | ``` |
22 | 31 |
|
23 | | -### 3. Optional dependencies |
| 32 | +### 2. Create a virtual environment |
24 | 33 |
|
25 | | -Depending on your use case, install additional packages: |
| 34 | +=== "Conda" |
26 | 35 |
|
27 | | -=== "ThingsBoard" |
| 36 | + ```bash |
| 37 | + conda create -n Argos python=3.11 |
| 38 | + conda activate Argos |
| 39 | + ``` |
| 40 | + |
| 41 | +=== "venv" |
28 | 42 |
|
29 | 43 | ```bash |
30 | | - pip install tb_rest_client |
| 44 | + python3 -m venv .venv |
| 45 | + source .venv/bin/activate |
31 | 46 | ``` |
32 | 47 |
|
| 48 | +### 3. Install dependencies |
| 49 | + |
| 50 | +```bash |
| 51 | +pip install -r requirements.txt |
| 52 | +``` |
| 53 | + |
| 54 | +### 4. Add pyargos to your PYTHONPATH |
| 55 | + |
| 56 | +```bash |
| 57 | +export PYTHONPATH="/path/to/pyargos:$PYTHONPATH" |
| 58 | +``` |
| 59 | + |
| 60 | +To make this permanent, use the Makefile helper: |
| 61 | + |
| 62 | +```bash |
| 63 | +make env-persist |
| 64 | +``` |
| 65 | + |
| 66 | +This will prompt to add the export line to your `~/.bashrc` or `~/.zshrc`. |
| 67 | + |
| 68 | +Alternatively, add it manually: |
| 69 | + |
| 70 | +```bash |
| 71 | +echo 'export PYTHONPATH="/path/to/pyargos:$PYTHONPATH" # pyArgos' >> ~/.bashrc |
| 72 | +``` |
| 73 | + |
| 74 | +### 5. Verify the installation |
| 75 | + |
| 76 | +```bash |
| 77 | +python -c "import argos; print(argos.__version__)" |
| 78 | +``` |
| 79 | + |
| 80 | +This should print the current version (e.g., `1.2.3`). |
| 81 | + |
| 82 | +## Optional Dependencies |
| 83 | + |
| 84 | +pyArgos works with several external systems. Install only what you need: |
| 85 | + |
33 | 86 | === "Kafka" |
34 | 87 |
|
35 | 88 | ```bash |
36 | 89 | pip install kafka-python |
37 | 90 | ``` |
| 91 | + Required for: Kafka topic creation and data consumption. |
38 | 92 |
|
39 | | -=== "NoSQL (Cassandra)" |
| 93 | +=== "ThingsBoard" |
| 94 | + |
| 95 | + ```bash |
| 96 | + pip install tb_rest_client |
| 97 | + ``` |
| 98 | + Required for: Device management and trial deployment via ThingsBoard REST API. |
| 99 | + |
| 100 | +=== "Cassandra" |
40 | 101 |
|
41 | 102 | ```bash |
42 | 103 | pip install cassandra-driver dask |
43 | 104 | ``` |
| 105 | + Required for: Querying ThingsBoard's Cassandra telemetry backend. |
44 | 106 |
|
45 | | -=== "NoSQL (MongoDB)" |
| 107 | +=== "MongoDB" |
46 | 108 |
|
47 | 109 | ```bash |
48 | 110 | pip install pymongo dask |
49 | 111 | ``` |
| 112 | + Required for: Querying MongoDB time-series collections. |
50 | 113 |
|
51 | 114 | === "Node-RED Parquet nodes" |
52 | 115 |
|
53 | 116 | ```bash |
54 | 117 | pip install dask fastparquet |
55 | 118 | ``` |
| 119 | + Required for: The `to_parquet` custom Node-RED node. |
56 | 120 |
|
57 | | -### 4. Add pyargos to your PYTHONPATH |
58 | | - |
59 | | -```bash |
60 | | -export PYTHONPATH=$PYTHONPATH:/path/to/pyargos |
61 | | -``` |
| 121 | +=== "All optional" |
62 | 122 |
|
63 | | -!!! tip |
64 | | - Add this line to your `~/.bashrc` or `~/.zshrc` to make it permanent. |
| 123 | + ```bash |
| 124 | + make install-dev |
| 125 | + ``` |
| 126 | + Installs Kafka, ThingsBoard, and documentation dependencies. |
65 | 127 |
|
66 | | -### 5. Activate the environment |
| 128 | +## Make Targets Reference |
67 | 129 |
|
68 | | -```bash |
69 | | -conda activate Argos |
70 | | -``` |
| 130 | +| Target | Description | |
| 131 | +|--------|-------------| |
| 132 | +| `make install` | Full install: deps + prompt to add PYTHONPATH | |
| 133 | +| `make install-deps` | Install dependencies from `requirements.txt` | |
| 134 | +| `make install-dev` | Install optional + dev dependencies | |
| 135 | +| `make env` | Check if PYTHONPATH is configured correctly | |
| 136 | +| `make env-persist` | Add PYTHONPATH to `~/.bashrc` or `~/.zshrc` | |
71 | 137 |
|
72 | 138 | ## Logging Configuration |
73 | 139 |
|
74 | | -pyArgos uses a custom logging system with an `EXECUTION` log level (between DEBUG and INFO). The default configuration is loaded from: |
| 140 | +pyArgos uses a custom logging system with an `EXECUTION` log level (15, between DEBUG and INFO). The default configuration is loaded from: |
75 | 141 |
|
76 | 142 | ``` |
77 | 143 | ~/.pyargos/log/argosLogging.config |
78 | 144 | ``` |
79 | 145 |
|
80 | | -If this file doesn't exist, pyArgos uses a sensible default configuration. See [Configuration Reference](configuration.md) for details on customizing logging. |
| 146 | +If this file doesn't exist, pyArgos creates it automatically from package defaults on first import. See [Configuration Reference](configuration.md) for details on customizing logging. |
81 | 147 |
|
82 | | -## Verifying the Installation |
| 148 | +## What's Next? |
83 | 149 |
|
84 | | -```python |
85 | | -import argos |
86 | | -print(argos.__version__) # Should print 1.2.3 |
87 | | -``` |
| 150 | +- [Key Concepts](concepts.md) -- understand experiments, trials, devices, and how they connect |
| 151 | +- [Experiment Setup](experiment_setup.md) -- create and configure your first experiment |
| 152 | +- [CLI Reference](cli.md) -- all available command-line commands |
0 commit comments