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
32 changes: 16 additions & 16 deletions __templates__/create_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ MODULE_DIRECTORY=${DRIVER_DIRECTORY}/jumpstarter_driver_${DRIVER_NAME}
mkdir -p ${MODULE_DIRECTORY}
mkdir -p ${DRIVER_DIRECTORY}/examples

# Create documentation file
# Define paths
DOCS_DIRECTORY=docs/source/api-reference/drivers
DOC_FILE=${DOCS_DIRECTORY}/${DRIVER_NAME}.md
README_FILE=${DRIVER_DIRECTORY}/README.md

# Create initial documentation file if it doesn't exist
if [ ! -f "${DOC_FILE}" ]; then
echo "Creating initial documentation file: ${DOC_FILE}"
cat > "${DOC_FILE}" << 'EOF'
# Create README.md file with initial documentation
echo "Creating README.md file: ${README_FILE}"
cat > "${README_FILE}" << 'EOF'
# ${DRIVER_CLASS} Driver

`jumpstarter-driver-${DRIVER_NAME}` provides functionality for interacting with ${DRIVER_NAME} devices.
Expand All @@ -61,11 +61,17 @@ interfaces:

Add API documentation here.
EOF
# Need to expand variables after EOF to prevent early expansion
sed -i "s/\${DRIVER_CLASS}/${DRIVER_CLASS}/g; s/\${DRIVER_NAME}/${DRIVER_NAME}/g" "${DOC_FILE}"
echo "Documentation file content:"
cat "${DOC_FILE}"
fi
# Need to expand variables after EOF to prevent early expansion
sed -i "s/\${DRIVER_CLASS}/${DRIVER_CLASS}/g; s/\${DRIVER_NAME}/${DRIVER_NAME}/g" "${README_FILE}"
echo "README.md file content:"
cat "${README_FILE}"

# Create symlink from documentation directory to README.md
mkdir -p ${DOCS_DIRECTORY}
echo "Creating symlink to README.md file"
rel_path=$(realpath --relative-to="${DOCS_DIRECTORY}" "${README_FILE}")
ln -sf "${rel_path}" "${DOC_FILE}"
echo "Created symlink: ${DOC_FILE} -> ${rel_path}"

for f in __init__.py client.py driver_test.py driver.py; do
echo "Creating: ${MODULE_DIRECTORY}/${f}"
Expand All @@ -76,9 +82,3 @@ for f in .gitignore pyproject.toml examples/exporter.yaml; do
echo "Creating: ${DRIVER_DIRECTORY}/${f}"
envsubst < __templates__/driver/${f}.tmpl > ${DRIVER_DIRECTORY}/${f}
done

# Create symlink to documentation file instead of README.md
echo "Creating symlink to documentation file"
rel_path=$(realpath --relative-to="${DRIVER_DIRECTORY}" "${DOC_FILE}")
ln -sf "${rel_path}" "${DRIVER_DIRECTORY}/README.md"
echo "Created symlink: ${DRIVER_DIRECTORY}/README.md -> ${rel_path}"
2 changes: 1 addition & 1 deletion __templates__/driver/pyproject.toml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "jumpstarter-driver-${DRIVER_NAME}"
dynamic = ["version", "urls"]
description = "Add your description here"
readme = "README.md"
license = "Apache-2.0"
license = "Apache-2.0"
authors = [
{ name = "${AUTHOR_NAME}", email = "${AUTHOR_EMAIL}" }
]
Expand Down
33 changes: 0 additions & 33 deletions docs/source/api-reference/drivers/can.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/api-reference/drivers/can.md
72 changes: 0 additions & 72 deletions docs/source/api-reference/drivers/corellium.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/api-reference/drivers/corellium.md
25 changes: 0 additions & 25 deletions docs/source/api-reference/drivers/dutlink.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/source/api-reference/drivers/dutlink.md
Loading