Skip to content

Commit 0397b54

Browse files
committed
minor docs/ edits fixing inaccuracies
1 parent ccc2892 commit 0397b54

File tree

4 files changed

+35
-37
lines changed

4 files changed

+35
-37
lines changed

docs/how-to/database-migrations.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ python -m alembic upgrade head
3333

3434
This will:
3535
1. Create the Alembic version tracking table
36-
2. Apply migration 001: Create user preferences table
37-
3. Apply baseline migration (6e6302f1ccb6): Create all core SmartEM schema tables (acquisition, grid, gridsquare, micrograph, foilhole, atlas, quality prediction models, etc.)
38-
4. Apply migration 002: Add performance indexes for acquisition datetime queries
39-
5. Apply remaining migrations including agent communication tables
36+
2. Apply migration 001: Create core SmartEM schema baseline (acquisition, grid, gridsquare, micrograph, foilhole, atlas, etc.)
37+
3. Apply migration 002: Add performance indexes for acquisition datetime queries
38+
4. Apply migration 003: Add prediction model tables
39+
5. Apply remaining migrations for quality metrics, training tables, and schema fixes
4040

4141
### Running Migrations
4242

@@ -268,11 +268,17 @@ Ensure your environment variables are set:
268268
│ ├── env.py # Migration environment
269269
│ ├── script.py.mako # Migration template
270270
│ └── versions/ # Individual migration files
271-
│ ├── 001_add_user_preferences.py
272-
│ ├── 002_add_acquisition_time_index.py
273-
│ └── 003_seed_system_config.py
271+
│ ├── 2025_09_18_1042-001_create_core_smartem_schema_baseline.py
272+
│ ├── 2025_01_11_1431-002_add_acquisition_time_index.py
273+
│ ├── 2025_09_18_1630-003_add_scifi_robot_prediction_models.py
274+
│ └── ... # Additional migrations
274275
```
275276

277+
**Migration file naming convention**: `YYYY_MM_DD_HHMM-NNN_description.py` where:
278+
- `YYYY_MM_DD_HHMM` is the creation timestamp
279+
- `NNN` is the sequential migration number
280+
- `description` describes the change
281+
276282
## Further Reading
277283

278284
- [Alembic Documentation](https://alembic.sqlalchemy.org/)

docs/how-to/use-core-http-api-client.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,16 @@ acquisitions = await client.aget_acquisitions()
7171
### Creating an Acquisition
7272

7373
```python
74-
from smartem_agent.model.schemas import EpuSessionData
74+
from smartem_common.schemas import AcquisitionData
7575
from datetime import datetime
7676

77-
# Create an acquisition from EPU session data
78-
session = EpuSessionData(
79-
id="my-acquisition-id",
77+
# Create an acquisition from acquisition data
78+
acquisition_data = AcquisitionData(
8079
name="My Acquisition",
8180
start_time=datetime.now(),
8281
storage_path="/path/to/storage"
8382
)
84-
response = client.create_acquisition(session)
83+
response = client.create_acquisition(acquisition_data)
8584
print(f"Created acquisition with ID: {response.id}")
8685

8786
# Alternatively, create directly with an API request model
@@ -138,29 +137,28 @@ The client supports the full hierarchy of entities:
138137
Here's an example of creating entities at each level:
139138

140139
```python
140+
from smartem_common.schemas import (
141+
AcquisitionData, GridData, GridSquareData, FoilHoleData,
142+
MicrographData, MicrographManifest
143+
)
144+
141145
# Create an acquisition
142-
acquisition = client.create_acquisition(EpuSessionData(id="acq-1", name="Test Acquisition"))
146+
acquisition_data = AcquisitionData(name="Test Acquisition")
147+
acquisition = client.create_acquisition(acquisition_data)
143148

144149
# Create a grid for the acquisition
145-
from smartem_agent.model.schemas import GridData
146-
147150
grid = GridData(data_dir="/path/to/grid")
148151
grid_response = client.create_acquisition_grid(acquisition.id, grid)
149152

150153
# Create a grid square for the grid
151-
from smartem_agent.model.schemas import GridSquareData
152-
153154
gridsquare = GridSquareData(id="gs-1", data_dir="/path/to/gridsquare")
154155
gridsquare_response = client.create_grid_gridsquare(grid_response.id, gridsquare)
155156

156157
# Create a foil hole for the grid square
157-
from smartem_agent.model.schemas import FoilHoleData
158-
159158
foilhole = FoilHoleData(id="fh-1", gridsquare_id=gridsquare.id)
160159
foilhole_response = client.create_gridsquare_foilhole(gridsquare_response.id, foilhole)
161160

162161
# Create a micrograph for the foil hole
163-
from smartem_agent.model.schemas import MicrographData, MicrographManifest
164162

165163
manifest = MicrographManifest(
166164
unique_id="mic-1",

docs/reference/cli-reference.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The CLI is organised into the following command groups:
1616

1717
## Global Options
1818

19-
All commands support the following verbosity options:
19+
The following verbosity options are supported by the `watch` command:
2020

2121
| Option | Short | Type | Default | Description |
2222
|--------|-------|------|---------|-------------|
@@ -27,6 +27,8 @@ All commands support the following verbosity options:
2727
- **1 (-v)**: INFO level - General information and warnings
2828
- **2 (-vv)**: DEBUG level - Detailed debugging information
2929

30+
> **Note**: The `-v`/`--verbose` flag currently only works with the `watch` command. Parse and validate commands use default logging levels. This is a known limitation.
31+
3032
## Parse Commands
3133

3234
Parse commands extract and process data from EPU files without persisting to the backend API. These are primarily used for development, debugging, and data validation purposes.
@@ -44,7 +46,6 @@ python -m smartem_agent parse dir [OPTIONS] EPU_OUTPUT_DIR
4446
| Parameter | Type | Required | Description |
4547
|-----------|------|----------|-------------|
4648
| `epu_output_dir` | str | Yes | Path to EPU output directory containing multiple grid directories |
47-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
4849

4950
**Example:**
5051
```bash
@@ -69,7 +70,6 @@ python -m smartem_agent parse grid [OPTIONS] GRID_DATA_DIR
6970
| Parameter | Type | Required | Description |
7071
|-----------|------|----------|-------------|
7172
| `grid_data_dir` | str | Yes | Path to individual grid data directory |
72-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
7373

7474
**Example:**
7575
```bash
@@ -94,7 +94,6 @@ python -m smartem_agent parse session [OPTIONS] PATH
9494
| Parameter | Type | Required | Description |
9595
|-----------|------|----------|-------------|
9696
| `path` | str | Yes | Path to EPU session manifest file |
97-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
9897

9998
**Example:**
10099
```bash
@@ -116,7 +115,6 @@ python -m smartem_agent parse atlas [OPTIONS] PATH
116115
| Parameter | Type | Required | Description |
117116
|-----------|------|----------|-------------|
118117
| `path` | str | Yes | Path to atlas manifest file |
119-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
120118

121119
**Example:**
122120
```bash
@@ -138,7 +136,6 @@ python -m smartem_agent parse gridsquare-metadata [OPTIONS] PATH
138136
| Parameter | Type | Required | Description |
139137
|-----------|------|----------|-------------|
140138
| `path` | str | Yes | Path to grid square metadata file |
141-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
142139

143140
**Example:**
144141
```bash
@@ -160,7 +157,6 @@ python -m smartem_agent parse gridsquare [OPTIONS] PATH
160157
| Parameter | Type | Required | Description |
161158
|-----------|------|----------|-------------|
162159
| `path` | str | Yes | Path to grid square manifest file |
163-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
164160

165161
**Example:**
166162
```bash
@@ -182,7 +178,6 @@ python -m smartem_agent parse foilhole [OPTIONS] PATH
182178
| Parameter | Type | Required | Description |
183179
|-----------|------|----------|-------------|
184180
| `path` | str | Yes | Path to foil hole manifest file |
185-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
186181

187182
**Example:**
188183
```bash
@@ -204,7 +199,6 @@ python -m smartem_agent parse micrograph [OPTIONS] PATH
204199
| Parameter | Type | Required | Description |
205200
|-----------|------|----------|-------------|
206201
| `path` | str | Yes | Path to micrograph manifest file |
207-
| `--verbose` | count | No | Verbosity level (see [Global Options](#global-options)) |
208202

209203
**Example:**
210204
```bash
@@ -226,7 +220,6 @@ python -m smartem_agent validate [OPTIONS] PATH
226220
| Parameter | Type | Required | Default | Description |
227221
|-----------|------|----------|---------|-------------|
228222
| `path` | str | Yes | - | Path to EPU project directory to validate |
229-
| `--verbose` | count | No | 0 | Verbosity level (see [Global Options](#global-options)) |
230223

231224
**Exit Codes:**
232225
- **0**: Directory structure is valid

docs/tutorials/installation.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,7 @@ pip install -e .[all]
6161

6262
## Verify Installation
6363

64-
The library should now be installed with the command-line interface available on your system path. Verify the installation by checking the installed version:
65-
66-
```bash
67-
smartem-decisions --version
68-
```
69-
70-
You can also verify that all components are correctly installed by running:
64+
Verify that all components are correctly installed by running:
7165

7266
```bash
7367
# Test core functionality
@@ -77,6 +71,13 @@ python -c "import smartem_backend, smartem_agent, smartem_common; print('Core co
7771
python -c "import smartem_mcp; print('MCP components available')"
7872
```
7973

74+
You can also verify the CLI tools are available:
75+
76+
```bash
77+
# Check agent CLI is accessible
78+
python -m smartem_agent --help
79+
```
80+
8081
## Next Steps
8182

8283
Once installation is complete, you can proceed to:

0 commit comments

Comments
 (0)