diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000000000000000000000000000000000000..b360e75b77174cf1de7bfff0830f3efbe15bd715 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,96 @@ +Contributing +============ + +We are happy to welcome contributions! This guide will help you get started with contributing to the hypertool project. + +Set up +------ + +Download GIT repository +^^^^^^^^^^^^^^^^^^^^^^^ +Clone the hypertool repository from eclipse research labs. + +.. code-block:: bash + + $ git clone https://gitlab.eclipse.org/eclipse-research-labs/hyper-ai-project/hypertool.git + $ cd hypertool + +Creating a virtual environment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Create and activate a Python virtual environment to isolate dependencies. + +.. code-block:: bash + + $ python3 -m venv venv + $ source venv/bin/activate + +Note: + The target Python version is 3.11. + +Install the dependencies +^^^^^^^^^^^^^^^^^^^^^^^^ +Install required Python packages listed in the requirements file. + +.. code-block:: bash + + $ pip install --upgrade pip + $ pip install -r requirements.txt + +Install hypertool in editable mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Install the project in editable mode so changes reflect immediately. + +.. code-block:: bash + + $ pip install -e . + +Check the installation +^^^^^^^^^^^^^^^^^^^^^^ +Verify that the hypertool CLI is installed. + +.. code-block:: bash + + $ hypertool --version + +Set up the pre-commit hooks +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Install pre-commit hooks to automatically linting and formatting. + +.. code-block:: bash + + $ pre-commit install + + +How to contribute +----------------- + +Create a new branch +^^^^^^^^^^^^^^^^^^^^ +Create a feature branch to work on your changes. + +.. code-block:: bash + + $ git checkout -b my-feature-branch + +Make your changes and commit +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Stage and commit your changes with a meaningful commit message. + +.. code-block:: bash + + $ git add . + $ git commit -m "Add my-feature-branch" + +Notes: + 1. If this commit is mentioned by an issue, use the issue ID in the commit message. + For example: `refactor #1: Updated annotation logic to print all at once` + + 2. The pre-commit hooks may reformat your code to follow style guidelines. + +Push your changes +^^^^^^^^^^^^^^^^^ +Push your branch to the remote repository to open a merge request. + +.. code-block:: bash + + $ git push origin my-feature-branch diff --git a/README.rst b/README.rst index 9f752e8564773dadff4b9359dc11a22acec51b8f..eb05cfee397252be6181dd33817bca75b8640b28 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,9 @@ ========= Hypertool ========= + + +Contribution +============ + +Please follow the `Contribution Guidelines <CONTRIBUTING.rst>`_ to get started.