From 33ed56b24e8855d4233537b399d139c1fed74b3e Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 17 Feb 2025 16:57:12 +0000 Subject: Create main.yml --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c1a5e19 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Test and Report Coverage + +on: + pull_request: + branches: + - stable + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' # Adjust to your desired Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + poetry install + + - name: Run tests with pytest-cov + run: | + poetry run pytest --cov=./ --cov-report=xml:coverage.xml + + - name: Report results to DeepSource + env: + DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} + run: | + # Install DeepSource CLI + curl https://deepsource.io/cli | sh + # Report coverage results (ensure the path to coverage.xml is correct) + ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml -- cgit v1.2.3 From 0a25828ce274dbb8f50766cd2ffd9ec1e894f1dc Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 17 Feb 2025 16:58:53 +0000 Subject: Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1a5e19..ab7a260 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' # Adjust to your desired Python version + python-version: '3.13' - name: Install dependencies run: | -- cgit v1.2.3 From a8127828dd18d37bc510204743c34194090ae675 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 17 Feb 2025 16:59:45 +0000 Subject: Update main.yml --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab7a260..558c70e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,5 @@ jobs: env: DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} run: | - # Install DeepSource CLI curl https://deepsource.io/cli | sh - # Report coverage results (ensure the path to coverage.xml is correct) ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml -- cgit v1.2.3 From abdd2753227782b548672ae21b6b0d1345bea057 Mon Sep 17 00:00:00 2001 From: Alex Schofield Date: Mon, 17 Feb 2025 17:03:46 +0000 Subject: temporarily disable package-mode in pyproject.toml --- pyproject.toml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d5db843..cc923b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,19 +2,13 @@ name = "gdpr-obfuscator" version = "0.1.0" description = "A Python library designed to detect and remove Personally Identifiable Information (PII) from CSV files stored in an AWS S3 bucket." -authors = [ - {name = "Alex Schofield",email = "git@ajschof.me"} -] +authors = [{ name = "Alex Schofield", email = "git@ajschof.me" }] readme = "README.md" requires-python = ">=3.13" -dependencies = [ - "tabulate (>=0.9.0,<0.10.0)" -] +dependencies = ["tabulate (>=0.9.0,<0.10.0)"] [tool.poetry] -packages = [ - { include = "gdpr-obfuscator", from = "obfuscator" } -] +package-mode = false [tool.poetry.group.dev.dependencies] pytest = "8.3.4" -- cgit v1.2.3