[PR #147] [CLOSED] Resolve 4 TODO items with improvements to interpreter and diagram opt… #177

Closed
opened 2026-05-06 12:38:01 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/patrickchugh/terravision/pull/147
Author: @j00x
Created: 11/7/2025
Status: Closed

Base: mainHead: claude/review-todos-011CUsYqHeTrLWbt2kuyjqFQ


📄 Description

…ions

This commit addresses the following TODOs:

  1. modules/interpreter.py:424 - Add count attribute validation

    • Now checks if resource has a count attribute before adding [0]~1 suffix
    • Prevents unnecessary renaming for resources without count
  2. resource_classes/init.py:88 - Add label position option

    • Added labelloc parameter to Diagram.init (default: "t")
    • Allows users to control label positioning (top/bottom)
  3. resource_classes/init.py:89 - Add save directory option

    • Added output_dir parameter to Diagram.init
    • Updated render methods to use configurable output directory
    • Falls back to current directory if not specified
  4. modules/interpreter.py:107 - Implement regex validation

    • Replaced simple string matching with regex pattern
    • Validates that var./local./module./data. are preceded by proper boundaries
    • Prevents false positives from partial string matches

YOUR PR TITLE

Type of Change

  • Bug Fix
  • New Feature
  • Refactor
  • Documentation

Checklist

All Submissions:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written Documentation/Tests?
  • Have you read done your own code-review?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/patrickchugh/terravision/pull/147 **Author:** [@j00x](https://github.com/j00x) **Created:** 11/7/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `claude/review-todos-011CUsYqHeTrLWbt2kuyjqFQ` --- ### 📄 Description …ions This commit addresses the following TODOs: 1. modules/interpreter.py:424 - Add count attribute validation - Now checks if resource has a count attribute before adding [0]~1 suffix - Prevents unnecessary renaming for resources without count 2. resource_classes/__init__.py:88 - Add label position option - Added labelloc parameter to Diagram.__init__ (default: "t") - Allows users to control label positioning (top/bottom) 3. resource_classes/__init__.py:89 - Add save directory option - Added output_dir parameter to Diagram.__init__ - Updated render methods to use configurable output directory - Falls back to current directory if not specified 4. modules/interpreter.py:107 - Implement regex validation - Replaced simple string matching with regex pattern - Validates that var./local./module./data. are preceded by proper boundaries - Prevents false positives from partial string matches # YOUR PR TITLE ## Type of Change * [ ] Bug Fix * [ ] New Feature * [x] Refactor * [ ] Documentation ## Checklist All Submissions: * [x] Have you checked to ensure there aren't other open [Pull Requests](../../../pulls) for the same update/change? * [x] Have you written Documentation/Tests? * [x] Have you read done your own code-review? ### Changes to Core Features: * [x] Have you added an explanation of what your changes do and why you'd like us to include them? * [ ] Have you written new tests for your core changes, as applicable? * [ ] Have you successfully run tests with your changes locally? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:38:01 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/terravision#177
No description provided.