diff --git a/.gitignore b/.gitignore index 1685955..46032ec 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ __pycache__/ # Setup *.egg-info/ +build/ # Coverage output .coverage diff --git a/README.md b/README.md index 2f91362..42b7b49 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ if __name__ == "__main__": ``` > [!TIP] -> Make sure to check the [full documentation](https://FleksySDK.github.io/kebbie/usage/) for a detailed explanations of how to use the code ! +> Make sure to check the [full documentation](https://FleksySDK.github.io/kebbie/latest/usage/) for a detailed explanations of how to use the code ! --- @@ -100,7 +100,7 @@ kebbie evaluate -K ios --all_tasks ``` > [!TIP] -> Make sure to check the [full documentation](https://FleksySDK.github.io/kebbie/emulated_keyboard/) for a detailed explanations of how to setup emulators and how to use the command line ! +> Make sure to check the [full documentation](https://FleksySDK.github.io/kebbie/latest/emulated_keyboard/) for a detailed explanations of how to setup emulators and how to use the command line !

Contribute

@@ -111,28 +111,31 @@ To contribute, install the package locally, create your own branch, add your cod Pre-commit hooks are set to check the code added whenever you commit something. -If you never ran the hooks before, install it with : - -```bash -pre-commit install -``` - ---- +> [!NOTE] +> If you never ran the hooks before, install it with : +> ```bash +> pip install -e .[hook] +> pre-commit install +> ``` Then you can just try to commit your code. If your code does not meet the quality required by linters, it will not be committed. You can just fix your code and try to commit again ! ---- - -You can manually run the pre-commit hooks with : - -```bash -pre-commit run --all-files -``` +> [!TIP] +> You can manually run the pre-commit hooks with : +> ```bash +> pre-commit run --all-files +> ``` ### Tests When you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary ! +> [!NOTE] +> Install the dependencies for testing with : +> ```bash +> pip install -e .[test] +> ``` + You can run the tests with : ```bash @@ -141,7 +144,7 @@ pytest --- -Tests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developpers we want the pre-commit hooks to be fast ! +Tests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developers we want the pre-commit hooks to be fast ! Pre-commit hooks will not run the tests, but it will automatically update the coverage badge ! @@ -152,3 +155,9 @@ The documentation should be kept up-to-date. You can visualize the documentation ```bash mkdocs serve ``` + +> [!NOTE] +> Before running this command, you need to install the documentation dependencies : +> ```bash +> pip install -e .[docs] +> ``` diff --git a/docs/index.md b/docs/index.md index 7f44a42..8b7ae79 100644 --- a/docs/index.md +++ b/docs/index.md @@ -92,6 +92,7 @@ When you try to commit your code, hooks are automatically run, and if you code d !!! important If you never ran the hooks before, install it with : ```bash + pip install -e .[hook] pre-commit install ``` @@ -105,6 +106,12 @@ When you try to commit your code, hooks are automatically run, and if you code d When you contribute, you need to make sure all the unit-tests pass. You should also add tests if necessary ! +!!! info + Install the dependencies for testing with : + ```bash + pip install -e .[test] + ``` + You can run the tests with : ```bash @@ -112,7 +119,7 @@ pytest ``` !!! info - Tests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developpers we want the pre-commit hooks to be fast ! + Tests are not included in the pre-commit hooks, because running the tests might be slow, and for the sake of developers we want the pre-commit hooks to be fast ! !!! info Pre-commit hooks will not run the tests, but it will automatically update the coverage badge ! @@ -126,3 +133,9 @@ You can visualize the documentation locally by running : ```bash mkdocs serve ``` + +!!! info + Before running this command, you need to install the documentation dependencies : + ```bash + pip install -e .[docs] + ``` diff --git a/setup.py b/setup.py index 611c5c7..129eb9d 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ reqs = [ "regex", + "datasets~=2.18", "scipy~=1.12", "numpy~=1.26", "requests~=2.31", @@ -36,6 +37,8 @@ long_description_content_type="text/markdown", url="https://github.com/FleksySDK/kebbie", packages=setuptools.find_packages(), + package_data={"": ["layouts/*.json"]}, + include_package_data=True, classifiers=[ "Programming Language :: Python :: 3.9", "Operating System :: OS Independent",