Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# NODE_URL="http://127.0.0.1:2000/"
# NODE_UVICORN_KWARGS={"limit_concurrency":10}
# NODE_ENABLE_RATE_LIMITING=true
# NODE_RATE_LIMIT_REQUESTS=100
# NODE_RATE_LIMIT_REQUESTS=500
# NODE_RATE_LIMIT_WINDOW=60
# NODE_RATE_LIMIT_SHORT_REQUESTS=50
# NODE_RATE_LIMIT_SHORT_WINDOW=1
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: nbstripout
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.15.4
rev: v0.15.14
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ad-sdl/madsci:latest
FROM ghcr.io/ad-sdl/madsci:v0.8.0

LABEL org.opencontainers.image.source=https://github.com/AD-SDL/pf400_module
LABEL org.opencontainers.image.description="Drivers and REST API's for the PF400 plate handler robots"
Expand Down
46 changes: 23 additions & 23 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ Configuration for the pf400 node module.

**Environment Prefix**: `NODE_`

| Name | Type | Default | Description | Example |
|------------------------------------|--------------------------|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
| `NODE_STATUS_UPDATE_INTERVAL` | `number` \| `NoneType` | `2.0` | The interval in seconds at which the node should update its status. | `2.0` |
| `NODE_STATE_UPDATE_INTERVAL` | `number` \| `NoneType` | `2.0` | The interval in seconds at which the node should update its state. | `2.0` |
| `NODE_NAME` \| `NODE_NAME` | `string` \| `NoneType` | `null` | Name for this node. If not set, defaults to the class name. | `null` |
| `NODE_ID` \| `NODE_ID` | `string` \| `NoneType` | `null` | Unique ID for this node. If not set, a new ULID is generated. | `null` |
| `NODE_TYPE` \| `NODE_TYPE` | `NodeType` \| `NoneType` | `null` | The type of thing this node provides an interface for. | `null` |
| `NODE_MODULE_NAME` | `string` \| `NoneType` | `null` | Name of the node module implementation. | `null` |
| `NODE_MODULE_VERSION` | `string` \| `NoneType` | `null` | Version of the node module implementation. | `null` |
| `NODE_ENABLE_REGISTRY_RESOLUTION` | `boolean` | `true` | When true, resolve node_id from the ID Registry at startup for stable identity across restarts. | `true` |
| `NODE_LAB_URL` | `AnyUrl` \| `NoneType` | `null` | Lab Manager URL for distributed registry coordination. | `null` |
| `NODE_REGISTRY_LOCK_TIMEOUT` | `number` | `60.0` | Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts. | `60.0` |
| `NODE_URL` \| `NODE_URL` | `AnyUrl` | `"http://127.0.0.1:2000/"` | The URL used to communicate with the node. This is the base URL for the REST API. | `"http://127.0.0.1:2000/"` |
| `NODE_UVICORN_KWARGS` | `object` | `{"limit_concurrency":10}` | Configuration for the Uvicorn server that runs the REST API. By default, sets limit_concurrency=10 to protect against connection exhaustion attacks. | `{"limit_concurrency":10}` |
| `NODE_ENABLE_RATE_LIMITING` | `boolean` | `true` | Enable rate limiting middleware for the REST API. | `true` |
| `NODE_RATE_LIMIT_REQUESTS` | `integer` | `100` | Maximum number of requests allowed per long time window (only used if enable_rate_limiting is True). | `100` |
| `NODE_RATE_LIMIT_WINDOW` | `integer` | `60` | Long time window in seconds for rate limiting (only used if enable_rate_limiting is True). | `60` |
| `NODE_RATE_LIMIT_SHORT_REQUESTS` | `integer` \| `NoneType` | `50` | Maximum number of requests allowed per short time window for burst protection (only used if enable_rate_limiting is True). If None, short window limiting is disabled. | `50` |
| `NODE_RATE_LIMIT_SHORT_WINDOW` | `integer` \| `NoneType` | `1` | Short time window for burst protection in seconds (only used if enable_rate_limiting is True). If None, short window limiting is disabled. | `1` |
| `NODE_RATE_LIMIT_CLEANUP_INTERVAL` | `integer` | `300` | Interval in seconds between cleanup operations to prevent memory leaks (only used if enable_rate_limiting is True). | `300` |
| `NODE_PF400_IP` | `string` \| `NoneType` | `null` | | `null` |
| `NODE_PF400_PORT` | `integer` | `10100` | | `10100` |
| `NODE_PF400_STATUS_PORT` | `integer` | `10000` | | `10000` |
| Name | Type | Default | Description | Example |
|------------------------------------|----------------------|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
| `NODE_STATUS_UPDATE_INTERVAL` | `number` \| `null` | `2.0` | The interval in seconds at which the node should update its status. | `2.0` |
| `NODE_STATE_UPDATE_INTERVAL` | `number` \| `null` | `2.0` | The interval in seconds at which the node should update its state. | `2.0` |
| `NODE_NAME` | `string` \| `null` | `null` | Name for this node. If not set, defaults to the class name. | `null` |
| `NODE_ID` | `string` \| `null` | `null` | Unique ID for this node. If not set, a new ULID is generated. | `null` |
| `NODE_TYPE` | `NodeType` \| `null` | `null` | The type of thing this node provides an interface for. | `null` |
| `NODE_MODULE_NAME` | `string` \| `null` | `null` | Name of the node module implementation. | `null` |
| `NODE_MODULE_VERSION` | `string` \| `null` | `null` | Version of the node module implementation. | `null` |
| `NODE_ENABLE_REGISTRY_RESOLUTION` | `boolean` | `true` | When true, resolve node_id from the ID Registry at startup for stable identity across restarts. | `true` |
| `NODE_LAB_URL` | `AnyUrl` \| `null` | `null` | Lab Manager URL for distributed registry coordination. | `null` |
| `NODE_REGISTRY_LOCK_TIMEOUT` | `number` | `60.0` | Seconds to retry registry lock acquisition on contention at startup. Should be at least 2x the lock TTL (30s) to survive ungraceful container restarts. | `60.0` |
| `NODE_URL` | `AnyUrl` | `"http://127.0.0.1:2000/"` | The URL used to communicate with the node. This is the base URL for the REST API. | `"http://127.0.0.1:2000/"` |
| `NODE_UVICORN_KWARGS` | `object` | `{"limit_concurrency":10}` | Configuration for the Uvicorn server that runs the REST API. By default, sets limit_concurrency=10 to protect against connection exhaustion attacks. | `{"limit_concurrency":10}` |
| `NODE_ENABLE_RATE_LIMITING` | `boolean` | `true` | Enable rate limiting middleware for the REST API. | `true` |
| `NODE_RATE_LIMIT_REQUESTS` | `integer` | `500` | | `500` |
| `NODE_RATE_LIMIT_WINDOW` | `integer` | `60` | Long time window in seconds for rate limiting (only used if enable_rate_limiting is True). | `60` |
| `NODE_RATE_LIMIT_SHORT_REQUESTS` | `integer` \| `null` | `50` | Maximum number of requests allowed per short time window for burst protection (only used if enable_rate_limiting is True). If None, short window limiting is disabled. | `50` |
| `NODE_RATE_LIMIT_SHORT_WINDOW` | `integer` \| `null` | `1` | Short time window for burst protection in seconds (only used if enable_rate_limiting is True). If None, short window limiting is disabled. | `1` |
| `NODE_RATE_LIMIT_CLEANUP_INTERVAL` | `integer` | `300` | Interval in seconds between cleanup operations to prevent memory leaks (only used if enable_rate_limiting is True). | `300` |
| `NODE_PF400_IP` | `string` \| `null` | `null` | | `null` |
| `NODE_PF400_PORT` | `integer` | `10100` | | `10100` |
| `NODE_PF400_STATUS_PORT` | `integer` | `10000` | | `10000` |
Loading
Loading