-
Notifications
You must be signed in to change notification settings - Fork 74
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
[Proposal] Codebase refactoring #18
Comments
Thanks, @sudomaze for your efforts :). @MagedSaeed any remarks on how to move forward with this? |
Thank much @sudomaze for this awesome effort. I can categorize this enhancement proposal into the following: restructuring the repo, improving the CI/CD experience, and more alignment with open source projects standards, and best practices. Let me break down and discuss each of them in further detail.
I just raised these comments as we are thinking of restructuring things. It should be also fine if we keep them unchanged.
|
Thanks, @MagedSaeed, for the feedback! Restructuring the project
Improving the CI/CD experience
More alignment with open source projects standards and best practices
|
That sounds really great. We can start with |
That sounds like a good plan! I will start working on the refactoring |
- Restructured the codebase as mentioned in the issue ARBML#18 - Unexpected changes: - Missing packages to run demo.ipynb: - jupyter - inflect - matplotlib - gdown - Change of hardcoded paths in FastSpeech2 to be passed paths to the module. - Removed inference.py as it doesn't correlate to anything actually being used in the library.
#21 summary:
Some things to be resolved in other PRs are:
|
To organize the code and introduce testing and continuous integration, it would be beneficial to refactor the entire codebase.
TL;DR
logic
to import the package as a separate module,scripts
to localize scripts that were used for train/inference of the logic,notebooks
to localize demos and simple scripts that were written as notebooks, andtests
to test the logicbuild
,logic
of the package, auto-generatedocs
, and topublish
the package topypi
pip
andrequirements.txt
setup toconda
for environment management andpoetry
for packages management. This will ease the development as the project scales.Codebase refactoring
Mapping
Tree Structure
pypi
klaam
conda
environment definitionconda
environment and install dependecies usingpoetry
pylint
configurationpytest
configurationEnvironment/dependencies packages
conda
is used to manage the environment and install essential libraries that are big/core to the package, e.g. TensorFlow, PyTorch, cudatools, etc.poetry
is used to manage dependencies and setup the packagepytest
is used to enable unit/integration testing of the codebaseCommands
poetry add PACKAGE
- to add a package (this will append topyproject.toml
)conda
and add toenviroment.yml
manually. (leave a comment next to the line)conda
poetry install
- to install the package (package_name
)pytest tests
- to run all tests manuallypytest tests/TEST_PATH
- to run a specific test file (check pytest documentation for more information)Edit - added the following sections: env/dep packages and commands
The text was updated successfully, but these errors were encountered: