mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-01 01:21:18 +01:00
# Description of Changes
- **What was changed**
- Added the `--strip-extras` option to the `pip-compile` commands in
`.github/scripts/requirements_pre_commit.txt` and
`.github/scripts/requirements_sync_readme.txt`.
- Bumped versions of CI and development dependencies:
- In `.github/scripts`: `filelock`, `identify`, `platformdirs`,
`pre-commit`, `tomlkit`
- In `testing/cucumber/requirements.txt`: `certifi`,
`charset-normalizer`, `pillow`, `pycryptodome`, `pypdf`, `reportlab`,
`typing-extensions`, and others
- Regenerated hashes for all updated packages.
- Added new batch script `scripts/generate_requirements.bat` to automate
requirement regeneration
- **Why the change was made**
- Keep dependencies up-to-date with latest patch releases to address
security fixes and compatibility improvements.
- Reduce lockfile size and remove unneeded extras by stripping optional
markers.
- Ensure CI and test environments use the most current, secure versions
of tooling.
---
## Checklist
### General
- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings
### Documentation
- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)
### UI Changes (if applicable)
- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)
### Testing (if applicable)
- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
49 lines
1.5 KiB
Batchfile
49 lines
1.5 KiB
Batchfile
@echo off
|
|
REM --------------------------------------------------
|
|
REM Batch script to (re-)generate all requirements
|
|
REM with check for pip-compile and user confirmation
|
|
REM --------------------------------------------------
|
|
|
|
REM Check if pip-compile is available
|
|
pip-compile --version >nul 2>&1
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo ERROR: pip-compile was not found.
|
|
echo Please install pip-tools:
|
|
echo pip install pip-tools
|
|
echo and ensure that pip-compile is in your PATH.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo pip-compile detected.
|
|
|
|
REM Prompt user for confirmation (default = Yes on ENTER)
|
|
set /p confirm="Do you want to generate all requirements? [Y/n] "
|
|
if /I "%confirm%"=="" set confirm=Y
|
|
|
|
if /I not "%confirm%"=="Y" (
|
|
echo Generation cancelled by user.
|
|
pause
|
|
exit /b 0
|
|
)
|
|
|
|
echo Starting generation...
|
|
|
|
echo Generating .github\scripts\requirements_pre_commit.txt
|
|
pip-compile --generate-hashes --upgrade --strip-extras ^
|
|
--output-file=".github\scripts\requirements_pre_commit.txt" ^
|
|
".github\scripts\requirements_pre_commit.in"
|
|
|
|
echo Generating .github\scripts\requirements_sync_readme.txt
|
|
pip-compile --generate-hashes --upgrade --strip-extras ^
|
|
--output-file=".github\scripts\requirements_sync_readme.txt" ^
|
|
".github\scripts\requirements_sync_readme.in"
|
|
|
|
echo Generating testing\cucumber\requirements.txt
|
|
pip-compile --generate-hashes --upgrade --strip-extras ^
|
|
--output-file="testing\cucumber\requirements.txt" ^
|
|
"testing\cucumber\requirements.in"
|
|
|
|
echo All done!
|
|
pause
|