parsi.io welcomes any constructive contribution from the community and the team is more than willing to work on problems you have encountered to make it a better project.
please read the contribution guide to optimize your contribution
To contribute to parsi.io, we would like to first guide you to set up a proper development environment so that you can better implement your code. It is good to install this system from source with the editable
flag (-e
, for development mode) so that your change to the source code will be reflected in runtime without repeated installation and uninstallation. Here are the steps to set up the development environment.
- Uninstall any existing parsi.io distribution.
pip uninstall parsi.io
- Clone the repository to local workspace
git clone https://github.com/language-ml/parsi.io.git
cd parsi.io
- Install using pip with -e flag.
pip install <options> -e .
You need to follow these steps below to make contribution to the main repository via pull request. You can learn about the details of pull request here.
Firstly, you need to visit the Parsi.io repository and fork into your own account. The fork
button is at the right top corner of the web page alongside with buttons such as watch
and star
.
Now, you can clone your own forked repository into your local environment.
git clone https://github.com/<YOUR-USERNAME>/parsi.io.git
You need to set the official repository as your upstream so that you can synchronize with the latest update in the official repository. You can learn about upstream here.
Then add the original repository as upstream
cd parsi.io
git remote add upstream https://github.com/language-ml/parsi.io.git
you can use the following command to verify that the remote is set. You should see both origin
and upstream
in the output.
git remote -v
Before you make changes to the codebase, it is always good to fetch the latest updates in the official repository. In order to do so, you can use the commands below.
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
Otherwise, you can click the fetch upstream
button on the github webpage of the main branch of your forked repository. Then, use these commands to sync.
git checkout main
git fetch main
You should not make changes to the main
branch of your forked repository as this might make upstream synchronization difficult. You can create a new branch with the appropriate name. General branch name format should start with hotfix/
and feature/
. hotfix
is for bug fix and feature
is for addition of a new feature.
For example, if you are adding a name extraction module a proper name could be: feature/add-name-extraction
git checkout -b <NEW-BRANCH-NAME>
Now you can implement your code change in the source code. Remember that you installed the system in development, thus you do not need to uninstall and install to make the code take effect. The code change will be reflected in every new PyThon execution. You can commit and push the changes to your local repository. The changes should be kept logical, modular and atomic. Furthermore, make sure all tests in the parsi_io/test directory are running smoothly after your contribution. If you are adding a new feature, add proper tests to the mentioned directory.
git add <CHANGED FILES ADDRESS>
git commit -m "<COMMIT-MESSAGE>"
git push -u origin <NEW-BRANCH-NAME>
Make sure you add your name as a contributor to the list of contributors in the README file.
You can now create a pull request on the GitHub webpage of your repository. The source branch is <NEW-BRANCH-NAME>
of your repository and the target branch should be main
of language-ml/parsi.io
. After creating this pull request, you should be able to see it here.
Write clearly what feature you are working on and what features from parsi.io you have used for it.
In case of code conflict, you should rebase your branch and resolve the conflicts manually.