From 4178b04a3c8602e6511eb583dec17fe46f818b13 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 23:54:58 +0000 Subject: [PATCH 1/3] Initial plan From 7a94de275c92a9ba0c4e2113d8460b755d42acfb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 23:59:46 +0000 Subject: [PATCH 2/3] Fix README clone URL, add test workflow, standardize uv docs Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com> --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ README.md | 23 ++++++++++------------- 2 files changed, 42 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..0d083c90 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Tests + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + test: + permissions: + contents: read + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: 'pip' + cache-dependency-path: 'requirements.txt' + + - name: Install dependencies + run: | + pip install -r requirements.txt + pip install pytest pytest-mock pytest-xdist + + - name: Run tests + run: pytest tests/ -v diff --git a/README.md b/README.md index 6294b108..c526f05e 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ https://controld.com/dashboard/profiles/741861frakbm/filters 1. **Clone & install** ```bash - git clone https://github.com/your-username/ctrld-sync.git + git clone https://github.com/abhimehro/ctrld-sync.git cd ctrld-sync uv sync ``` @@ -113,23 +113,20 @@ This project includes a comprehensive test suite to ensure code quality and corr **Basic test execution:** ```bash -# Install dev dependencies first -pip install pytest pytest-mock pytest-xdist - -# Run all tests -pytest tests/ +# Dev dependencies are included when you run `uv sync` (see Quick start) +uv run pytest tests/ ``` **Parallel test execution (recommended):** ```bash # Run tests in parallel using all available CPU cores -pytest tests/ -n auto +uv run pytest tests/ -n auto # Run with specific number of workers -pytest tests/ -n 4 +uv run pytest tests/ -n 4 ``` -**Note on parallel execution:** The test suite is currently small (~78 tests, <1s execution time), so parallel execution overhead may result in longer wall-clock time compared to sequential execution. However, pytest-xdist is included for: +**Note on parallel execution:** The test suite is currently small (~95 tests, <1s execution time), so parallel execution overhead may result in longer wall-clock time compared to sequential execution. However, pytest-xdist is included for: - **Test isolation verification** - Ensures tests don't share state - **Future scalability** - As the test suite grows, parallel execution will provide significant speedups - **CI optimization** - May benefit from parallelization in CI environments with different characteristics @@ -139,13 +136,13 @@ pytest tests/ -n 4 For active development with frequent test runs: ```bash # Run tests sequentially (faster for small test suites) -pytest tests/ -v +uv run pytest tests/ -v # Run specific test file -pytest tests/test_security.py -v +uv run pytest tests/test_security.py -v # Run tests matching pattern -pytest tests/ -k "test_validation" -v +uv run pytest tests/ -k "test_validation" -v ``` ## Release Process @@ -155,7 +152,7 @@ This project uses manual releases via GitHub Releases. To create a new release: 1. **Ensure all changes are tested and merged to `main`** ```bash # Verify tests pass - pytest tests/ + uv run pytest tests/ # Verify security scans pass bandit -r main.py -ll From 067e5326f31a8dbf37fd87c8c02a443d7fcc530d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Feb 2026 00:20:55 +0000 Subject: [PATCH 3/3] Use uv in test.yml; revert clone URL to YOUR_USERNAME placeholder with fork note Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com> --- .github/workflows/test.yml | 12 ++++-------- README.md | 5 +++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d083c90..c840da08 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,17 +16,13 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 + - name: Install uv + uses: astral-sh/setup-uv@v4 with: python-version: '3.13' - cache: 'pip' - cache-dependency-path: 'requirements.txt' - name: Install dependencies - run: | - pip install -r requirements.txt - pip install pytest pytest-mock pytest-xdist + run: uv sync --all-extras - name: Run tests - run: pytest tests/ -v + run: uv run pytest tests/ -v diff --git a/README.md b/README.md index c526f05e..b721fb29 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,10 @@ https://controld.com/dashboard/profiles/741861frakbm/filters ### Configure the script -1. **Clone & install** +1. **Fork & clone** + > Fork this repo first (click **Fork** on GitHub), then clone your fork: ```bash - git clone https://github.com/abhimehro/ctrld-sync.git + git clone https://github.com/YOUR_USERNAME/ctrld-sync.git cd ctrld-sync uv sync ```