Skip to content

Fix packaging: include module_library as subpackage - #11

Open
GuptaVishu2002 wants to merge 1 commit into
molML:mainfrom
GuptaVishu2002:fix-module-library-packaging
Open

Fix packaging: include module_library as subpackage#11
GuptaVishu2002 wants to merge 1 commit into
molML:mainfrom
GuptaVishu2002:fix-module-library-packaging

Conversation

@GuptaVishu2002

Copy link
Copy Markdown

This PR fixes a packaging issue where s4dd/module_library exists in the source tree but is not installed as part of the Python package.

Changes:

  • Add a missing __init__.py to s4dd/module_library
  • Update setup.py to include subpackages via find_packages()

With this change, s4dd.module_library can be imported correctly after installation, allowing users to install and use the package directly via pip without relying on manual path setup or additional scripts. This also makes it easier to depend on and reference this package cleanly in downstream applications.

This addresses the import issue reported in #10. Happy to adjust if a different packaging approach is preferred.

Copilot AI review requested due to automatic review settings December 25, 2025 01:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a packaging issue where the s4dd/module_library subpackage was not being installed. The fix enables proper installation via pip and allows downstream applications to import s4dd.module_library without requiring manual path setup.

  • Added empty __init__.py file to s4dd/module_library/ to mark it as a Python package
  • Updated setup.py to use find_packages() instead of manually listing packages

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
setup.py Imports find_packages and uses it to automatically discover all packages including the previously missing s4dd.module_library subpackage
s4dd/module_library/init.py New empty file that marks the directory as a Python package, enabling it to be discovered by find_packages()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup.py
author="Rıza Özçelik",
author_email="r.ozcelik@tue.nl",
packages=["s4dd"],
packages=find_packages(),

Copilot AI Dec 25, 2025

Copy link

Choose a reason for hiding this comment

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

Consider adding explicit exclusions to find_packages() to prevent accidental inclusion of non-package directories if they gain __init__.py files in the future. For example: find_packages(exclude=['examples', 'examples.*', 'docs', 'docs.*', 'datasets', 'datasets.*', 'site', 'site.*']). This is a best practice that makes the packaging intent explicit and prevents issues if these directories are modified later.

Suggested change
packages=find_packages(),
packages=find_packages(exclude=['examples', 'examples.*', 'docs', 'docs.*', 'datasets', 'datasets.*', 'site', 'site.*']),

Copilot uses AI. Check for mistakes.
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