- 
                Notifications
    
You must be signed in to change notification settings  - Fork 31
 
chore: Move setup info to pyproject.toml exclude docs and tests from wheel #290
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
Conversation
          
Reviewer's GuideThis PR refactors packaging configuration by migrating all metadata, dependencies, and extras from setup.py into pyproject.toml (using PEP 621/PEP 517), simplifies setup.py to a bare setup() call, and enhances wheel packaging by specifying package-data and exclude patterns. Flow diagram for wheel packaging data inclusion/exclusionflowchart TD
    A[pyproject.toml]
    B[tool.setuptools.package-data]
    C[Include: static, templates, locale, LICENSE, README.rst]
    D[Exclude: **/bundles/]
    E[Wheel package]
    A --> B
    B --> C
    B --> D
    C --> E
    D --> E
    File-Level Changes
 Tips and commandsInteracting with Sourcery
 Customizing Your ExperienceAccess your dashboard to: 
 Getting Help
  | 
    
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.
Hey @fsbraun - I've reviewed your changes - here's some feedback:
- The [tool.setuptools.package-data] section references 
djangocms_storiesbut your package isdjangocms_frontend, so update it to correctly include your project’s data files. - You wanted to exclude docs and tests from the wheel, but your 
excludeonly covers bundles—add patterns for docs/ and tests/ to fully omit them. 
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The [tool.setuptools.package-data] section references `djangocms_stories` but your package is `djangocms_frontend`, so update it to correctly include your project’s data files.
- You wanted to exclude docs and tests from the wheel, but your `exclude` only covers bundles—add patterns for docs/ and tests/ to fully omit them.
## Individual Comments
### Comment 1
<location> `pyproject.toml:74` </location>
<code_context>
+[tool.setuptools.dynamic]
+version = { attr = "djangocms_frontend.__version__" }
+
+[tool.setuptools.package-data]
+djangocms_stories = [ "static/**/*", "templates/**/*", "locale/**/*", "LICENSE", "README.rst" ]
+exclude = [ "**/bundles/" ]
+
 [tool.black]
</code_context>
<issue_to_address>
Package data section references 'djangocms_stories', which may be a typo.
The package data is set for 'djangocms_stories', but the project appears to be 'djangocms_frontend'. Please verify this isn't a copy-paste mistake to avoid missing data in your package.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
[tool.setuptools.package-data]
djangocms_stories = [ "static/**/*", "templates/**/*", "locale/**/*", "LICENSE", "README.rst" ]
exclude = [ "**/bundles/" ]
=======
[tool.setuptools.package-data]
djangocms_frontend = [ "static/**/*", "templates/**/*", "locale/**/*", "LICENSE", "README.rst" ]
exclude = [ "**/bundles/" ]
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
          Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@           Coverage Diff           @@
##           master     #290   +/-   ##
=======================================
  Coverage   88.89%   88.89%           
=======================================
  Files         124      124           
  Lines        3385     3385           
  Branches      288      288           
=======================================
  Hits         3009     3009           
  Misses        259      259           
  Partials      117      117           ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
  | 
    
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Summary by Sourcery
Adopt PEP 621 by moving setup configuration into pyproject.toml, streamline setup.py, and refine package inclusion rules
Enhancements:
Build:
Chores: