Skip to content

Conversation

@jezdez
Copy link
Member

@jezdez jezdez commented Jun 1, 2025

This pull request introduces a new "Bulk Release" feature for managing project uploads, updates the CSS codebase to use modern @use syntax, and includes minor code cleanup and refactoring. Below are the most important changes grouped by theme.

Fixes #20

New Feature: Bulk Release Functionality

  • Added BulkReleaseView in jazzband/projects/views.py to allow project leads to release multiple uploads for a specific version simultaneously. This includes validation, error handling, and integration with twine for PyPI uploads. [1] [2]
  • Created BulkReleaseForm in jazzband/projects/forms.py to handle user input for bulk release operations.
  • Added a new template, bulk_release.html, to render the bulk release page with detailed UI for uploads, warnings, and errors.
  • Integrated the "Bulk Release" option into the project detail page for versions with multiple unreleased uploads.

CSS Modernization

  • Updated SCSS files to use the @use syntax instead of @import, improving modularity and maintainability. Changes applied to styles.scss, _base.scss, and _pygments.scss. [1] [2] [3]
  • Replaced deprecated lighten function with color.adjust for color manipulation in _base.scss. [1] [2] [3] [4] [5] [6] [7]

Code Cleanup and Refactoring

  • Removed unused import MagicMock from tests/conftest.py and updated the mock_user fixture to use mocker.MagicMock for consistency. [1] [2]
  • Removed unused HTTPError import from jazzband/projects/views.py.

Pre-commit Hook Configuration

  • Added new pre-commit hooks for trailing whitespace, YAML checks, large file checks, and merge conflict detection in .pre-commit-config.yaml.

jezdez and others added 8 commits June 2, 2025 00:25
- Added new hooks to the pre-commit configuration for better code quality checks.
- Cleaned up whitespace in Dockerfiles and docker-compose.yml for consistency.
- Removed unnecessary blank lines in GitHub Actions workflows to enhance readability.
…001720, ensuring compatibility with the latest features and improvements.
…ty and consistency. Updated test functions to replace monkeypatching with mocker.patch, enhancing the clarity of mock setups and ensuring better integration with pytest's mocking capabilities.
…odularity and maintainability. Updated color adjustments to utilize `color.adjust` for better control over color lightness in hover states.
- Introduced BulkReleaseForm to handle bulk release submissions.
- Implemented BulkReleaseView to manage the release of multiple uploads at once, including validation and error handling.
- Added a new bulk release template for user interaction.
- Updated project detail view to link to the bulk release feature when multiple uploads are present.
- Created comprehensive tests for bulk release functionality, ensuring robust validation and release processes.
…sistency. This change enhances the clarity of mock setups in the test suite.
- Updated the inheritance structure of BulkReleaseView to improve functionality and maintainability.
- Adjusted tests to verify the new inheritance and decorators, ensuring proper permission checks and method availability.
@codecov
Copy link

codecov bot commented Jun 1, 2025

Codecov Report

Attention: Patch coverage is 93.54839% with 6 lines in your changes missing coverage. Please review.

Project coverage is 68.12%. Comparing base (cd76b2d) to head (58a7df0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
jazzband/projects/forms.py 57.14% 3 Missing ⚠️
jazzband/projects/views.py 96.51% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1187      +/-   ##
==========================================
+ Coverage   66.88%   68.12%   +1.23%     
==========================================
  Files          40       40              
  Lines        1942     2033      +91     
==========================================
+ Hits         1299     1385      +86     
- Misses        643      648       +5     
Files with missing lines Coverage Δ
jazzband/projects/forms.py 64.81% <57.14%> (-1.15%) ⬇️
jazzband/projects/views.py 61.89% <96.51%> (+8.11%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd76b2d...58a7df0. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jezdez and others added 4 commits June 2, 2025 02:03
- Refactored test functions in test_bulk_release.py to utilize consistent mocking practices, improving readability and maintainability.
- Added comprehensive tests for various scenarios in the bulk release process, including form validation, release success, and error handling.
- Updated test_upload_validation.py to streamline HTTP error handling and ensure proper warning treatment for 404 errors.
- Ensured all tests are integrated with Flask context for better coverage and reliability.
@jezdez jezdez added this pull request to the merge queue Jun 2, 2025
Merged via the queue into main with commit 953067d Jun 2, 2025
6 checks passed
@jezdez jezdez deleted the bulk-uploads branch June 2, 2025 00:15
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.

Add ability to release all uploads of a given version

1 participant