Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 4, 2025

This PR establishes the foundational Python project structure for LoggingPlus with modern packaging best practices.

Changes Made

Project Structure

Created a standard Python project layout following the src-layout pattern:

  • src/loggingplus/ - Main package directory containing the library code
  • tests/ - Test directory for unit and integration tests
  • pyproject.toml - Project configuration using Poetry as the build tool

Configuration Details

pyproject.toml includes:

  • Package metadata (name, version, description, authors)
  • Python version requirement (^3.8)
  • Poetry build system configuration with poetry-core backend
  • pytest as a development dependency
  • Proper package discovery configuration pointing to the src layout

Sample Files

  • src/loggingplus/__init__.py - Package initialization with version information
  • tests/test_version.py - Sample test to verify the package structure works correctly

Why This Structure?

The src-layout pattern provides several advantages:

  1. Prevents accidentally running tests against the local directory instead of the installed package
  2. Ensures imports work correctly in both development and production environments
  3. Follows modern Python packaging best practices

Usage

With Poetry:

poetry install
poetry run pytest

Without Poetry:

pip install pytest
PYTHONPATH=src pytest tests/

This establishes a solid foundation for the LoggingPlus library development. ✅

Original prompt

Python project wirth a src, uses pyproiject.toml with poery as a build tool, give me a test folder as well


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: VarSamLewis <65926327+VarSamLewis@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Python project wirth a src, uses pyproiject.toml with poery as a build tool, give me a test folder as well Setup Python project structure with src layout, Poetry build system, and tests Oct 4, 2025
@Copilot Copilot AI requested a review from VarSamLewis October 4, 2025 10:04
Copilot finished work on behalf of VarSamLewis October 4, 2025 10:04
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