From 368ebcebd0939bfed323ec9aee1caffab0d1f824 Mon Sep 17 00:00:00 2001 From: Mohamed Nasser Date: Thu, 18 Jul 2024 16:31:45 +0300 Subject: [PATCH] Added how to contribute in the developer guide --- README.md | 2 ++ docs-mk/docs/contribution/index.md | 36 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/README.md b/README.md index 9f3eed0..4546465 100755 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ We welcome contributions to OSIPI! To contribute, follow these steps: - Make your changes and commit them with descriptive messages. - Push your changes to your fork. - Submit a pull request to the main OSIPI repository. + +For more details on how to contribute, visit the [Developer Guide](https://osipi.github.io/pypi/developers_guide/index.html). #### As mentioned before, this project is still in the early stages of development. If you'd like to contribute by adding functionality, we recommend opening an issue first to discuss your proposed functionality and the best ways to implement it. ## Details diff --git a/docs-mk/docs/contribution/index.md b/docs-mk/docs/contribution/index.md index d2d49e0..8dc5d64 100644 --- a/docs-mk/docs/contribution/index.md +++ b/docs-mk/docs/contribution/index.md @@ -4,6 +4,42 @@ There are multiple ways to contribute to `osipi` and we welcome them all. `osipi The way to do this is by making a pull request on GitHub. If you are not familiar with GitHub pull requests, it is not as scary as it sounds. The simplest way is to find the file that you want to edit on GitHub in your browser, edit it manually and follow the prompts to create a fork and pull request. +## Making a Pull Request (PR) to the OSIPI Package +### Step 1: Fork the Repository +First, fork the OSIPI repository to your GitHub account and make a new branch with the your new feature or bug fix. + +### Step 2: Set Up Your Development Environment +After creating a fork, you have two options: +#### Option 1: Use Poetry + +1. **Install Poetry**: If you don't have Poetry installed, follow the instructions [here](https://python-poetry.org/docs/#installation). +2. **Install Dependencies**: Run the following command in your terminal: + ```sh + poetry install + ``` +#### Option 2: Use Requirements File + +1. **Install Dependencies**: Run the following command in your terminal: + ```sh + pip install -r requirements.txt + ``` + +### Step 3: Make Your Contribution +Make your changes or add your contribution to the codebase. + +### Step 4: Run Pre-commit Checks +Before pushing your changes, run pre-commit checks to ensure your code meets the project's standards. + +1. Run the following command in your terminal: + ```sh + pre-commit run --all-files + ``` + +### Step 5: Push Your Changes and Create a PR +1. Push your changes to your forked repository. +2. Create a pull request (PR) to the main OSIPI repository. + + ## How to Contribute Examples One way to contribute is by providing examples of how you used `osipi` for a specific task. These are usually real-world examples with a relevant aim, perhaps to derive some results that you have published. To package these up as an example, follow these steps: