-
Notifications
You must be signed in to change notification settings - Fork 2
434 src.mk for src #436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
434 src.mk for src #436
Conversation
Add no-op fallbacks for `test`, `docs`, and `marimushka` in `book.mk` so the `book` target works even when their respective .mk files are not included. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tection. - Complete header description - Add `security` target (pip-audit and bandit) - Remove duplicate `typecheck` target (kept `mypy` with --strict) - Detect packages by finding `__init__.py` files instead of listing subdirs - Consistent quoting and dependencies Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
If src/src.mk is included, the source folder exists. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The src.mk file uses `mypy "src"` (with quotes) but the test expected `mypy src` (without quotes), causing the assertion to fail. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reduced the expected .PHONY targets in the test from {"book", "docs", "marimushka"} to {"book"}.
…old enforcement.
|
@HarryCampion I think .rhiza/.env should be under special protection and we should not be able to overwrite it |
…ual .mk files Each .mk file now declares its contribution to DEPTRY_FOLDERS, and the main deptry target runs once with all folders combined. marimo.mk also sets DEPTRY_IGNORE for the --ignore DEP004 flag when notebooks are involved. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Also adds Python file existence check to skip gracefully when no source files are present. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the Makefile structure by creating a dedicated src/src.mk module for source code-related targets. The refactoring moves type checking, documentation, and security scanning targets from their previous locations into a modular structure aligned with the rhiza framework's pattern of organizing targets by directory.
Changes:
- Created
src/src.mkwith targets for mypy, typecheck, docs, docs-coverage, and security analysis - Removed corresponding targets from
tests/tests.mkandbook/book.mk - Updated
.rhiza/rhiza.mkto use a more modular approach for deptry withDEPTRY_FOLDERScontributions - Added CI/CD jobs for docs-coverage and typecheck to GitHub and GitLab workflows
- Deleted example
src/hellomodule - Set
COVERAGE_FAIL_UNDER=0in.rhiza/.env(likely temporary for development)
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/src.mk | New module containing source code targets (mypy, typecheck, docs, docs-coverage, security) previously scattered across other makefiles |
| tests/tests.mk | Removed typecheck, security, mutate, and docs-coverage targets; simplified test target to use double-colon syntax |
| .rhiza/rhiza.mk | Refactored deptry target to use DEPTRY_FOLDERS variable contributed by modules; removed mypy target and includes src/src.mk |
| book/book.mk | Removed docs target and MARIMUSHKA_OUTPUT/LOGO_FILE definitions; added no-op fallback targets for modularity |
| book/marimo/marimo.mk | Added DEPTRY_FOLDERS contribution and DEPTRY_IGNORE setting |
| tests/test_rhiza/test_makefile.py | Updated mypy test assertions to match new src.mk implementation; commented out setup code |
| tests/test_rhiza/test_book.py | Updated test expectations for book.mk phony targets |
| .rhiza/.env | Set COVERAGE_FAIL_UNDER to 0 |
| .github/workflows/*.yml | Added docs-coverage and typecheck jobs to CI workflows |
| .gitlab/workflows/rhiza_ci.yml | Added docs-coverage job |
| src/hello/* | Deleted example hello module files |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
* Initial plan * Make quoting around "src" consistent in src.mk Co-authored-by: tschm <2046079+tschm@users.noreply.github.com> --------- Signed-off-by: Thomas Schmelzer <thomas.schmelzer@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tschm <2046079+tschm@users.noreply.github.com> Co-authored-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
* Initial plan * Remove commented-out code from test_mypy_target_dry_run Co-authored-by: tschm <2046079+tschm@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tschm <2046079+tschm@users.noreply.github.com> Co-authored-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
Signed-off-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
Signed-off-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
Signed-off-by: Thomas Schmelzer <thomas.schmelzer@gmail.com>
Summary
This PR introduces src/src.mk to consolidate source code targets and improves the modularity of the Makefile system.
Key changes:
Benefits: