Skip to content

Conversation

@httpdss
Copy link
Owner

@httpdss httpdss commented Dec 19, 2024

Overview

This PR improves the handling of file paths within the generate and list commands of the struct_module.

Changes

  • Introduced consistent path resolution for contribs directory using os.path.dirname and os.path.realpath.
  • Simplified and clarified logic for determining file_path in generate.py.
  • Enhanced logic in list.py to aggregate structures from multiple directories (structures_path and contribs).
  • Ensured error handling and path existence checks are more robust and better logged.

Justification

  • Resolving paths centrally reduces redundancy and the risk of bugs.
  • Aggregating structures from multiple sources improves functionality and user experience.

Impact

  • Commands generate and list now handle paths more reliably.
  • Users benefit from more informative error messages and a broader set of structure files in the listing command.

…mline path resolution and enhance structure listing
@httpdss httpdss changed the title Refactor structure file handling in generate and list commands Improve Path Handling for Structure Commands Dec 19, 2024
@httpdss httpdss marked this pull request as ready for review December 19, 2024 12:34
@httpdss httpdss merged commit 671de90 into main Dec 19, 2024
2 of 4 checks passed
@httpdss httpdss deleted the custom-structures branch December 19, 2024 12:35
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.

2 participants