From 088315eb7468bb8adbfe62b4bd6d052b0f68feae Mon Sep 17 00:00:00 2001 From: Michael Loukeris <michael.loukeris@icloud.com> Date: Wed, 9 Apr 2025 10:49:41 +0300 Subject: [PATCH] docs: Added CONTRIBUTING.rst --- CONTRIBUTING.rst | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 6 +++ 2 files changed, 102 insertions(+) create mode 100644 CONTRIBUTING.rst diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..b360e75 --- /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 9f752e8..eb05cfe 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,9 @@ ========= Hypertool ========= + + +Contribution +============ + +Please follow the `Contribution Guidelines <CONTRIBUTING.rst>`_ to get started. -- GitLab