Skip to content
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

[CI] Remove redundant dev dependencies installation #43

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

PPeitsch
Copy link
Owner

@PPeitsch PPeitsch commented Nov 25, 2024

⚡ Enhance and Optimize PyPI Publishing Workflow

Have you read the Contributing Guidelines?

Description

This PR improves our PyPI publishing workflow through several iterations:

  1. Implements trusted publishing using the official PyPA action for enhanced security while maintaining our build consistency with hatch.
  2. Fixes the test execution in the publishing stage by using pytest directly.
  3. Optimizes dependencies by removing redundant installations.

Changes progression:

  • Initial implementation:

  • Add PyPI environment configuration with trusted publishing

  • Configure necessary GitHub permissions

  • Update PyPI project URL configuration

  • Maintain hatch for build consistency

  • Test execution fix:

  • Replace hatch test runner with direct pytest command

  • Keep testing approach consistent across jobs

  • Dependency optimization:

  • Remove redundant dev dependencies installation

  • Keep only essential packages for publishing (build and pytest)

These changes result in a more secure, reliable, and efficient publishing workflow that better aligns with Python packaging best practices while minimizing unnecessary dependency installations.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would break existing functionality)
  • Documentation update
  • Performance improvement
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • CI/CD related changes
  • Other (please describe):

Checklist

  • I have followed the project's coding style guidelines
  • I have added tests that prove my fix/feature works
  • All existing tests pass locally
  • I have updated the documentation accordingly
  • I have added appropriate type hints
  • I have updated the CHANGELOG.md
  • My changes generate no new warnings or errors
  • I have checked my code with black, isort, and mypy

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

The dev dependencies are not needed in publish job since we only
require build and pytest packages.

Changes made:
 - Remove pip install .[dev] line as it's redundant
 - Keep only essential dependencies for publishing"
@PPeitsch PPeitsch merged commit 0fbcf19 into main Nov 25, 2024
6 checks passed
@PPeitsch PPeitsch deleted the ci/update-pypi-workflow branch November 26, 2024 22:51
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