Skip to content

Rename child-manifests to sub-manifests#1027

Merged
spoorcc merged 2 commits intomainfrom
rename-child-to-sub
Feb 27, 2026
Merged

Rename child-manifests to sub-manifests#1027
spoorcc merged 2 commits intomainfrom
rename-child-to-sub

Conversation

@spoorcc
Copy link
Contributor

@spoorcc spoorcc commented Feb 27, 2026

Rename child-manifest to sub-manifest to make concepts less confusing.

Summary by CodeRabbit

  • Refactor
    • Terminology updated throughout the project: "child-manifests" renamed to "sub-manifests" for consistency.
  • Documentation
    • User-facing docs, messages, and the changelog updated to use "sub-manifests" wording.
  • Tests
    • Test scenarios and feature descriptions revised to reflect the new sub-manifest naming.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

Warning

Rate limit exceeded

@spoorcc has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6d8d564 and 3b1eff9.

📒 Files selected for processing (10)
  • CHANGELOG.rst
  • dfetch/commands/check.py
  • dfetch/commands/common.py
  • dfetch/commands/update.py
  • dfetch/manifest/parse.py
  • doc/internal.rst
  • features/updated-project-has-dependencies.feature
  • tests/test_check.py
  • tests/test_manifest.py
  • tests/test_update.py

Walkthrough

Systematic rename of "child-manifests" to "sub-manifests" across code, docs, tests, and feature files. Public symbols renamed (e.g., get_childmanifestsget_submanifests, check_child_manifestscheck_sub_manifests). No functional control-flow changes.

Changes

Cohort / File(s) Summary
Changelog & Documentation
CHANGELOG.rst, doc/internal.rst
Updated changelog and internal docs to use "sub-manifests" terminology.
Command Handlers
dfetch/commands/check.py, dfetch/commands/update.py
Imports and calls updated: check_child_manifestscheck_sub_manifests; user-facing flag/description text updated.
Common Commands Module
dfetch/commands/common.py
Public function renamed check_child_manifestscheck_sub_manifests; internal vars/strings and import (get_childmanifestsget_submanifests) updated; _make_recommendation param renamed.
Manifest Parsing
dfetch/manifest/parse.py
Public function renamed get_childmanifestsget_submanifests; accumulator/locals renamed and added guard to skip sub-manifest paths outside root.
Tests
tests/test_check.py, tests/test_manifest.py, tests/test_update.py
Mocks, imports, and assertions updated to reference get_submanifests; mock names adjusted accordingly.
Feature Tests
features/updated-project-has-dependencies.feature
Fixture/project names and scenario text updated to reference manifests/sub-manifests (renamed test projects and messages).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • #927: Refactors manifest parsing and relocates related functions; touches get_childmanifests/get_submanifests and call sites.
  • #915: Related changes around superproject wiring and check_child_manifests usage; overlaps with terminology/call-site updates.

Suggested labels

development, documentation

Suggested reviewers

  • ben-edna
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: renaming child-manifests to sub-manifests across the codebase, documentation, and tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rename-child-to-sub

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
dfetch/manifest/parse.py (1)

100-100: Minor: Use singular form in log message.

The log message refers to a single path but uses the plural form "sub-manifests".

Proposed fix
-            logger.debug(f"Found sub-manifests {path}")
+            logger.debug(f"Found sub-manifest {path}")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dfetch/manifest/parse.py` at line 100, Change the log message string used in
the logger.debug call that currently reads "Found sub-manifests {path}" to the
singular form "Found sub-manifest {path}" (the call using logger.debug and the
variable path in parse.py); update the message text only so it correctly
reflects a single path.
dfetch/commands/common.py (1)

25-27: Use a precomputed set for remote URL membership checks.

Line 25 rebuilds a list on every subproject iteration and reuses project as the inner variable name, which hurts readability and scales poorly.

♻️ Suggested refactor
 def check_sub_manifests(manifest: Manifest, project: ProjectEntry) -> None:
@@
-    for submanifest in get_submanifests(skip=[manifest.path]):
+    manifest_remote_urls = {
+        parent_project.remote_url for parent_project in manifest.projects
+    }
+    for submanifest in get_submanifests(skip=[manifest.path]):
         recommendations: list[ProjectEntry] = []
         for subproject in submanifest.projects:
-            if subproject.remote_url not in [
-                project.remote_url for project in manifest.projects
-            ]:
+            if subproject.remote_url not in manifest_remote_urls:
                 recommendations.append(subproject.as_recommendation())
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dfetch/commands/common.py` around lines 25 - 27, Precompute a set of existing
remote URLs before iterating subproject to avoid rebuilding the list and
inner-variable shadowing; e.g., create a set from manifest.projects' remote_url
values (use a name like existing_remote_urls) and then replace the condition "if
subproject.remote_url not in [project.remote_url for project in
manifest.projects]" with a membership check against that set (if
subproject.remote_url not in existing_remote_urls), ensuring you remove the
inner "project" list comprehension to improve readability and performance.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.rst`:
- Line 5: Replace the placeholder issue reference "(`#0`)" with the correct PR
number "(`#1027`)" in the CHANGELOG.rst entry that renames "child-manifests" to
"sub-manifests" so the changelog reads "* Rename child-manifests to
sub-manifests in documentation and code (`#1027`)"; update only the issue number
token in that line.

---

Nitpick comments:
In `@dfetch/commands/common.py`:
- Around line 25-27: Precompute a set of existing remote URLs before iterating
subproject to avoid rebuilding the list and inner-variable shadowing; e.g.,
create a set from manifest.projects' remote_url values (use a name like
existing_remote_urls) and then replace the condition "if subproject.remote_url
not in [project.remote_url for project in manifest.projects]" with a membership
check against that set (if subproject.remote_url not in existing_remote_urls),
ensuring you remove the inner "project" list comprehension to improve
readability and performance.

In `@dfetch/manifest/parse.py`:
- Line 100: Change the log message string used in the logger.debug call that
currently reads "Found sub-manifests {path}" to the singular form "Found
sub-manifest {path}" (the call using logger.debug and the variable path in
parse.py); update the message text only so it correctly reflects a single path.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d1524cd and c18cfcc.

📒 Files selected for processing (10)
  • CHANGELOG.rst
  • dfetch/commands/check.py
  • dfetch/commands/common.py
  • dfetch/commands/update.py
  • dfetch/manifest/parse.py
  • doc/internal.rst
  • features/updated-project-has-dependencies.feature
  • tests/test_check.py
  • tests/test_manifest.py
  • tests/test_update.py

@spoorcc spoorcc force-pushed the rename-child-to-sub branch from 6d8d564 to 3b1eff9 Compare February 27, 2026 20:16
@spoorcc spoorcc merged commit bbdabd4 into main Feb 27, 2026
35 checks passed
@spoorcc spoorcc deleted the rename-child-to-sub branch February 27, 2026 20:21
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