First clone the project:
```bash
git clone https://github.com/IBM/unitxt.git
```
Then, navigate to the project directory:
```bash
cd unitxt
```
First, create a virtual environment:
```bash
python -m venv unitxt-venv
```
Then, activate the virtual environment:
```bash
source unitxt-venv/bin/activate
```
Then, install the project:
```bash
pip install -e ".[dev]"
```
First, install the pre-commit hooks:
```bash
pre-commit install
```
To run pre-commit before committing:
```bash
pre-commit run --all-files
```
Or simply run:
```bash
make pre-commit
```
This will run the pre-commit hooks on all files.
The pre-commit hooks will:
- Check for any linting errors
- Check for any formatting errors
- Check for any security vulnerabilities
- Check for spelling errors
- Verify you used relative imports inside src/ directory
- Verify you used library imports outside src/ directory
First, install the project with the test dependencies:
```bash
pip install -e ".[tests]"
```
To run a specific test:
```bash
python -m unittest tests.test_<module>
```
To run all the tests:
```bash
python -m unittest
```
Bef
Always pull --rebase before pushing:
```bash
git pull --rebase
```
If you have local changes you want to stash:
```bash
git pull --rebase --autostash
```
Use squash and merge to merge your PR to main.
Always commit with a good commit message and sign off:
Example:
```bash
git commit -s
```
Push into a new branch and open a PR.
Example:
```bash
git push origin main:<my-new-branch-name>
```
The layout of the repo is src layout