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
To organize the code and introduce testing and continuous integration, it would be beneficial to refactor the entire codebase.
TL;DR
Re-organizing the codebase to follow best practices and to introduce testing and continuous integration.
Separating 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, and tests to test the logic
Adding GitHub Actions to test build, logic of the package, auto-generate docs, and to publish the package to pypi
Moving from pip and requirements.txt setup to conda for environment management and poetry for packages management. This will ease the development as the project scales.
set of scripts to be used to train/evaluate or anything external from the logic of the package
run.sh
run_classifier.py
run_common_voice.py
run_mgb3.py
run_mgb5.py
sample_run.sh
tests
set of tests to test logics within klaam
test_*.py
conftest.py
misc
klaam_logo.png
samples
demo.wav
ckpts
...
checkpoints of pre-trained models that were downloaded
docs
...
documentation files
output
...
environment.yml
conda environment definition
install.sh
installing script to setup conda environment and install dependecies using poetry
mypy.ini
pylint configuration
pyproject.toml
package definition and list of dependecies to be installed
pytest.ini
pytest configuration
LICENSE
README.md
.gitignore
Environment/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 package
pytest is used to enable unit/integration testing of the codebase
Commands
poetry add PACKAGE - to add a package (this will append to pyproject.toml)
If the package installation failed and couldn't find another way to add the package, then install it using conda and add to enviroment.yml manually. (leave a comment next to the line)
Check on the web for the right channels when install packages using conda
poetry install - to install the package (package_name)
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)The text was updated successfully, but these errors were encountered: