Skip to content

Set up general_utils as installable Python package for use in other projects#1

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/link-git-repo-to-github
Draft

Set up general_utils as installable Python package for use in other projects#1
Copilot wants to merge 3 commits intomainfrom
copilot/link-git-repo-to-github

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 23, 2025

Overview

This PR transforms the general_utils repository into a fully functional Python package that can be installed from GitHub and used across multiple projects.

Problem Statement

The repository was initialized with Git and linked to GitHub, but lacked the structure needed to use its Python functions in other projects. Users needed a way to install and import common custom functions from this repository.

Changes Made

Package Structure

  • Created general_utils/ package directory with proper __init__.py initialization
  • Added version tracking (v0.1.0) and author metadata in the package

Installation Support

  • Added setup.py with complete package configuration for pip installation
  • Package can now be installed directly from GitHub using:
    pip install git+https://github.com/DaveCacci/general_utils.git

Example Utilities

  • Created general_utils/example_utils.py with sample functions:
    • greet(name) - Simple greeting function
    • add_numbers(a, b) - Number addition utility
  • Functions include comprehensive docstrings with usage examples

Documentation

  • Updated README.md with:
    • Installation instructions (pip install from GitHub, development mode)
    • Usage examples showing how to import and use functions
    • Package structure overview
    • Guidelines for adding new utilities
  • Added CONTRIBUTING.md with best practices for contributing new utility functions

Build Artifacts

  • Added .gitignore to exclude Python build artifacts, cache files, and virtual environments

Usage Example

After installation, users can import and use functions in their projects:

from general_utils.example_utils import greet, add_numbers

print(greet("World"))      # Output: Hello, World!
print(add_numbers(2, 3))   # Output: 5

Testing

  • ✅ Package installed successfully in development mode
  • ✅ All functions tested and working correctly
  • ✅ Import from external project context verified
  • ✅ CodeQL security scan passed (0 vulnerabilities)

Next Steps

Users can now:

  1. Install the package in any project using pip
  2. Import and use the utility functions
  3. Add new custom functions following the guidelines in CONTRIBUTING.md
  4. Share common utilities across multiple projects seamlessly
Original prompt

After I initialized a local folder with Git to be a repository, I want to be linked to this repo on GitHub. Later, I want to use the python functions present in this repo in other projects (common costum functions will be placed here).


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 23, 2025 14:56
Co-authored-by: DaveCacci <114184895+DaveCacci@users.noreply.github.com>
Co-authored-by: DaveCacci <114184895+DaveCacci@users.noreply.github.com>
Copilot AI changed the title [WIP] Link local Git repository to GitHub Set up general_utils as installable Python package for use in other projects Oct 23, 2025
Copilot AI requested a review from DaveCacci October 23, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants