You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: Setup.py Update Needed for Improved Importing of Components
Description
Currently, our project uses a workaround that requires manually adding the components folder to the sys.path for it to be imported from anywhere in the project. The relevant code snippet is shown below:
# TODO: fix this hack with a proper setup.py
# Things to do: In setup.py, add a command to copy the components folder to the site-packages folder
# Then, in omnivorex.py, add the site-packages folder to the sys.path
# This will allow the components folder to be imported from anywhere
# Use this as a reference: https://stackoverflow.com/questions/6323860/sibling-package-imports
# sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import omnivorex.utils as utils
from omnivorex.components.article_item import ArticleItem
from omnivorex.components.login_screen import LoginScreen
Tasks
Update setup.py to include a command to copy the components folder to the site-packages directory.
In omnivorex.py, update sys.path to include the site-packages directory.
Verify that the components folder can be imported from anywhere in the project.
Remove the manual addition of the components folder to sys.path.
Acceptance Criteria
The components folder is automatically copied to the site-packages directory during setup.
The omnivorex.py file automatically includes the site-packages directory in sys.path.
Components can be imported from anywhere in the project without manual intervention.
All existing functionality remains intact and passes all tests.
The text was updated successfully, but these errors were encountered:
Title: Setup.py Update Needed for Improved Importing of Components
Description
Currently, our project uses a workaround that requires manually adding the components folder to the sys.path for it to be imported from anywhere in the project. The relevant code snippet is shown below:
Tasks
Acceptance Criteria
The text was updated successfully, but these errors were encountered: