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

Reorganize Project Structure for Improved Maintainability #85

Open
dwikler opened this issue Dec 10, 2024 · 5 comments
Open

Reorganize Project Structure for Improved Maintainability #85

dwikler opened this issue Dec 10, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@dwikler
Copy link
Collaborator

dwikler commented Dec 10, 2024

As the project has grown and evolved, its structure has become a bit mixed. The current structure combines CLI tools, UI applications, and libraries within one folder. As a result, some files are using the same filename in subfolders, with similar goal but different contents, some configuration files are duplicated. Progressively restructuring the project with separation of concern would improve maintainability and extensibility.

@dwikler dwikler added the enhancement New feature or request label Dec 10, 2024
@dwikler
Copy link
Collaborator Author

dwikler commented Dec 10, 2024

Here are 2 options we can discuss:

option 1

tdwii-plus-examples/
├── cli/
│   ├── wrklstmgr.py
│   └── watchwrkitem.py
├── apps/
│   ├── rtbdi_creator.py
│   └── tdd.py
├── conf/
│   ├── default.ini
│   └── known_ae.json
├── doc/
│   ├── cli.md
│   └── apps.md
├── tdwii_plus_examples/
│   ├── __init__.py
│   ├── basescp.py
│   └── echoscp.py
├── pyproject.toml
└── README.md

option 2

tdwii-plus-examples/
├── tdwii_plus_examples/
│   ├── __init__.py
│   ├── basescp.py
│   ├── echoscp.py
│   ├── cli/
│   │   ├── wrklstmgr.py
│   │   └── watchwrkitem.py
│   ├── apps/
│   │   ├── rtbdi_creator.py
│   │   └── tdd.py
│   ├── conf/
│   │   ├── default.ini
│   │   └── known_ae.json
│   └── doc/
│       ├── cli.md
│       └── apps.md
├── pyproject.toml
└── README.md

Notes: Poetry usually uses underscores for package folder when project name contains dashes

@sjswerdloff
Copy link
Owner

I agree that the file structure needs reorganising. I prefer option 2 vs option 1, but I think having a library directory that contains the reusable (and already reused) modules would be helpful.

@dwikler
Copy link
Collaborator Author

dwikler commented Dec 11, 2024

Let's go for option 2 then 👍 I can start by duplicating the BaseSCP class from TDWII_PPVS_subscriber to the tdwii_plus_examples package folder and refactor the apps to use it, then make my way down the hierarchy of SCP classes.

@dwikler dwikler mentioned this issue Dec 14, 2024
@dwikler
Copy link
Collaborator Author

dwikler commented Dec 14, 2024

I have created the pull request (#86) that refactors BaseSCP. I will continue with its subclass EchoSCP.

@dwikler
Copy link
Collaborator Author

dwikler commented Dec 31, 2024

The previous pull request (#87) refactored EchoSCP in CEchoSCP

A new pull request (#88) refactors its subclass StoreSCP in CStoreSCP
The next step is to refactor its subclass NEventReceiver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants