Skip to content

Conversation

@httpdss
Copy link
Owner

@httpdss httpdss commented Nov 3, 2024

Overview

This PR introduces a skip property to the file_item.py module, enabling the option to bypass file creation based on conditional settings.

Changes

  • Added skip property: The constructor now initializes the skip property based on input properties, defaulting to False if not specified.
  • Conditional file creation: Modified the create method to check the skip property. When set to True, the process logs that file creation is skipped and exits early.

Justification

The ability to conditionally skip file creation is essential for workflows that require selective file management. This update allows greater control over file generation without altering existing logic.

Impact

This enhancement reduces unnecessary file creation, optimizing resource use, especially in large projects or in cases where specific files are conditionally excluded. No breaking changes are introduced, ensuring compatibility with existing workflows.

@httpdss httpdss linked an issue Nov 3, 2024 that may be closed by this pull request
@httpdss httpdss self-assigned this Nov 3, 2024
@httpdss httpdss changed the title Refactor FileItem class to include skip property for skipping file creation Add skip property to file_item.py to support conditional file creation Nov 3, 2024
@httpdss httpdss merged commit 1cc6007 into main Nov 5, 2024
4 checks passed
@httpdss httpdss deleted the 19-add-skip-param-on-fileitem branch November 5, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add skip param on FileItem

2 participants