Skip to content

E0-F1-S1-T1: Create git-repo Makefile structure#52

Closed
matt-dresden-caylent wants to merge 6 commits intoGerritCodeReview:mainfrom
caylent-solutions:backlog/e0-f1-s1-t1
Closed

E0-F1-S1-T1: Create git-repo Makefile structure#52
matt-dresden-caylent wants to merge 6 commits intoGerritCodeReview:mainfrom
caylent-solutions:backlog/e0-f1-s1-t1

Conversation

@matt-dresden-caylent
Copy link

Summary

  • Replace legacy tox-based Makefile with standardized task runner skeleton
  • All required targets: lint, format, format-check, check, test, test-unit, test-functional, validate, clean, help
  • Correct dependency chain: validate → check + test, check → lint + format-check
  • Placeholder recipes for lint/format/test targets (to be filled in by E0-F1-S1-T2 and T3)

Test plan

  • 13/13 tests pass in tests/test_makefile_structure.py
  • make help lists all targets
  • make validate runs check + test chain
  • make clean removes all expected artifacts

feat: Add CPM support with envsubst command and development tooling

Adds CPM (Caylent Project Manager) support to git-repo with environment
variable substitution in manifests, comprehensive development tooling, and
test infrastructure improvements.

New Features:
- envsubst command: New `repo envsubst` subcommand for environment variable
  substitution in XML manifests
  - Supports ${ENVVAR} syntax in manifest files
  - Recursively processes all XML files in .repo/manifests/**/*.xml
  - Creates .bak backup files before modification
  - Comprehensive test coverage (237 test cases)

Repository Configuration:
- Updated REPO_URL to https://github.com/caylent-solutions/git-repo
- Updated BUG_URL to GitHub issues
- REPO_REV now lazy-loads latest caylent-* tag from GitHub API
- Added repo script to setup.py for proper installation

Development Environment:
- Devcontainer: Full VSCode devcontainer setup with all dependencies
- Makefile: Common tasks (test, lint, format, coverage, pre-commit)
- Git Hooks: Pre-push validation runs format, lint, and tests
- .tool-versions: Version pinning for pre-commit (4.0.1) and python (3.12.9)
- requirements-dev.txt: Development dependencies (tox, pytest, black, flake8, isort)

Cleanup:
- Removed all man pages (27 files, 3,282 lines deleted)
- Removed manpage generation scripts
- Removed Python 3.8 test runner (Python 3.12 only)
- Removed .coverage file from repository

Bug Fixes:
- Fixed file copy error handling in project.py (OSError → IOError)
- Removed unnecessary chmod operations on copied files
- Added REPO_REV environment variable to tests to prevent network calls

Testing:
- All 287 tests passing
- Added envsubst test suite with edge case coverage
- Simplified tox.ini to Python 3.12 only
- Tests now run without network dependencies

Files Changed:
- Added (10 files): devcontainer config, Makefile, git hooks, envsubst
  command/tests, requirements-dev.txt
- Modified (11 files): repo, project.py, pyproject.toml, tox.ini, run_tests,
  setup.py, .gitignore, .flake8, .isort.cfg, .tool-versions
- Deleted (30 files): All man pages, manpage generation scripts, .coverage
* fix: repo download

* Fix import order in repo file
…instructions

- Add Caylent fork notice to main README.md
- Create comprehensive CAYLENT-README.md with installation and usage
- Add one-liner to auto-fetch and install latest tag
- Document --no-repo-verify requirement until GPG signing is added
- Include uninstall instructions
- Reduce server_ready.wait timeout from 120s to 5s
- Reduce thread join timeout from 5s to 2s
- Add check for alive thread after join
- Prevents intermittent test hangs during git push hooks
Replace legacy tox-based Makefile with standardized task runner:
- SHELL := /bin/bash with .SHELLFLAGS := -euo pipefail -c
- All required .PHONY targets: lint, format, format-check, check,
  test, test-unit, test-functional, validate, clean, help
- Correct dependency chain: validate -> check + test, check -> lint + format-check
- Clean target removes __pycache__, .pytest_cache, .ruff_cache, htmlcov, .coverage
- Self-documenting help target using ## comments on each rule
- Placeholder recipes for lint/format/test targets (filled in by T2 and T3)
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Thanks for your contribution! Unfortunately, we don't use GitHub pull requests to manage code contributions to this repository. Instead, please see README.md which provides full instructions on how to get involved.

@github-actions github-actions bot closed this Mar 4, 2026
@google-cla
Copy link

google-cla bot commented Mar 4, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant