Skip to content

LCORE-679: Ignore temporary directories#991

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-679-ignore-temporary-directories
Jan 14, 2026
Merged

LCORE-679: Ignore temporary directories#991
tisnik merged 1 commit intolightspeed-core:mainfrom
tisnik:lcore-679-ignore-temporary-directories

Conversation

@tisnik
Copy link
Contributor

@tisnik tisnik commented Jan 14, 2026

Description

LCORE-679: Ignore temporary directories

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Tools used to create PR

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #LCORE-679

Summary by CodeRabbit

  • Chores
    • Improved documentation generation script to skip cache directories during processing and clarify documentation creation for source modules only.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Walkthrough

The scripts/gen_doc.py script is updated to skip directories containing .mypy_cache in their paths during documentation generation. A comment is added referencing LCORE-679, clarifying that README.md files should only be created for source modules.

Changes

Cohort / File(s) Summary
Directory traversal filter update
scripts/gen_doc.py
Extended directory-exclusion logic to skip .mypy_cache directories alongside existing exclusions (lightspeed_stack.egg-info, __pycache__, .ruff_cache). Added inline comment referencing LCORE-679 regarding README.md creation scope.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • LCORE-581: refactored gendoc script #449: Refactored directory traversal and README generation logic in scripts/gen_doc.py with generate_docfile() and generate_documentation_on_path() functions, providing foundation for this filter update.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: ignoring temporary directories in the doc generation script, which aligns with the LCORE-679 issue and the code modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
scripts/gen_doc.py (1)

71-80: LGTM! The fix correctly excludes .mypy_cache directories.

The implementation follows the existing pattern for cache directory exclusion (matching .ruff_cache on line 76). The comment referencing LCORE-679 provides helpful context.

Optional: For improved maintainability, consider consolidating the cache directory patterns into a constant:

♻️ Optional refactor
 DIRECTORIES = ["src", "tests/unit", "tests/integration", "tests/e2e"]
+EXCLUDED_DIRS = {"lightspeed_stack.egg-info", "__pycache__"}
+EXCLUDED_CACHE_PATTERNS = {".ruff_cache", ".mypy_cache"}

Then in main():

-                if (
-                    path.name == "lightspeed_stack.egg-info"
-                    or path.name == "__pycache__"
-                    or ".ruff_cache" in str(path)
-                    or ".mypy_cache" in str(path)
-                ):
-                    continue
+                if path.name in EXCLUDED_DIRS or any(
+                    pattern in str(path) for pattern in EXCLUDED_CACHE_PATTERNS
+                ):
+                    continue

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c8a7ff and 5dd430e.

📒 Files selected for processing (1)
  • scripts/gen_doc.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: Use absolute imports for internal modules: from authentication import get_auth_dependency
Use FastAPI dependencies: from fastapi import APIRouter, HTTPException, Request, status, Depends
Use Llama Stack imports: from llama_stack_client import AsyncLlamaStackClient
Check constants.py for shared constants before defining new ones
All modules start with descriptive docstrings explaining purpose
Use logger = logging.getLogger(__name__) pattern for module logging
Type aliases defined at module level for clarity
All functions require docstrings with brief descriptions
Complete type annotations for function parameters and return types, using typing_extensions.Self for model validators
Use union types with modern syntax: str | int instead of Union[str, int]
Use Optional[Type] for optional parameters
Use snake_case with descriptive, action-oriented function names (get_, validate_, check_)
Avoid in-place parameter modification anti-patterns; return new data structures instead
Use async def for I/O operations and external API calls
Handle APIConnectionError from Llama Stack in error handling
Use logger.debug() for detailed diagnostic information
Use logger.info() for general information about program execution
Use logger.warning() for unexpected events or potential problems
Use logger.error() for serious problems that prevented function execution
All classes require descriptive docstrings explaining purpose
Use PascalCase for class names with descriptive names and standard suffixes: Configuration, Error/Exception, Resolver, Interface
Use ABC for abstract base classes with @abstractmethod decorators
Complete type annotations for all class attributes
Follow Google Python docstring conventions (https://google.github.io/styleguide/pyguide.html) with sections: Args, Returns, Raises, Attributes
Run uv run make format to auto-format code with black and ruff before completion
Run uv run make verify to run all linters (black, pyl...

Files:

  • scripts/gen_doc.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build-pr
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: E2E: library mode / ci
  • GitHub Check: E2E: server mode / ci

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

@tisnik tisnik merged commit 9888320 into lightspeed-core:main Jan 14, 2026
19 of 23 checks passed
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