From 81f622c8fbcaa94b87269a6d784c09e4a7ffb82e Mon Sep 17 00:00:00 2001 From: Wil T Date: Fri, 6 Sep 2024 12:18:34 -0400 Subject: [PATCH 1/3] Implement Windows testing (#1119) * add windows tests to test action * test pip install on windows * update us package for 3.12 support * skip failing test on windows --------- Co-authored-by: Shauna Gordon-McKeon --- .github/workflows/pip-install.yml | 1 + .github/workflows/test.yml | 2 ++ requirements.txt | 2 +- test/test_targetsmart/test_targetsmart_smartmatch.py | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pip-install.yml b/.github/workflows/pip-install.yml index 66ed581be..216a99d77 100644 --- a/.github/workflows/pip-install.yml +++ b/.github/workflows/pip-install.yml @@ -25,6 +25,7 @@ jobs: matrix: os: - ubuntu-latest + - windows-latest python-version: - "3.12" - "3.11" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be949bf63..97598adcc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,7 @@ jobs: matrix: os: - ubuntu-latest + - windows-latest python-version: - "3.12" - "3.11" @@ -77,3 +78,4 @@ jobs: - name: Format run: | ruff format --check --diff parsons/ test/ useful_resources/ + diff --git a/requirements.txt b/requirements.txt index 262b9f958..b801d88b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,6 +45,6 @@ xmltodict==0.11.0 # TODO Remove when we have a TMC-specific Docker image jinja2>=3.0.2 selenium==3.141.0 -us==3.1.1 +us==3.2.0 sshtunnel==0.4.0 diff --git a/test/test_targetsmart/test_targetsmart_smartmatch.py b/test/test_targetsmart/test_targetsmart_smartmatch.py index f39c56fd7..5bff6deb8 100644 --- a/test/test_targetsmart/test_targetsmart_smartmatch.py +++ b/test/test_targetsmart/test_targetsmart_smartmatch.py @@ -1,9 +1,11 @@ import csv import io import gzip +import sys import petl import pytest + from parsons.targetsmart.targetsmart_api import TargetSmartAPI @@ -70,6 +72,7 @@ def submit_filename(): return "parsons_test.csv" +@pytest.mark.skipif(sys.platform == "win32", reason="need to fix this test on windows") def test_smartmatch( intable, submit_filename, From 30be14b9d96c0b0b7b4fa251099eceb5e64b3439 Mon Sep 17 00:00:00 2001 From: Wil T Date: Fri, 6 Sep 2024 12:25:22 -0400 Subject: [PATCH 2/3] circleci updates (#1122) * use uv in circleci * use python 3.12 in circleci --- .circleci/config.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 69b7a4372..682c8b0dd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,46 +20,47 @@ jobs: # Documentation CI docs-build: docker: - - image: cimg/python:3.10 + - image: cimg/python:3.12 steps: - checkout # Download and cache dependencies - restore_cache: keys: - - v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }} + - v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }} # fallback to using the latest cache if no exact match is found - - v2-dependencies-python3.10- + - v2-dependencies-python3.12- - run: name: Install dependencies # Note that we the circleci node image installs stuff with a user "circleci", rather # than root. So we need to tell npm where to install stuff. command: | - python3 -m venv venv - . venv/bin/activate - pip install -r ./docs/requirements.txt + pip install uv + uv venv + source .venv/bin/activate + uv pip install -r ./docs/requirements.txt - save_cache: paths: - ./venv - key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }} + key: v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }} - run: name: Build docs command: | - . venv/bin/activate + source .venv/bin/activate cd docs/ make deploy_docs cd .. docs-build-deploy: docker: - - image: cimg/python:3.10-node + - image: cimg/python:3.12-node steps: - checkout # Download and cache dependencies - restore_cache: keys: - - v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }} + - v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }} # fallback to using the latest cache if no exact match is found - - v2-dependencies-python3.10- + - v2-dependencies-python3.12- - run: name: Install dependencies # Note that we the circleci node image installs stuff with a user "circleci", rather @@ -67,13 +68,14 @@ jobs: command: | npm set prefix=/home/circleci/npm npm install -g --silent gh-pages@2.0.1 - python3 -m venv venv - . venv/bin/activate - pip install -r ./docs/requirements.txt + pip install uv + uv venv + source .venv/bin/activate + uv pip install -r ./docs/requirements.txt - save_cache: paths: - ./venv - key: v2-dependencies-python3.10-{{ checksum "./docs/requirements.txt" }} + key: v2-dependencies-python3.12-{{ checksum "./docs/requirements.txt" }} - add_ssh_keys: # This SSH key is "CircleCI Docs" in https://github.com/move-coop/parsons/settings/keys # We need write access to the Parsons repo, so we can push the "gh-pages" branch. @@ -85,7 +87,7 @@ jobs: # (This file tell Github Pages that we want to include all files in docs/, including those # that start with an underscore like _static/). command: | - . venv/bin/activate + source .venv/bin/activate cd docs/ make deploy_docs cd .. From 009647cfcf6fd29b7daf766ea93bd584a3c9b5d8 Mon Sep 17 00:00:00 2001 From: Paul Anzel Date: Fri, 6 Sep 2024 12:38:56 -0400 Subject: [PATCH 3/3] Version bump for certain packages (#1121) * Version bump * Suds version fix * Higher mysql version * Pin google-api-core * Pin curlify, don't upgrade mysql --- requirements.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index b801d88b6..dbdb158d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,9 +6,11 @@ braintree==4.17.1 bs4==0.0.1 censusgeocode==0.4.3.post1 civis==1.16.1 +curlify==2.2.1 dbt_redshift==1.4.0 docutils<0.18,>=0.14 facebook-business==13.0.0 +google-api-core==2.19.2 google-api-python-client==1.7.7 google-auth==2.29.0 google-cloud-bigquery==3.23.1 @@ -27,14 +29,14 @@ petl==1.7.15 psycopg2-binary==2.9.9 PyGitHub==1.51 python-dateutil==2.8.2 -requests==2.31.0 +requests==2.32.0 requests_oauthlib==1.3.0 setuptools==70.0.0 simple-salesforce==1.11.6 simplejson==3.16.0 slackclient==1.3.0 sqlalchemy >= 1.4.22, != 1.4.33, < 2.0.0 # Prefect does not work with 1.4.33 and >3.0.0 has breaking changes -suds-py3==1.3.4.0 +suds-py3==1.4.4.1 surveygizmo==1.2.3 twilio==8.2.1 urllib3==1.26.19