Skip to content

Conversation

@jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Oct 20, 2025

Summary by CodeRabbit

  • Chores
    • Updated CI/CD workflows to reflect the project's source layout and ensure build/format steps target the correct paths.
    • Adjusted packaging and tooling configuration so versioning, distribution, and coverage now reference the updated source structure.

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2025

Walkthrough

The repository is moved to a src-layout: CI workflows and build tooling references updated to use src/pylammpsmpi/ (including the _version.py location and Black source paths); build steps otherwise remain unchanged.

Changes

Cohort / File(s) Summary
CI workflow updates
.github/workflows/deploy.yml, .github/workflows/pipeline.yml
Updated paths used in CI: git update-index now marks src/pylammpsmpi/_version.py unchanged (instead of pylammpsmpi/_version.py), and Black workflow/source path references changed from ./${{ github.event.repository.name }} to ./src/${{ github.event.repository.name }}.
Build & packaging config
pyproject.toml
Updated packaging and tooling references (version-file, sdist/wheel entries, version source path, coverage settings) to point to src/pylammpsmpi/ instead of pylammpsmpi/.

Sequence Diagram(s)

No sequence diagram included — changes are limited to path/config updates with no new runtime control flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰
Hopping through src with organized glee,
Paths relaid neatly for all to see,
CI and build now point where they should,
A tidy repo — tidy and good! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Follow Python standard packaging guidelines" is directly related to the main changes in the pull request. The pull request systematically restructures the project to adopt the src-layout pattern by updating references from pylammpsmpi/ to src/pylammpsmpi/ across deployment workflows, pipeline workflows, and project configuration files. The src-layout is a recognized Python standard packaging guideline recommended by the Python Packaging Authority. The title accurately conveys the primary intent of implementing this packaging convention, and a teammate scanning the git history would clearly understand the purpose of this changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef2a017 and d720293.

📒 Files selected for processing (1)
  • pyproject.toml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: unittest_mpich_mac

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.41%. Comparing base (37df11b) to head (d720293).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
+ Coverage   85.17%   85.41%   +0.23%     
==========================================
  Files           6        7       +1     
  Lines         796      809      +13     
==========================================
+ Hits          678      691      +13     
  Misses        118      118              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pyproject.toml (1)

44-47: Update [tool.hatch.build] include for consistency with src-layout and best practices.

Global build configuration in the tool.hatch.build table is not recommended when target-specific config is present, as keys may then be overridden by target config. The global include = ["pylammpsmpi"] (line 46) refers to the root directory structure, while the build targets specify packages = ["src/pylammpsmpi"] (lines 93, 98). When packages is defined for a target, it relies on sources and takes precedence.

While hatch will correctly build using the target-specific packages, align the global include with the src-layout for consistency and clarity:

 [tool.hatch.build]
 include = [
-    "pylammpsmpi"
+    "src/pylammpsmpi"
 ]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ec6334 and ef2a017.

📒 Files selected for processing (3)
  • .github/workflows/deploy.yml (1 hunks)
  • .github/workflows/pipeline.yml (2 hunks)
  • pyproject.toml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: codecov/patch
  • GitHub Check: unittest_openmpi_mac
  • GitHub Check: unittest_mpich_mac
🔇 Additional comments (2)
.github/workflows/deploy.yml (1)

35-35: Version file path correctly updated for src-layout.

The git update-index command now correctly references the version file at its new location src/pylammpsmpi/_version.py, consistent with pyproject.toml configuration.

.github/workflows/pipeline.yml (1)

16-16: Black formatter paths correctly updated for src-layout.

Both the check job and auto-fix job now reference the source directory at its new location under src/. The paths are consistent and will correctly format the migrated package structure.

Also applies to: 32-32


[tool.coverage.run]
omit = ["pylammpsmpi/_version.py", "tests/*"]
source = ["pylammpsmpi"]
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Coverage source path not updated to src-layout.

Line 106 still references the old package location ["pylammpsmpi"] instead of ["src/pylammpsmpi"]. This will cause coverage collection to fail after migration to the src-layout structure, as it won't find source files in their new location.

Apply this fix:

 [tool.coverage.run]
-source = ["pylammpsmpi"]
+source = ["src/pylammpsmpi"]
 command_line = "-m unittest discover tests"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
source = ["pylammpsmpi"]
[tool.coverage.run]
source = ["src/pylammpsmpi"]
command_line = "-m unittest discover tests"
🤖 Prompt for AI Agents
In pyproject.toml around line 106, the coverage source path still points to the
old package root ["pylammpsmpi"] but the repository uses src-layout; update the
path to ["src/pylammpsmpi"] so coverage tools can find sources under the src/
directory and regenerate/verify coverage by running the coverage collection/test
command after the change.

@jan-janssen jan-janssen merged commit 7132255 into main Oct 20, 2025
21 checks passed
@jan-janssen jan-janssen deleted the refactor branch October 20, 2025 17:02
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.

1 participant