Skip to content

Conversation

@Ulthran
Copy link
Contributor

@Ulthran Ulthran commented Sep 12, 2025

Summary

  • Move sample_registry package from src into repository root
  • Update default SQLite path for relocated package
  • Simplify packaging configuration now that src layout is gone

Testing

  • pytest -q

https://chatgpt.com/codex/tasks/task_e_68c385a656ec8323b6283b6c24eba7e1

Copilot AI review requested due to automatic review settings September 12, 2025 02:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the project structure by moving the sample_registry package from src/sample_registry to the repository root, eliminating the src layout. The changes update import paths throughout the codebase and adjust configuration to support the new package location.

Key changes:

  • Updated all import statements to reference sample_registry directly instead of src.sample_registry
  • Fixed SQLite database path calculation for the relocated package structure
  • Added Flask dependencies and package data configuration to support the integrated Flask app

Reviewed Changes

Copilot reviewed 7 out of 37 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_util.py Updated import path from src.sample_registry.util to sample_registry.util
tests/test_registrar.py Updated all imports to remove src. prefix from sample_registry modules
tests/test_register.py Updated all imports to remove src. prefix from sample_registry modules
tests/test_mapping.py Updated import path from src.sample_registry.mapping to sample_registry.mapping
sample_registry/init.py Fixed SQLite database path calculation for new package location
pyproject.toml Added Flask dependencies and package data configuration for templates/static files
app/init.py Removed entire file content that was importing from sample_registry

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

"Missing database connection information in environment, using test SQLite database\n"
)
SQLALCHEMY_DATABASE_URI = f"sqlite:///{Path(__file__).parent.parent.parent.parent.parent.resolve()}/sample_registry.sqlite3"
SQLALCHEMY_DATABASE_URI = f"sqlite:///{Path(__file__).parent.parent.resolve()}/sample_registry.sqlite3"
Copy link

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path calculation uses multiple .parent calls which is fragile and hard to understand. Consider using a more explicit approach like Path.cwd() or defining a constant for the project root directory.

Copilot uses AI. Check for mistakes.
@Ulthran Ulthran merged commit 81571dc into master Sep 12, 2025
0 of 8 checks passed
@Ulthran Ulthran deleted the codex/refactor-repo-structure-to-improve-organization branch September 12, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants