Skip to content

refactor: restructure project into a proper Python package layout (v2026.5.6)#73

Merged
advaitpatel merged 2 commits into
mainfrom
updating-the-folder-structure
May 6, 2026
Merged

refactor: restructure project into a proper Python package layout (v2026.5.6)#73
advaitpatel merged 2 commits into
mainfrom
updating-the-folder-structure

Conversation

@advaitpatel
Copy link
Copy Markdown
Collaborator

Summary

This PR overhauls the DockSec project structure, moving from a flat layout to a standard Python package structure. These changes make the codebase cleaner, more maintainable, and production-ready, aligning with industry standards for Python open-source projects.

Key Changes

  • Package Restructuring: Created a core docksec/ package directory and moved all logic files (config.py, docker_scanner.py, utils.py, etc.) into it.
  • CLI Entry Point: Renamed the main entry point to docksec/cli.py and updated setup.py to point to the new location.
  • Code Cleanup: Removed redundant main.py and Windows metadata artifacts (*:Zone.Identifier) that were cluttering the repository.
  • Imports & Paths: Updated all internal imports to absolute package imports and fixed file path logic for loading templates within the package.
  • Packaging & Distribution: Updated setup.py, MANIFEST.in, and pyproject.toml to ensure proper distribution and inclusion of all package data.
  • Documentation: Updated README.md and CONTRIBUTING.md to reflect the new structure and added a CHANGELOG.md entry for this overhaul.

Test Plan

  • CLI Verification: Confirmed that python3 -m docksec.cli --help works correctly.
  • Automated Tests: Ran the full test suite using pytest. All 17 unit and integration tests passed successfully after the restructuring.

Advait Patel added 2 commits May 6, 2026 17:52
- Package Restructuring
- Code Cleanup
- Import & Path Updates
- Packaging & Distribution
@advaitpatel advaitpatel changed the title refactor: restructure project into a proper Python package layout refactor: restructure project into a proper Python package layout (v2026.5.6) May 6, 2026
@advaitpatel advaitpatel merged commit 934d42d into main May 6, 2026
6 checks passed
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.

1 participant