Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
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
4 changes: 3 additions & 1 deletion .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ jobs:
- uses: actions/checkout@v4

- name: Run ruff
uses: chartboost/ruff-action@v1
uses: astral-sh/ruff-action@v3
with:
version-file: "pyproject.toml"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Ruff cache
.ruff_cache/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
default_stages: [commit]
default_stages: [pre-commit]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
Expand Down
File renamed without changes.
20 changes: 8 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
DRIVER_TARGETS = $(subst contrib/drivers/,driver-,$(wildcard contrib/drivers/*))
LIB_TARGETS = $(subst contrib/libs/,lib-,$(wildcard contrib/libs/*))
PKG_TARGETS = $(subst packages/,,$(wildcard packages/*))
EXAMPLE_TARGETS = $(subst examples/,example-,$(wildcard examples/*))
DOC_LISTEN ?= --host 127.0.0.1

Expand All @@ -14,16 +13,10 @@ serve-docs:
clean-docs:
uv run --isolated --all-packages --group docs $(MAKE) -C docs clean

test-jumpstarter:
uv run --isolated --package jumpstarter pytest jumpstarter tests

test-driver-%: contrib/drivers/%
uv run --isolated --directory $< pytest

test-lib-%: contrib/libs/%
test-%: packages/%
uv run --isolated --directory $< pytest

test-contrib: $(addprefix test-,$(DRIVER_TARGETS))
test-packages: $(addprefix test-,$(PKG_TARGETS))

clean-venv:
-rm -rf ./.venv
Expand All @@ -40,11 +33,14 @@ clean-test:
sync:
uv sync --all-packages --all-extras

test: test-jumpstarter test-contrib
test: test-packages

generate:
buf generate

build:
uv build --all --out-dir dist

clean: clean-docs clean-venv clean-build clean-test

.PHONY: sync docs test test-jumpstarter test-contrib build clean-test clean-docs clean-venv clean-build
.PHONY: sync docs test test-jumpstarter test-packages build clean-test clean-docs clean-venv clean-build
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export AUTHOR_NAME=$3
export AUTHOR_EMAIL=$4

# create the driver directory
DRIVER_DIRECTORY=contrib/drivers/${DRIVER_NAME}
DRIVER_DIRECTORY=packages/jumpstarter_driver_${DRIVER_NAME}
MODULE_DIRECTORY=${DRIVER_DIRECTORY}/jumpstarter_driver_${DRIVER_NAME}
# create the module directories
mkdir -p ${MODULE_DIRECTORY}
Expand All @@ -35,6 +35,5 @@ done

for f in .gitignore pyproject.toml README.md examples/exporter.yaml; do
echo "Creating: ${DRIVER_DIRECTORY}/${f}"
envsubst < contrib/__templates__/driver/${f}.tmpl > ${DRIVER_DIRECTORY}/${f}
envsubst < packages/__templates__/driver/${f}.tmpl > ${DRIVER_DIRECTORY}/${f}
done

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies = [

[tool.hatch.version]
source = "vcs"
raw-options = { 'root' = '../../../'}
raw-options = { 'root' = '../../'}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

The relative path in raw-options needs to be ../../../ to correctly reference the repository root

Based on the file location at git/__templates__/driver/pyproject.toml.tmpl, two levels of ../ would only reach the git/ directory. To properly reference the repository root, three levels (../../../) are required.

🔗 Analysis chain

Confirm the relative path for version control is still valid.

Previously, the raw-options path was set to ../../../, and now it's changed to ../../. Ensure this adjustment correctly references the repository root under the new directory structure. Once satisfied, feel free to resolve this comment.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the updated 'raw-options' path is correct relative to this template file.

# Because the new directory layout was restructured, confirm the repository's layout
# usage by listing the directory tree for each driver or by analyzing the location
# of each pyproject.toml.tmpl file. 
# The following command shows all driver pyproject templates and their directory paths:
fd pyproject.toml.tmpl -t f

Length of output: 74


[tool.hatch.metadata.hooks.vcs.urls]
Homepage = "https://jumpstarter.dev"
Expand Down
4 changes: 2 additions & 2 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ managed:
enabled: true
plugins:
- remote: buf.build/protocolbuffers/python
out: .
out: ./packages/jumpstarter_protocol/jumpstarter_protocol
- remote: buf.build/grpc/python
out: .
out: ./packages/jumpstarter_protocol/jumpstarter_protocol
Comment on lines +6 to +8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Path mismatch detected in buf.gen.yaml configuration

The output path in buf.gen.yaml uses jumpstarter_protocol (with underscore) but the actual directory uses jumpstarter-protocol (with hyphen). This mismatch should be corrected to ensure proper file generation.

  • Update the output paths in buf.gen.yaml to use ./packages/jumpstarter-protocol/jumpstarter_protocol
🔗 Analysis chain

Verify that the new output paths are correct.

The updated paths in buf.gen.yaml look appropriate. Please confirm that the generated files appear under ./packages/jumpstarter_protocol/jumpstarter_protocol as intended.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# This script verifies that the directory for generated code is present
fd "jumpstarter_protocol" --hidden --no-ignore

Length of output: 98

inputs:
- git_repo: https://github.com/jumpstarter-dev/jumpstarter-protocol.git
subdir: proto
3 changes: 0 additions & 3 deletions contrib/drivers/http/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion contrib/drivers/http/.python-version

This file was deleted.

3 changes: 0 additions & 3 deletions contrib/drivers/tftp/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion contrib/drivers/tftp/.python-version

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
import opendal
import pexpect
import pytest
from jumpstarter_driver_network.adapters import PexpectAdapter
from jumpstarter_imagehash import ImageHash

from jumpstarter.client.adapters import PexpectAdapter
from jumpstarter.testing.pytest import JumpstarterTest
from jumpstarter_testing.pytest import JumpstarterTest

log = logging.getLogger(__file__)

Expand Down Expand Up @@ -43,7 +42,7 @@ def test_setup_device(self, client, console):
client.dutlink.storage.write_local_file("image/images/latest.raw")
except opendal.exceptions.NotFound:
pytest.exit(
"No image found, please enter the image directory and run `make`, " "more details in the README.md"
"No image found, please enter the image directory and run `make`, more details in the README.md"
)
return
client.dutlink.storage.dut()
Expand Down
12 changes: 5 additions & 7 deletions examples/soc-pytest/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.11"
dependencies = [
"pytest>=8.3.2",
"jumpstarter",
"pytest>=8.3.2",
"jumpstarter_imagehash",
"jumpstarter_driver_dutlink",
"jumpstarter-testing",
"jumpstarter-imagehash",
"jumpstarter-driver-network",
"jumpstarter-driver-dutlink"
]

[tool.uv.sources]
jumpstarter-imagehash = { workspace = true }
jumpstarter-driver-dutlink = { workspace = true }

[tool.pytest.ini_options]
addopts = "-s --ignore examples/pytest/test_on_rpi4.py"
log_cli = 1
Expand Down
6 changes: 0 additions & 6 deletions jumpstarter/__main__.py

This file was deleted.

Loading