Skip to content

Commit

Permalink
[BUG] Fix python version compatibility issues affecting tests (conda-…
Browse files Browse the repository at this point in the history
…incubator#973)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
peytondmurray and pre-commit-ci[bot] authored Nov 14, 2024
1 parent aac4f4b commit 3d6c97f
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_conda_store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
working-directory: conda-store
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: "Checkout Repository 🛎"
uses: actions/checkout@v4
Expand All @@ -56,7 +56,7 @@ jobs:
- name: "Deploy docker compose 🏗️"
run: |
docker compose up -d
python_version=${{ matrix.python-version }} docker compose up --build -d
docker ps
wait-for-it localhost:5432 # postgresql
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/test_conda_store_server_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ concurrency:

jobs:
integration-test-conda-store-server:
name: "integration-test - ${{ matrix.test-type }}"
name: "integration-test - ${{ matrix.test-type }} (python ${{ matrix.python-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
test-type: ["playwright", "integration", "user-journey"]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -el {0}
Expand All @@ -38,18 +39,14 @@ jobs:
- name: "Checkout Repository 🛎"
uses: actions/checkout@v4

- name: "Get project's default Python version 🏷️"
run: |
echo "PYTHON_VERSION_DEFAULT=$(cat .python-version-default)" >> $GITHUB_ENV
- name: "Set up conda env 🐍"
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: conda-store-server/environment-dev.yaml
miniforge-version: latest
auto-activate-base: false
activate-environment: conda-store-server-dev
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
python-version: ${{ matrix.python-version }}

- name: "Install dependencies 📦"
run: |
Expand All @@ -60,7 +57,7 @@ jobs:
- name: "Deploy docker compose 🏗️"
run: |
docker compose up -d
python_version=${{ matrix.python-version }} docker compose up --build -d
docker ps
wait-for-it localhost:5432 # postgresql
Expand All @@ -78,7 +75,7 @@ jobs:
uses: actions/upload-artifact@v4
if: matrix.test-type == 'playwright'
with:
name: playwright-tests
name: playwright-tests-${{ matrix.python-version }}
path: conda-store-server/test-results

- name: "Run integration tests ✅"
Expand Down
2 changes: 1 addition & 1 deletion conda-store-server/conda_store_server/_internal/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Config:

@classmethod
def from_list(cls, lst):
return cls(**{k: v for k, v in zip(cls.__fields__.keys(), lst)})
return cls(**{k: v for k, v in zip(cls.__fields__.keys(), lst, strict=False)})


class Namespace(BaseModel):
Expand Down
4 changes: 2 additions & 2 deletions conda-store-server/environment-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ channels:
- conda-forge
- nodefaults
dependencies:
# must be kept in sync with .python-version-default
- python=3.12
# must be kept in sync with the min supported version in pyproject.toml
- python >=3.10
# conda builds
- conda
# dev dependencies
Expand Down
15 changes: 10 additions & 5 deletions conda-store-server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ name = "conda-store-server"
description = "Conda Environment Management, Builds, and Serve"
readme = "README.md"
license = "BSD-3-Clause"
requires-python = ">=3.8"
requires-python = ">=3.10,<3.13"
keywords = ["conda"]
authors = [
{ name = "Christopher Ostrouchov", email = "[email protected]" },
]
maintainers = [
{ name = "Tania Allard", email = "[email protected]" },
{ name = "Pavithra Eswaramoorthy", email = "[email protected]" },
{ name = "Peyton Murray", email = "[email protected]" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down Expand Up @@ -59,13 +58,17 @@ dependencies = [
"pyjwt",
"psycopg2-binary",
"pymysql",
# pyyaml>5.3.1 is broken with cython>=3 transitive dependency
# pyyaml>5.3.1,<6.0.1 is broken with cython>=3 transitive dependency
# See https://github.com/yaml/pyyaml/issues/724 for details
"pyyaml==5.3.1",
"pyyaml >=6.0.1",
"redis",
"requests",
"pydantic >=1.10.16,<2.0a0",
"python-multipart",
# setuptools>=70 uses local version of packaging (and other deps) without
# pinning them; conda-lock depends on this, but also doesn't pin the setuptools
# version. See https://github.com/pypa/setuptools/issues/4478 for details
"setuptools<70",
"sqlalchemy<2.0a0",
"traitlets",
"uvicorn",
Expand Down Expand Up @@ -192,6 +195,8 @@ ignore = [
"UP007", # non-pep604-annotation
"UP030", # format-literals
"UP031", # printf-string-formatting
"UP035", # deprecated-import
"UP038", # non-pep604-isinstance
]
select = [
"E", # pycodestyle
Expand Down
4 changes: 1 addition & 3 deletions conda-store/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "conda-store"
description = "conda-store client"
readme = "README.md"
license = "BSD-3-Clause"
requires-python = ">=3.8"
requires-python = ">=3.10,<3.13"
keywords = [
"conda",
"dependency management",
Expand All @@ -31,8 +31,6 @@ classifiers = [
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ services:
build:
context: conda-store-server
target: dev
args:
python_version: $python_version
user: 1000:1000
volumes:
- ./tests/assets/environments:/opt/environments:ro
Expand All @@ -22,6 +24,8 @@ services:
build:
context: conda-store-server
target: dev
args:
python_version: $python_version
user: 1000:1000
depends_on:
postgres:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: Local development setup for jupyterlab-conda-store

- Local [clone of your fork](community/contribute/contribute-code#setup-for-local-development) of the [`jupyterlab-conda-store-ui` repository](https://github.com/conda-incubator/jupyterlab-conda-store)
- [NodeJS `> 18`](https://nodejs.org/en/download/) installed on your local computer to build the extension package.
- Python `>= 3.8` (and `pip`)
- Python `>= 3.10` (and `pip`)

## Build and link the extension

Expand Down
18 changes: 10 additions & 8 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% set name = "conda-store" %}
# version MUST be updated when a new release is made
{% set version = "2024.6.1" %}
{% set version = "2024.11.1" %}

package:
name: {{ name|lower }}-split
Expand All @@ -27,17 +27,17 @@ outputs:
- conda-store = conda_store.__main__:main
requirements:
host:
- python >=3.8
- python >=3.10,<3.13
- pip
- hatchling >=1.14.0
- hatch-vcs
run:
- __linux # [linux]
- __osx # [osx]
- __win # [win]
- aiohttp>=3.8.1
- aiohttp >=3.8.1
- click
- python >=3.8
- python >=3.10,<3.13
- rich
- ruamel.yaml
- yarl
Expand All @@ -60,7 +60,7 @@ outputs:
- conda-store-worker = conda_store_server._internal.worker.__main__:main
requirements:
host:
- python >=3.8
- python >=3.10,<3.13
- pip
- hatchling >=1.14.0
- hatch-vcs
Expand All @@ -82,10 +82,10 @@ outputs:
- minio
- pydantic <2.0a0
- pyjwt
- python >=3.8
- python >=3.10,<3.13
- python-docker
- python-multipart
- pyyaml
- pyyaml >=6.0.1
- redis-py
- requests
- sqlalchemy <2.0a0
Expand Down Expand Up @@ -115,11 +115,13 @@ about:
philosophy of conda-store is to serve identical conda environments
in as many ways as possible. Conda Store controls the environment
lifecycle: management, builds, and serving of environments.
doc_url: https://conda.store
doc_url: https://conda.store/
dev_url: https://github.com/conda-incubator/conda-store

extra:
feedstock-name: conda-store
recipe-maintainers:
- peytondmurray
- soapy1
- trallard
- jaimergp

0 comments on commit 3d6c97f

Please sign in to comment.