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

Remove __init__.py as they are no longer necessary. #112

Merged
merged 3 commits into from
Jan 9, 2022
Merged

Conversation

ctn
Copy link
Contributor

@ctn ctn commented Jan 8, 2022

See #111

@ctn ctn requested review from Shiti and nhanitvn January 8, 2022 05:26
@ctn ctn assigned Shiti and nhanitvn Jan 8, 2022
@ctn ctn linked an issue Jan 8, 2022 that may be closed by this pull request
@ctn
Copy link
Contributor Author

ctn commented Jan 8, 2022

cc @TheVinhLuong102 @phanhongan

@nhanitvn
Copy link
Contributor

nhanitvn commented Jan 8, 2022

I think we just need to delete empty __init__.py files which are only needed by Python 2. The __init__.py files are also used to expose sub-modules, classes to avoid long/awkward import statements, for example from h1st.model.repository import ModelRepository instead of from h1st.model.repository.model_repository import ModelRepository and common/initialization code/documentation for that sub-module. So we should only delete __init__.py files with unnecessary code/documentation.

@ctn
Copy link
Contributor Author

ctn commented Jan 8, 2022 via email

@nhanitvn
Copy link
Contributor

nhanitvn commented Jan 8, 2022

OK. Then could you help update the import statement in h1st/core/context.py too. Currently it is from h1st.model.repository import ModelRepository.

@ctn
Copy link
Contributor Author

ctn commented Jan 8, 2022 via email

of the file, rather than inline, for easier maintenance.
@ctn
Copy link
Contributor Author

ctn commented Jan 9, 2022

"All checks have passed." 😎

Please merge and close out #111 @nhanitvn @Shiti cc @TheVinhLuong102

@nhanitvn nhanitvn merged commit 722886d into main Jan 9, 2022
@ctn ctn deleted the trimmings branch January 9, 2022 17:35
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.

Clean up blank __init__.py files, which are not required by Python 3.x
3 participants