generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aider: Add Playwright support and cleanup logic (#6)
This pull request enables Aider's web scraping functionality by installing Playwright and its browser dependencies. Users can enable or disable Playwright install and select which browsers they want to install, if any. ## Changes 1. **Playwright Support**: - Introduced Playwright installation logic in `install.sh`. - Enabled configuration of Playwright and browser selection via `devcontainer-feature.json`. 2. **Improved Installation Script**: - Refactored logic to improve modularity and maintainability. - Implemented OS-specific and user-detection logic. 3. **Testing**: - Expanded `scenarios.json` to include tests for Playwright and browser installs. - Added new scripts: - `without_playwright.sh` to test that Playwright install can be disabled. - `with_playwright_browsers.sh` to validate the successful installation of specific browsers. 4. **Cache Management**: - Added a `clean_up` function and Debian/Ubuntu detection to purge apt lists and pipx cache. 5. **Changelog Introduction**: - Added a `CHANGELOG.md` following the [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format for better documentation and release tracking.
- Loading branch information
Showing
7 changed files
with
178 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
- Support for installing dependencies like Playwright and browser dependencies to enable Aider's web scraping functionality. | ||
- Logic to clean up caches and other temporary files after installation to optimize performance and reduce disk usage. | ||
|
||
## [1.0.0] - 2024-12-18 | ||
|
||
### Added | ||
|
||
- Initial implementation of Aider devcontainer feature with support for Debian and Ubuntu. | ||
|
||
[Unreleased]: https://github.com/ivy/devcontainer-features/commits/main/src/aider | ||
[1.0.0]: https://github.com/ivy/devcontainer-features/commits/main/src/aider?since=2024-12-18&until=2024-12-19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# This test file will be executed against one of the scenarios devcontainer.json test that | ||
# includes the 'color' feature with "favorite": "gold" option. | ||
|
||
set -e | ||
|
||
# Optional: Import test library bundled with the devcontainer CLI | ||
# shellcheck disable=SC1091 | ||
source dev-container-features-test-lib | ||
|
||
# Feature-specific tests | ||
# The 'check' command comes from the dev-container-features-test-lib. | ||
# shellcheck disable=SC2016 | ||
check "chromium is installed" bash -c 'find ~/.cache/ms-playwright -maxdepth 1 -type d | grep -E chromium' | ||
check "firefox is installed" bash -c 'find ~/.cache/ms-playwright -maxdepth 1 -type d | grep -E firefox' | ||
|
||
# Report result | ||
# If any of the checks above exited with a non-zero exit code, the test will fail. | ||
reportResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# This test file will be executed against one of the scenarios devcontainer.json test that | ||
# includes the 'color' feature with "favorite": "gold" option. | ||
|
||
set -e | ||
|
||
# Optional: Import test library bundled with the devcontainer CLI | ||
# shellcheck disable=SC1091 | ||
source dev-container-features-test-lib | ||
|
||
# Feature-specific tests | ||
# The 'check' command comes from the dev-container-features-test-lib. | ||
# shellcheck disable=SC2016 | ||
check "playwright is not installed" bash -c '! command -v playwright' | ||
|
||
# Report result | ||
# If any of the checks above exited with a non-zero exit code, the test will fail. | ||
reportResults |