Skip to content

Refactor Commands to Handle Default Structure Paths#13

Merged
httpdss merged 4 commits into
mainfrom
add-lists
Sep 23, 2024
Merged

Refactor Commands to Handle Default Structure Paths#13
httpdss merged 4 commits into
mainfrom
add-lists

Conversation

@httpdss
Copy link
Copy Markdown
Owner

@httpdss httpdss commented Sep 23, 2024

Overview:

This pull request refactors the command modules in generate.py and list.py to handle cases where the structures_path argument is not provided, falling back to a default path.

Changes:

  • generate.py:
    • Removed the default value for --structures-path argument.
    • Added logic to fallback to a default path (contribs) if no path is provided.
  • list.py:
    • Modified the list command to handle optional structures-path.
    • Implemented fallback logic to default contribs directory when no path is specified.

Justification:

This refactor allows for greater flexibility when using the commands by enabling the user to provide custom paths for structure definitions or rely on the default path if none is supplied.

Impact:

  • Improves the robustness of the commands by ensuring default paths are used if the user does not explicitly specify a path.
  • Simplifies the interface for users running commands without additional configuration.

@httpdss httpdss changed the title Add-lists Refactor Commands to Handle Default Structure Paths Sep 23, 2024
@httpdss httpdss self-assigned this Sep 23, 2024
@httpdss httpdss marked this pull request as ready for review September 23, 2024 14:49
@httpdss httpdss added the bug Something isn't working label Sep 23, 2024
@httpdss httpdss merged commit fa7c0b8 into main Sep 23, 2024
@httpdss httpdss deleted the add-lists branch September 23, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant