From caf591ef288c92681b778bf97ca757fbe35ec604 Mon Sep 17 00:00:00 2001 From: kaloster Date: Mon, 9 Sep 2024 16:16:03 -0400 Subject: [PATCH] chore: add support for python 3.12 --- .github/workflows/compatibility_tests.yml | 11 +++++------ .github/workflows/push_tests.yml | 16 +++++++++------- client/jest-puppeteer.config.js | 4 ++-- server/requirements.txt | 5 +++-- setup.py | 7 ++++--- 5 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index 72edc0465..da1a28138 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -7,9 +7,9 @@ on: branches: - main - # For debug - uncomment below to run on all PRs - # pull_request: - # branches: "*" + ### For debugging purposes - uncomment below to run on all PRs + pull_request: + branches: "*" env: JEST_ENV: prod @@ -32,14 +32,13 @@ jobs: strategy: fail-fast: false matrix: - # note: The `macos-latest` is latest Catalina version, and not Big Sur. So we explicitly ask for Big Sur (`macos-11`) os: [ubuntu-latest, macos-latest, macos-13] - python-version: ["3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] cellxgene_build: [main, latest] # add anndata pinned version test for subset of matrix configurations, # in order to reduce matrix cross-product explosion include: - - python-version: 3.11 + - python-version: 3.12 cellxgene_build: latest # TODO: dynamically use the literal version in requirements.txt, # to avoid having to update this in manually in the future diff --git a/.github/workflows/push_tests.yml b/.github/workflows/push_tests.yml index 5de6038b1..20a77be5c 100644 --- a/.github/workflows/push_tests.yml +++ b/.github/workflows/push_tests.yml @@ -17,10 +17,10 @@ jobs: - uses: actions/checkout@v4 - run: | git fetch --depth=1 origin +${{github.base_ref}} - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - name: Node cache uses: actions/cache@v4 with: @@ -46,10 +46,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.11 (pyenv) # pyenv needed for mlflow in cli annotate tests + - name: Set up Python 3.12 (pyenv) # pyenv needed for mlflow in cli annotate tests uses: gabrielfalcao/pyenv-action@v9 with: - default: 3.11 + default: 3.12 command: pip install -U pip # upgrade pip after installing python - run: pip install virtualenv # virtualenv needed for mlflow in cli annotate tests - name: Python cache @@ -79,10 +79,10 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: 3.11 + python-version: 3.12 - name: Python cache uses: actions/cache@v4 with: @@ -98,7 +98,9 @@ jobs: restore-keys: | ${{ runner.os }}-node- - name: Install dependencies - run: make pydist install-dist + run: | + pip install setuptools + make pydist install-dist - name: Smoke tests (without annotations feature) run: | cd client && make smoke-test diff --git a/client/jest-puppeteer.config.js b/client/jest-puppeteer.config.js index a3391a6fd..0512e6260 100644 --- a/client/jest-puppeteer.config.js +++ b/client/jest-puppeteer.config.js @@ -23,7 +23,7 @@ const DEFAULT_LAUNCH_CONFIG = { const LAUNCH_CONFIG_BY_ENV = { [ENV_DEFAULT.DEBUG]: { ...DEFAULT_LAUNCH_CONFIG, - headless: false, + headless: true, slowMo: 100, devtools: true, defaultViewport: { @@ -33,7 +33,7 @@ const LAUNCH_CONFIG_BY_ENV = { }, [ENV_DEFAULT.DEV]: { ...DEFAULT_LAUNCH_CONFIG, - headless: false, + headless: true, slowMo: 5, }, }; diff --git a/server/requirements.txt b/server/requirements.txt index ddbdb3f3d..2af0df3eb 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -7,7 +7,7 @@ Flask-Cors>=3.0.9 Flask-RESTful>=0.3.6 flask-server-timing>=0.1.2 flask-talisman>=0.7.0 -flatbuffers>=1.11.0,<2.0.0 # cellxgene is not compatible with 2.0.0. Requires migration +flatbuffers==2.0.7 flatten-dict>=0.2.0 fsspec>0.8.0 gunicorn>=20.0.4 @@ -19,4 +19,5 @@ pandas>=2.2.2 PyYAML>=5.4 # CVE-2020-14343 requests>=2.22.0 s3fs==0.4.2 -scipy>=1.4 \ No newline at end of file +scipy>=1.4 +setuptools diff --git a/setup.py b/setup.py index 53b2c1b4b..38c187c94 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ long_description=long_description, long_description_content_type="text/markdown", install_requires=requirements, - python_requires=">=3.6", + python_requires=">=3.10", include_package_data=True, zip_safe=False, classifiers=[ @@ -37,8 +37,9 @@ "Operating System :: MacOS :: MacOS X", "Programming Language :: JavaScript", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Bio-Informatics", ],