From e453b2c398b4de52c1adc178eecf3c98dceac0c2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Feb 2026 07:21:22 +0000 Subject: [PATCH 1/3] Standardize dependency installation documentation - Document both pip and uv installation methods with clear guidance - Update README to show pip as recommended for CI/production - Update uv as faster option for local development - Align command examples to use standard python invocation - Fix step numbering in configuration section - Update requirements section to mention both tools Closes #302 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6294b108..1a433cac 100644 --- a/README.md +++ b/README.md @@ -35,14 +35,29 @@ https://controld.com/dashboard/profiles/741861frakbm/filters ### Configure the script -1. **Clone & install** +1. **Clone the repository** ```bash - git clone https://github.com/your-username/ctrld-sync.git + git clone https://github.com/abhimehro/ctrld-sync.git cd ctrld-sync + ``` + +2. **Install dependencies** + + Choose one of the following methods: + + **Using pip (recommended for CI/production):** + ```bash + pip install -r requirements.txt + ``` + + **Using uv (faster for local development):** + ```bash uv sync ``` + + Both methods are fully supported. Our CI workflows use `pip` for consistency with caching, but `uv` provides faster installation for local development. -2. **Configure secrets** +3. **Configure secrets** Create a `.env` file (or set GitHub secrets) with: ```py TOKEN=your_control_d_api_token @@ -50,7 +65,7 @@ https://controld.com/dashboard/profiles/741861frakbm/filters ``` For GitHub Actions, set `TOKEN` and `PROFILE` secrets to the raw values (not the full `TOKEN=...` / `PROFILE=...` lines). -3. **Configure Folders** +4. **Configure Folders** Edit the `DEFAULT_FOLDER_URLS` list in `main.py` to include the URLs of the JSON block-lists you want to sync. **Example configuration:** @@ -76,20 +91,20 @@ https://controld.com/dashboard/profiles/741861frakbm/filters You can add your own JSON block-list URLs or use command-line arguments: ```bash - uv run python main.py --folder-url https://example.com/my-blocklist.json + python main.py --folder-url https://example.com/my-blocklist.json ``` > [!NOTE] > Currently only Folders with one action are supported. > Either "Block" or "Allow" actions are supported. -4. **Run locally** +5. **Run locally** ```bash - uv run python main.py --dry-run # plan only, no API calls - uv run python main.py --profiles your_id # live run (requires TOKEN) + python main.py --dry-run # plan only, no API calls + python main.py --profiles your_id # live run (requires TOKEN) ``` -5. **Run in CI** +6. **Run in CI** The included GitHub Actions workflow (`.github/workflows/sync.yml`) runs a dry-run daily at 02:00 UTC and on PRs, writes `plan.json`, and uploads it as an artifact for review. ### Configure GitHub Actions @@ -103,7 +118,7 @@ https://controld.com/dashboard/profiles/741861frakbm/filters ## Requirements - Python 3.13+ -- `uv` (for dependency management) +- Dependencies listed in `requirements.txt` (install with `pip` or `uv`) ## Testing From 8317611b6d5c8e90e4cda40f4c3dbce1ceb104d8 Mon Sep 17 00:00:00 2001 From: Abhi Mehrotra Date: Wed, 18 Feb 2026 19:46:38 -0600 Subject: [PATCH 2/3] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50c01db2..06107335 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ https://controld.com/dashboard/profiles/741861frakbm/filters uv sync ``` - Both methods are fully supported. Our CI workflows use `pip` for consistency with caching, but `uv` provides faster installation for local development. + Both methods are fully supported. Our main sync CI workflow uses `pip` for consistency with caching, while other workflows use `uv`; `uv` is generally faster for local development. 3. **Configure secrets** Create a `.env` file (or set GitHub secrets) with: From 7ad19e938fd24c1d14d1b2afa437709ac62794b9 Mon Sep 17 00:00:00 2001 From: Abhi Mehrotra Date: Wed, 18 Feb 2026 19:46:43 -0600 Subject: [PATCH 3/3] Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06107335..48e5ab84 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ https://controld.com/dashboard/profiles/741861frakbm/filters ## Requirements - Python 3.13+ -- Dependencies listed in `requirements.txt` (install with `pip` or `uv`) +- Runtime dependencies (install with `pip install -r requirements.txt` or `uv sync`) ## Testing