mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-02 21:03:34 +03:00
# Description of Changes This PR modernizes the project's Python tooling across GitHub Actions by migrating CI workflows from pip-based dependency management to `uv` and aligning Python execution with the engine project's managed environment. ### What was changed - Replaced `actions/setup-python` and ad-hoc `pip install` steps with `astral-sh/setup-uv` across CI workflows. - Configured shared `uv` dependency caching using `engine/pyproject.toml` and `engine/uv.lock`. - Updated Python script execution to use `uv run --project engine --locked` for a consistent runtime environment. - Replaced package installation steps with `uv sync` for the required dependency groups (e.g. `tools` and `cucumber`). - Added Docker image build validation for both production and development AI engine images. - Updated workflow cache configuration and Docker build context where required. - Removed obsolete Python requirements files that are no longer needed after the migration. - Applied minor Python code modernizations, including import cleanup, modern built-in generic type annotations (`list[...]`, `tuple[...]`, `float | None`), and small style improvements. - Removed unnecessary Python formatter/linter extensions from the development container configuration. ### Why the change was made - Standardize Python dependency management across the repository. - Reduce duplicated dependency installation logic in CI. - Improve workflow performance through shared dependency caching. - Ensure all Python utilities execute against the same locked dependency set managed by the engine project. - Simplify long-term maintenance by eliminating legacy requirements files and pip-specific workflow steps. --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] 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/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] 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/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### 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 run `task check` to verify linters, typechecks, and tests pass - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#7-testing) for more details. --------- Signed-off-by: Carsten Drewes <c.drewes@stud.uni-hannover.de> Co-authored-by: albanobattistella <34811668+albanobattistella@users.noreply.github.com> Co-authored-by: kastenherri <116314318+kastenherri@users.noreply.github.com> Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: James Brunton <jbrunton96@gmail.com>
143 lines
6.4 KiB
JSON
143 lines
6.4 KiB
JSON
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
|
|
{
|
|
"name": "Stirling-PDF Dev Container",
|
|
"build": {
|
|
// Sets the run context to one level up instead of the .devcontainer folder.
|
|
"context": "..",
|
|
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
|
"dockerfile": "../Dockerfile.dev"
|
|
},
|
|
"runArgs": [
|
|
"-e",
|
|
"GIT_EDITOR=code --wait",
|
|
"--security-opt",
|
|
"label=disable"
|
|
],
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
"forwardPorts": [8080, 2002, 2003],
|
|
"portsAttributes": {
|
|
"8080": {
|
|
"label": "Stirling-PDF Dev Port"
|
|
},
|
|
"2002": {
|
|
"label": "unoserver Port"
|
|
},
|
|
"2003": {
|
|
"label": "UnoConvert Port"
|
|
}
|
|
},
|
|
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated",
|
|
"mounts": [
|
|
"source=logs-volume,target=/workspace/logs,type=volume",
|
|
"source=build-volume,target=/workspace/build,type=volume"
|
|
],
|
|
"workspaceFolder": "/workspace",
|
|
// Configure tool-specific properties.
|
|
"customizations": {
|
|
"vscode": {
|
|
"settings": {
|
|
"terminal.integrated.shell.linux": "/bin/bash",
|
|
"editor.wordSegmenterLocales": "",
|
|
"editor.guides.bracketPairs": "active",
|
|
"editor.guides.bracketPairsHorizontal": "active",
|
|
"cSpell.enabled": false,
|
|
"[java]": {
|
|
"editor.defaultFormatter": "josevseb.google-java-format-for-vs-code"
|
|
},
|
|
"java.compile.nullAnalysis.mode": "automatic",
|
|
"java.configuration.updateBuildConfiguration": "interactive",
|
|
"java.format.enabled": true,
|
|
"java.format.settings.profile": "GoogleStyle",
|
|
"java.format.settings.google.version": "1.28.0",
|
|
"java.format.settings.google.extra": "--aosp --skip-sorting-imports --skip-javadoc-formatting",
|
|
"java.saveActions.cleanup": true,
|
|
"java.cleanup.actions": [
|
|
"invertEquals",
|
|
"instanceofPatternMatch"
|
|
],
|
|
"java.completion.engine": "dom",
|
|
"java.completion.enabled": true,
|
|
"java.completion.importOrder": [
|
|
"java",
|
|
"javax",
|
|
"org",
|
|
"com",
|
|
"net",
|
|
"io",
|
|
"jakarta",
|
|
"lombok",
|
|
"me",
|
|
"stirling"
|
|
],
|
|
"java.project.resourceFilters": [
|
|
".devcontainer/",
|
|
".git/",
|
|
".github/",
|
|
".gradle/",
|
|
".venv/",
|
|
".venv*/",
|
|
".vscode/",
|
|
"bin/",
|
|
"app/core/bin/",
|
|
"app/common/bin/",
|
|
"app/proprietary/bin/",
|
|
"build/",
|
|
"app/core/build/",
|
|
"app/common/build/",
|
|
"app/proprietary/build/",
|
|
"configs/",
|
|
"app/core/configs/",
|
|
"customFiles/",
|
|
"app/core/customFiles/",
|
|
"docs/",
|
|
"exampleYmlFiles",
|
|
"gradle/",
|
|
"images/",
|
|
"logs/",
|
|
"pipeline/",
|
|
"scripts/",
|
|
"testings/",
|
|
".git-blame-ignore-revs",
|
|
".gitattributes",
|
|
".gitignore",
|
|
"app/core/.gitignore",
|
|
"app/common/.gitignore",
|
|
"app/proprietary/.gitignore",
|
|
".pre-commit-config.yaml"
|
|
],
|
|
"java.signatureHelp.enabled": true,
|
|
"java.signatureHelp.description.enabled": true,
|
|
"java.maven.downloadSources": true,
|
|
"java.import.gradle.enabled": true,
|
|
"java.eclipse.downloadSources": true,
|
|
"java.import.gradle.wrapper.enabled": true,
|
|
"spring.initializr.defaultLanguage": "Java",
|
|
"spring.initializr.defaultGroupId": "stirling.software.SPDF",
|
|
"spring.initializr.defaultArtifactId": "SPDF"
|
|
},
|
|
"extensions": [
|
|
"elagil.pre-commit-helper", // Support for pre-commit hooks to enforce code quality
|
|
"josevseb.google-java-format-for-vs-code", // Google Java code formatter to follow the Google Java Style Guide
|
|
"ms-python.python", // Official Microsoft Python extension with IntelliSense, debugging, and Jupyter support
|
|
"ms-vscode-remote.vscode-remote-extensionpack", // Remote Development Pack for SSH, WSL, and Containers
|
|
// "Oracle.oracle-java", // Oracle Java extension with additional features for Java development
|
|
"streetsidesoftware.code-spell-checker", // Spell checker for code to avoid typos
|
|
"vmware.vscode-boot-dev-pack", // Developer tools for Spring Boot by VMware
|
|
"vscjava.vscode-java-pack", // Java Extension Pack with essential Java tools for VS Code
|
|
"EditorConfig.EditorConfig", // EditorConfig support for maintaining consistent coding styles
|
|
"ms-azuretools.vscode-docker", // Docker extension for Visual Studio Code
|
|
"charliermarsh.ruff", // Ruff extension for Ruff language support
|
|
"github.vscode-github-actions", // GitHub Actions extension for Visual Studio Code
|
|
"stylelint.vscode-stylelint", // Stylelint extension for CSS and SCSS linting
|
|
"redhat.vscode-yaml" // YAML extension for Visual Studio Code
|
|
]
|
|
}
|
|
},
|
|
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
|
|
"remoteUser": "devuser",
|
|
"shutdownAction": "stopContainer",
|
|
"initializeCommand": "bash ./.devcontainer/git-init.sh",
|
|
"postStartCommand": "./.devcontainer/init-setup.sh"
|
|
}
|