-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changed project from flat layout to src layout #22
Conversation
WalkthroughThe pull request introduces several changes across multiple files, primarily focusing on updating directory structures and testing commands. The workflow configuration in Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (2).github/workflows/ci.yaml (2)
The repository name has been correctly updated to use a hyphen instead of an underscore, matching the actual repository name 'fschuch/wizard-template'. Let's verify this matches the repository configuration: #!/bin/bash
# Description: Verify repository name in git config
# Expect: Should show 'fschuch/wizard-template'
git remote -v | grep origin
The path pattern change correctly reflects the new src layout structure, ensuring CI runs when package files are modified. Let's verify the package location matches the new path pattern: ✅ Verification successfulPath pattern change correctly reflects package location The package is indeed located at 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the wizard_template package exists in src directory
# Expect: Package directory should exist under src/
fd -t d "wizard_template$" src/
Length of output: 262 Script: #!/bin/bash
# Let's try a different approach to verify the package location
# First, let's check if the directory exists anywhere in the repository
fd -t d "wizard_template"
# Then, let's check the content structure to understand the layout
ls -R src/ 2>/dev/null || true
# Finally, let's look for Python package files
fd -e py . src/ 2>/dev/null || true
Length of output: 210 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (1)
pyproject.toml (1)
92-92
: Consider updating script directory name in documentationThe script path has been moved from
./scripts/
to./tools/
. While this change works, ensure this directory rename is documented in your changelog and any contributing guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
.github/workflows/docs.yaml
(1 hunks)README.md
(2 hunks)pyproject.toml
(4 hunks)tools/rename_project_content.py
(1 hunks)
🔇 Additional comments (6)
pyproject.toml (4)
47-48
: LGTM: Coverage configuration correctly updated for src layout
The source and omit paths have been properly updated to reflect the new src layout structure, which aligns with Python packaging best practices.
79-79
: LGTM: Version file path correctly updated
The version file path has been appropriately updated to match the new src layout.
131-131
: LGTM: Documentation watch path updated correctly
The sphinx-autobuild watch path has been properly updated to monitor the new src directory structure.
Line range hint 1-131
: Verify package discovery settings
The move to src layout typically requires explicit package discovery settings. Let's verify if any additional configuration is needed.
✅ Verification successful
No additional package discovery settings needed
The project is correctly set up with a src layout. Hatch (the build backend) automatically handles src-layout projects without requiring explicit package discovery configuration. The presence of src/wizard_template/__init__.py
confirms the correct package structure.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if packages section exists in pyproject.toml
rg '\[tool\.hatch\.build\.targets\.wheel\]'
rg '\[tool\.hatch\.build\.targets\.sdist\]'
# Check if there's any packages configuration in setup.py/setup.cfg if they exist
fd -e py -e cfg '^setup\.'
Length of output: 120
Script:
#!/bin/bash
# Let's verify the src layout and package structure
fd -t d 'src'
fd -t f -p 'src/**/*.py'
# Check if hatch is properly configured for src layout
rg 'packages\s*=' pyproject.toml
rg 'find\s*=' pyproject.toml
rg '\[tool\.hatch\.build\]' -A 5 pyproject.toml
# Verify if the package is importable
fd -t f '__init__.py' src/
Length of output: 220
README.md (2)
114-134
: LGTM: Test output correctly reflects src layout transition
The test output demonstrates successful adaptation to the src layout:
- Coverage report correctly shows files under
src/
directory - Test discovery and execution paths are properly updated
- Coverage reporting is working as expected with 100% coverage
214-214
: Verify version file path consistency across project
The version file path update to src/wizard_template/_version.py
correctly reflects the src layout transition.
Let's verify the version file path is consistently updated across the project:
✅ Verification successful
Version file path is consistently updated
The version file path src/wizard_template/_version.py
is consistently referenced in pyproject.toml
both in the coverage omit list and version-file configuration. No outdated references to the old path were found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining references to the old version file path
# that might have been missed during the transition
# Search for old path references
echo "Checking for old version file path references..."
rg "wizard_template/_version\.py" --type-add 'config:*.{toml,yaml,yml}' -t config
# Search for new path references to confirm updates
echo "Checking for new version file path references..."
rg "src/wizard_template/_version\.py" --type-add 'config:*.{toml,yaml,yml}' -t config
Length of output: 629
The src layout helps to prevent accidental usage of the in-development copy of the code. Please, refer to the following pages for details:
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Chores
These changes enhance the overall functionality and organization of the project, ensuring a smoother user experience.