First clone the project:
git clone https://github.com/IBM/unitxt.git
Then, navigate to the project directory:
cd unitxt
First, create a virtual environment:
python -m venv unitxt-venv
Then, activate the virtual environment:
source unitxt-venv/bin/activate
Then, install the project:
pip install -e ".[dev]"
First, install the pre-commit hooks:
pre-commit install
To run pre-commit before committing:
pre-commit run --all-files
Or simply run:
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:
pip install -e ".[tests]"
To run a specific test:
python -m unittest tests.test_<module>
To run all the tests:
python -m unittest
Bef
We have tried to make it as easy as possible to make contributions. This applies to how we handle the legal aspects of contribution. We use the same approach - the Developer's Certificate of Origin 1.1 (DCO) - that the Linux® Kernel community uses to manage code contributions.
We simply ask that when submitting a patch for review, the developer must include a sign-off statement in the commit message.
Here is an example Signed-off-by line, which indicates that the submitter accepts the DCO:
Signed-off-by: John Doe john.doe@example.com You can include this automatically when you commit a change to your local git repository using the following command:
git commit -s
Always commit with a good commit message and sign off:
Example:
git commit -s
Push into a new branch and open a PR.
Example:
git push origin main:<my-new-branch-name>
Use squash and merge to merge your PR to main.
The layout of the repo is src layout