Skip to content

Contributing Guidelines

Simone Porreca edited this page Sep 15, 2025 · 1 revision

This page illustrates how to contribute to the DataGrimorium repository.

Please follow the steps listed below.

1. Create Issue & Branch

  • From the GitHub repository page, go to the Projects tab
  • Select the GitHub Project DataGrimorium Project (or go directly to DataGrimorium Project)
  • Under the In Progress column, select Add Item
  • Give the issue a proper name following the convention <Feature Name> (e.g., Develop Linear Regression Model)
  • Click on the new created issue
  • Click on Convert to an issue and select the DruidicGroveAI GitHub repository
  • Fill the following fields:
    • Description
      • Feature Description (As a ..., I want do ..., In order to ...)
      • Changelog (list of changes)
    • Assignees
    • Labels
    • Milestones (Choose the topic more related to your feature. If not present, contact the repository admin to create a new milestone.)
    • Priority
    • Size
  • Click on Open in a new tab
  • Select Create a new branch with the following convention <name-of-the-feature> (e.g., develop-linear-regression-model) and ensure to use the dev branch as the source
  • Change the status of the Issue to In Progress (If not already done)

2. Implement Feature

  • Ensure to select the correct path/file to implement the new feature
  • If you are creating a new module, ensure to include a Docstring module description before the imports as in the below example:
"""
This test module includes all the tests for the
module src.general.general_utils
"""
# Import Standard Modules
import pytest
  • Ensure to include Docstrings and Typing as in the following sample code:
def test_general_utils(name: str) -> str:
    """
    Test the import of general_utils function

    Args:
        name: String name to return

    Returns:
        message: String sentence to display
    """
  • Include all the necessary PyTest tests under the appropriate file in test.<file_name>.py. If the appropriate <file_name>.py does not exist, create a new one following the convention test_<module_name>.py. If in doubt, consult the repository admin. Implement the tests as in the following sample code:
@pytest.mark.parametrize('input_status, expected_output', [
    ('OK', 'Generaul utils dummy function  execution result: OK'),
    ('KO', 'Generaul utils dummy function  execution result: KO')
])
def test_general_utils_dummy_function(input_status: str, 
                                      expected_output: str) -> bool:
    """
    Test the function src.general.general_utils.general_utils_dummy_function

    Args:
        input_status: String status value
        expected_output: String expected output sentence

    Returns:
    """

    assert expected_output == general_utils_dummy_function(input_status)
  • After any push, the GitHub Workflow Pre-commit Workflow is triggered. Check its execution in order to ensure everything is okay
  • Where necessary, include any special installation requirement for your function in the README.md file (e.g., install a library in the OS, etc.)
  • Document the new function in the Wiki section of the GitHub Repository. Use the example below:
# src
## general
### general_utils
* **general_utils_dummy_function** - It is used to test the import of the whole package and to construct the first issue of the repository.

3. Create the Pull Request

  • Go under the Pull Requests tab in the GitHub Repository page
  • Click New Pull Request
  • Ensure to select the base branch as dev and the compare branch as the your feature branch (NOTE: No PR from a feature branch to the main branch is allowed and it would be automatically rejected)
  • Click on Create Pull Request
  • Ensure to fill the name of the PR with the name of the Issue (e.g., Develop Linear Regression Model)
  • Ensure to fill the comment below as in the example below:
# Description
The PR resolves [#Link to the Issue] issue, which is related to implement contributing guidelines for this repository.

# Changelog
- Poetry init
- Refactor test_genera_utils name
- Define the pytest for the above function
- Remove unnecessary folders (model and notebooks and, maybe, configuration also)
- Add function specs in the wiki
- Add GitHub Workflow for pre-commit (PyLint)
- Add GitHub Workflow for PR (PyTest)
- Test Workflow for PR
  • Fill the following fields:
    • Reviewers
    • Assignees (at least yourself)
    • Labels
    • Projects
    • Milestone
  • Create the PR

Clone this wiki locally