Improve Bluesky reply/quote accessibility and split test bootstrap workflow

- Fix Bluesky quoted post rendering across list output, screen-reader speech, and View Post by centralizing quote extraction.
- Add robust quote URL extraction (facets/embed/text), include quoted URLs in URL shortcuts, and append full quoted URLs when hidden/truncated.
- Improve reply context handling:
  - add and use `$reply_to` template variable,
  - hydrate missing reply target handles in home/feed items,
  - keep backward compatibility for templates that do not include `$reply_to`.
- Align Bluesky default/fallback post templates to include reply context (`$reply_to`).
- Add/extend focused Bluesky tests for quote text, quote URLs, reply context, and template fallback behavior.
- Refactor scripts:
  - add bootstrap-dev.ps1 for environment setup (submodules, venv, deps),
  - keep run-tests.ps1 focused on running tests only,
  - add PowerShell comment-based help in English.
- Update README with the new bootstrap/test workflow and examples.
This commit is contained in:
Juanjo M
2026-02-15 23:50:00 +00:00
parent abf4cb0df1
commit 6e56d94448
11 changed files with 919 additions and 35 deletions

View File

@@ -71,6 +71,50 @@ Now that you have installed all these packages, you can run TW Blue from source
If necessary, change the first part of the command to reflect the location of your python executable.
### Development bootstrap (Windows / PowerShell)
If you are starting fresh in this repository, run:
```powershell
./scripts/bootstrap-dev.ps1
```
This script initializes submodules, creates `.venv` (unless you opt out), and installs dependencies.
Useful options:
```powershell
# Recreate virtual environment from scratch
./scripts/bootstrap-dev.ps1 -RecreateVenv
# Upgrade pip tooling before installing requirements
./scripts/bootstrap-dev.ps1 -UpgradePip
# Use system Python instead of .venv
./scripts/bootstrap-dev.ps1 -SystemPython
```
### Running tests (Windows / PowerShell)
After bootstrap, run tests with:
```powershell
./scripts/run-tests.ps1
```
Useful options:
```powershell
# Run only Bluesky tests
./scripts/run-tests.ps1 -PytestTargets src/test/sessions/blueski -PytestArgs "-q"
# Run only a specific test file
./scripts/run-tests.ps1 -PytestTargets src/test/sessions/blueski/test_blueski_quotes.py -PytestArgs "-q"
# Use system Python instead of .venv
./scripts/run-tests.ps1 -SystemPython
```
### Generating the documentation
To generate the documentation in html format, navigate to the doc folder inside this repo. After that, run these commands: