Skip to content

Commit

Permalink
🔀 Merge pull request #5 from FleksySDK/fix_kebbie
Browse files Browse the repository at this point in the history
Fix installation + improve documentation
  • Loading branch information
astariul authored Mar 27, 2024
2 parents b0d1eee + 03e4212 commit be9927f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ __pycache__/

# Setup
*.egg-info/
build/

# Coverage output
.coverage
Expand Down
43 changes: 26 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 !
---

Expand All @@ -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 !

<h2 align="center">Contribute</h2>
Expand All @@ -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
Expand All @@ -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 !
Expand All @@ -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]
> ```
15 changes: 14 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -105,14 +106,20 @@ 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
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 !
Expand All @@ -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]
```
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

reqs = [
"regex",
"datasets~=2.18",
"scipy~=1.12",
"numpy~=1.26",
"requests~=2.31",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit be9927f

Please sign in to comment.