Skip to content
Open
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
6 changes: 6 additions & 0 deletions .rhiza/make.d/03-marimo.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## Makefile.marimo - Marimo notebook targets
# This file is included by the main Makefile

# Add MARIMO_FOLDER to deptry configuration if it exists
ifneq ($(wildcard $(MARIMO_FOLDER)),)
DEPTRY_FOLDERS += $(MARIMO_FOLDER)
DEPTRY_IGNORE += --ignore DEP004
endif

# Declare phony targets (they don't produce files)
.PHONY: marimo-validate marimo marimushka

Expand Down
15 changes: 15 additions & 0 deletions .rhiza/make.d/src.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Makefile.src - Source folder configuration
# This file is included by the main Makefile
Comment on lines +1 to +2
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Consider renaming this file to follow the numeric prefix convention documented in .rhiza/make.d/README.md. Since this file defines a target (deptry) which is a quality checking tool, it could be numbered in the 20-79 range (e.g., "02-src.mk" or similar) for consistency with other target-defining files like 01-test.mk, 03-marimo.mk, etc.

However, if the intent is for this file to represent core/fundamental source folder configuration (without a prefix to indicate its foundational nature), then the current naming is acceptable.

Copilot uses AI. Check for mistakes.

# Add SOURCE_FOLDER to deptry configuration if it exists
ifneq ($(wildcard $(SOURCE_FOLDER)),)
DEPTRY_FOLDERS += $(SOURCE_FOLDER)
endif
Comment on lines +1 to +7
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Consider initializing DEPTRY_FOLDERS and DEPTRY_IGNORE variables at the top of this file before appending to them, for clarity and consistency with Make best practices. While using += on undefined variables works in Make (treating them as initially empty), explicit initialization makes the code more maintainable and self-documenting.

For example, add at the top:
DEPTRY_FOLDERS ?=
DEPTRY_IGNORE ?=

This is especially important since this file defines the deptry target and should be the authoritative source for these variables.

Copilot uses AI. Check for mistakes.

##@ Quality and Formatting
deptry: install-uv ## Run deptry
Comment on lines +9 to +10
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

For consistency with other .mk files in this directory (e.g., 01-test.mk, 03-marimo.mk), consider adding a .PHONY declaration for the deptry target at the top of this file after the variable definitions:

.PHONY: deptry

While the target is already declared as PHONY in the main rhiza.mk file, having it declared locally makes the file more self-contained and follows the pattern established in other make.d files.

Copilot uses AI. Check for mistakes.
@printf "${BLUE}[INFO] DEPTRY_FOLDERS: ${DEPTRY_FOLDERS}${RESET}\n"
@if [ -n "$(strip ${DEPTRY_FOLDERS})" ]; then \
printf "${BLUE}[INFO] Running: $(UVX_BIN) -p ${PYTHON_VERSION} deptry ${DEPTRY_FOLDERS} ${DEPTRY_IGNORE}${RESET}\n"; \
Comment on lines +11 to +13
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The INFO output on lines 11-13 is more verbose than the pattern used in other targets (see 01-test.mk, 02-book.mk, etc.), which typically just print a brief description like "Running deptry..." rather than showing variable values and the full command.

Consider simplifying to match the existing pattern:
@printf "${BLUE}[INFO] Running deptry on ${DEPTRY_FOLDERS}...${RESET}\n"

However, the current verbose output could be valuable for debugging during the initial rollout of this refactored functionality, so this is a minor style preference rather than a requirement.

Copilot uses AI. Check for mistakes.
$(UVX_BIN) -p ${PYTHON_VERSION} deptry ${DEPTRY_FOLDERS} ${DEPTRY_IGNORE}; \
fi
13 changes: 0 additions & 13 deletions .rhiza/rhiza.mk
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,6 @@ clean: ## Clean project artifacts and stale local branches
@git branch -vv | awk '/: gone]/{print $$1}' | xargs -r git branch -D

##@ Quality and Formatting
deptry: install-uv ## Run deptry
@if [ -d ${SOURCE_FOLDER} ]; then \
$(UVX_BIN) -p ${PYTHON_VERSION} deptry ${SOURCE_FOLDER}; \
fi

@if [ -d ${MARIMO_FOLDER} ]; then \
if [ -d ${SOURCE_FOLDER} ]; then \
$(UVX_BIN) -p ${PYTHON_VERSION} deptry ${MARIMO_FOLDER} ${SOURCE_FOLDER} --ignore DEP004; \
else \
$(UVX_BIN) -p ${PYTHON_VERSION} deptry ${MARIMO_FOLDER} --ignore DEP004; \
fi \
fi

fmt: install-uv ## check the pre-commit hooks and the linting
@${UVX_BIN} -p ${PYTHON_VERSION} pre-commit run --all-files

Expand Down
1 change: 1 addition & 0 deletions tests/test_rhiza/test_makefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
".rhiza/make.d/03-marimo.mk",
".rhiza/make.d/04-presentation.mk",
".rhiza/make.d/05-github.mk",
".rhiza/make.d/src.mk",
]


Expand Down
Loading