Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Improve Project Structure and Code Organization #31

Merged
merged 8 commits into from
Jan 19, 2025
Merged

Conversation

FloSch62
Copy link
Collaborator

[WIP] Refactor: Improve Project Structure and Code Organization

Problem

The current codebase, while functional, has several architectural challenges:

  1. Business logic is tightly coupled with CLI implementation
  2. Node type handling is not easily extensible
  3. Error handling is inconsistent across the codebase
  4. Dependencies are directly instantiated rather than injected
  5. Command implementation logic is mixed with CLI argument parsing

Solution

This PR introduces a cleaner architecture that:

  1. Separates concerns into distinct layers
  2. Introduces proper dependency injection
  3. Improves error handling and logging

Key Changes

1. Project Structure Reorganization

clab_connector/
├── cli/                  # CLI interface layer
├── models/              # Domain models
├── services/            # Business logic
├── clients/             # External system clients
└── utils/               # Shared utilities

Comment on lines 52 to 53
INTERFACE_GROUP = "interfaces.eda.nokia.com"
INTERFACE_VERSION = "v1alpha1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FloSch62 are these used anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no they can go, will remove it

@hellt hellt mentioned this pull request Jan 19, 2025
@FloSch62 FloSch62 marked this pull request as ready for review January 19, 2025 13:44
@FloSch62 FloSch62 merged commit e2638c7 into main Jan 19, 2025
@FloSch62 FloSch62 deleted the refactor branch January 19, 2025 13:46
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