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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ src/scaler/protocol/capnp/*.h
# AWS HPC test-generated files
.scaler_aws_batch_config.json
.scaler_aws_hpc.env

# Per-user agent preferences (not committed)
.agents-local.md
29 changes: 24 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,27 @@ Both C++ and Python code share these standards:

### Setting Up Development Environment

The devcontainer (`.devcontainer/`) comes with all C++ dependencies pre-installed (CMake, GCC, Cap'n Proto, Boost,
libuv) as well as `uv`. You can detect the devcontainer via the `REMOTE_CONTAINERS=true` environment variable.
When running in the devcontainer, skip the C++ dependency setup steps below.

The C++ components are built automatically by `uv pip install -e .` via `scikit-build-core`, so a separate
`./scripts/build.sh` step is only needed for standalone C++ development or testing.

```bash
# Setup C++ dependencies
# Create and activate a virtual environment
uv venv .venv
source .venv/bin/activate

# Install Python package in development mode (also builds C++ components)
uv pip install -e .

# Setup C++ dependencies (skip in devcontainer — already installed)
./scripts/library_tool.sh capnp download
./scripts/library_tool.sh capnp compile
./scripts/library_tool.sh capnp install

# Install Python package in development mode
pip install -e .

# Building C++ components
# Building C++ components standalone (only if needed outside of pip install)
./scripts/build.sh
```

Expand All @@ -164,3 +175,11 @@ python -m unittest discover # Python
```

When writing tests, try to match the directory and module/namespace structure of the code under test.

### Per-User Configuration

Developer-specific preferences (e.g. build parallelism limits, preferred tools) should go in a `.agents-local.md`
file in the project root. This file is gitignored and will not be committed.

**IMPORTANT:** Agents **MUST** read `.agents-local.md` before performing any build, install, or terminal command.
Its contents are mandatory overrides to this file and must always be followed.
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@AGENTS.md
@AGENTS.md
@.agents-local.md
18 changes: 6 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ gui = [
]
graphblas = [
"python-graphblas==2023.7.0; python_version == '3.8'",
"python-graphblas==2024.2.0; python_version == '3.9'",
"python-graphblas==2024.2.0; python_version >= '3.10'",
"python-graphblas==2024.2.0; python_version >= '3.9' and python_version < '3.11'",
"python-graphblas==2025.2.0; python_version >= '3.11'",
"numpy==1.24.4; python_version == '3.8'",
"numpy==2.0.2; python_version == '3.9'",
"numpy==2.2.6; python_version >= '3.10'",
Expand All @@ -53,16 +53,10 @@ aws = [
"boto3",
]
all = [
"nicegui[plotly]==2.24.2; python_version == '3.8'",
"nicegui[plotly]==3.6.1; python_version >= '3.9'",
"python-graphblas==2023.7.0; python_version == '3.8'",
"python-graphblas==2024.2.0; python_version == '3.9'",
"python-graphblas==2024.2.0; python_version >= '3.10'",
"numpy==1.24.4; python_version == '3.8'",
"numpy==2.0.2; python_version == '3.9'",
"numpy==2.2.6; python_version >= '3.10'",
"uvloop; platform_system != 'Windows'",
"boto3",
"opengris-scaler[aws]",
"opengris-scaler[graphblas]",
"opengris-scaler[gui]",
"opengris-scaler[uvloop]",
]

[dependency-groups]
Expand Down
2 changes: 1 addition & 1 deletion src/scaler/ui/common/task_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
from scaler.ui.common.setting_page import Settings
from scaler.ui.common.utility import (
COMPLETED_TASK_STATUSES,
NICEGUI_MAJOR_VERSION,
display_capabilities,
format_timediff,
format_worker_name,
get_bounds,
make_taskstream_ticks,
make_tick_text,
)
from scaler.ui.util import NICEGUI_MAJOR_VERSION

TASK_STREAM_BACKGROUND_COLOR = "white"
TASK_STREAM_BACKGROUND_COLOR_RGB = "#000000"
Expand Down
3 changes: 1 addition & 2 deletions src/scaler/ui/common/task_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

from scaler.protocol.python.common import TaskState
from scaler.protocol.python.message import StateTask, StateWorker
from scaler.ui.common.utility import COMPLETED_TASK_STATUSES, display_capabilities
from scaler.ui.util import NICEGUI_MAJOR_VERSION
from scaler.ui.common.utility import COMPLETED_TASK_STATUSES, NICEGUI_MAJOR_VERSION, display_capabilities
from scaler.utility.formatter import format_bytes
from scaler.utility.metadata.profile_result import ProfileResult

Expand Down
9 changes: 8 additions & 1 deletion src/scaler/ui/common/utility.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import datetime
from typing import List, Set, Tuple
from importlib.metadata import PackageNotFoundError, version
from typing import Final, List, Set, Tuple

from scaler.protocol.python.common import TaskState
from scaler.ui.common.setting_page import Settings

try:
_nicegui_major_version = int(version("nicegui").split(".")[0])
except PackageNotFoundError:
_nicegui_major_version = 0
NICEGUI_MAJOR_VERSION: Final[int] = _nicegui_major_version

COMPLETED_TASK_STATUSES = {
TaskState.Success,
TaskState.Canceled,
Expand Down
2 changes: 1 addition & 1 deletion src/scaler/ui/webui.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging

from scaler.config.section.webui import WebUIConfig
from scaler.ui.util import NICEGUI_MAJOR_VERSION
from scaler.ui.common.utility import NICEGUI_MAJOR_VERSION
from scaler.utility.logging.utility import setup_logger


Expand Down
Loading