Skip to content

Commit

Permalink
Merge branch 'main' into conda-package-build-update
Browse files Browse the repository at this point in the history
  • Loading branch information
trallard authored Nov 18, 2024
2 parents 49af00b + 6be6ab5 commit 712d65b
Show file tree
Hide file tree
Showing 20 changed files with 142 additions and 41 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build_pypi_package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Build PyPI package"

on:
pull_request:
paths:
- ".github/workflows/**"
- "conda-store/**"
- "conda-store-server/**"
- "tests/**"
push:
branches:
- main

env:
FORCE_COLOR: "1" # Make tools pretty.

permissions:
contents: read # This is required for actions/checkout

jobs:
# Always build & verify package.
build-package:
name: "Build & verify package"
runs-on: ubuntu-latest
strategy:
matrix:
directory:
- "conda-store"
- "conda-store-server"
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- name: "Checkout Repository 🛎"
uses: actions/checkout@v4
with:
fetch-depth: 0

- run: echo "Running on ${{ matrix.directory }}"

- name: "Build and check package - ${{ matrix.directory }} 📦"
uses: hynek/build-and-inspect-python-package@v2
id: baipp
with:
path: ${{ matrix.directory }}
upload-name-suffix: "-${{ matrix.directory }}"

- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }} and in artifact ${{ steps.baipp.outputs.artifact-name }}
1 change: 1 addition & 0 deletions .github/workflows/generate_api_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: conda-store-server/environment-dev.yaml
conda-remove-defaults: "true"

- name: "Install conda-store-server 📦"
run: python -m pip install conda-store-server/.
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: "Build and maybe upload PyPI package"
name: "Build and upload PyPI package"

on:
release:
types: [published]
push:
branches: [main]
tags: ["*"]
pull_request:
branches:
- main
workflow_dispatch:

env:
FORCE_COLOR: "1" # Make tools pretty.

permissions:
contents: read # This is required for actions/checkout
attestations: write
id-token: write # Needed for attestations

jobs:
# Always build & verify package.
Expand Down Expand Up @@ -44,6 +42,7 @@ jobs:
with:
path: ${{ matrix.directory }}
upload-name-suffix: "-${{ matrix.directory }}"
attest-build-provenance-github: "true"

- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }} and in artifact ${{ steps.baipp.outputs.artifact-name }}

Expand Down
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
14 changes: 6 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,15 @@ 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 }}
conda-remove-defaults: "true"

- name: "Install dependencies 📦"
run: |
Expand All @@ -60,7 +58,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 +76,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
1 change: 1 addition & 0 deletions .github/workflows/test_conda_store_server_unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
auto-activate-base: false
activate-environment: conda-store-server-dev
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
conda-remove-defaults: "true"

# This fixes a "DLL not found" issue importing ctypes from the hatch env
- name: "Reinstall Python on Windows runner"
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,46 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
The project changed to `CalVer` in September 2023.

## [2024.11.1] - 2024-11-08

([full changelog](https://github.com/conda-incubator/conda-store/compare/2104c4581489474a6f6c6c6b5744c5eeb62b3d14...92a199b52ee4a91d931afcdfb46aca4663c07ebe))

### Merged PRs

- Bump k8 example version [#960](https://github.com/conda-incubator/conda-store/pull/960) ([@soapy1](https://github.com/soapy1))
- [pre-commit.ci] pre-commit autoupdate [#959](https://github.com/conda-incubator/conda-store/pull/959) ([@pre-commit-ci](https://github.com/pre-commit-ci))
- [DOC] Roadmap updates [#958](https://github.com/conda-incubator/conda-store/pull/958) ([@peytondmurray](https://github.com/peytondmurray))
- Move build to worker [#945](https://github.com/conda-incubator/conda-store/pull/945) ([@soapy1](https://github.com/soapy1))
- Fix link to GH issues for road map (operation) items [#943](https://github.com/conda-incubator/conda-store/pull/943) ([@soapy1](https://github.com/soapy1))
- Make conda-store server launch uvicorn with log level [#940](https://github.com/conda-incubator/conda-store/pull/940) ([@soapy1](https://github.com/soapy1))
- Add links to GH issues for roadmap items [#939](https://github.com/conda-incubator/conda-store/pull/939) ([@soapy1](https://github.com/soapy1))
- Move dependencies module into conda store server module [#935](https://github.com/conda-incubator/conda-store/pull/935) ([@soapy1](https://github.com/soapy1))
- [MAINT] Update lint tooling [#933](https://github.com/conda-incubator/conda-store/pull/933) ([@peytondmurray](https://github.com/peytondmurray))
- Remove unused _internal/client module [#928](https://github.com/conda-incubator/conda-store/pull/928) ([@soapy1](https://github.com/soapy1))
- [AUTO] Update openapi.json [#927](https://github.com/conda-incubator/conda-store/pull/927) ([@github-actions](https://github.com/github-actions))
- Add tests - storage + worker [#926](https://github.com/conda-incubator/conda-store/pull/926) ([@soapy1](https://github.com/soapy1))
- Move seeding tests functionality into test module [#925](https://github.com/conda-incubator/conda-store/pull/925) ([@soapy1](https://github.com/soapy1))
- Add coverage report to unit tests [#923](https://github.com/conda-incubator/conda-store/pull/923) ([@soapy1](https://github.com/soapy1))
- Update docs link [#922](https://github.com/conda-incubator/conda-store/pull/922) ([@pavithraes](https://github.com/pavithraes))
- Test improvements - part 1 [#919](https://github.com/conda-incubator/conda-store/pull/919) ([@soapy1](https://github.com/soapy1))
- Bump http-proxy-middleware from 2.0.6 to 2.0.7 in /docusaurus-docs [#917](https://github.com/conda-incubator/conda-store/pull/917) ([@dependabot](https://github.com/dependabot))
- [BUG] Pin pyyaml dependency due to cython>=3 incompatibility [#916](https://github.com/conda-incubator/conda-store/pull/916) ([@peytondmurray](https://github.com/peytondmurray))
- Wait for celery to return response to request to solve specification [#913](https://github.com/conda-incubator/conda-store/pull/913) ([@soapy1](https://github.com/soapy1))
- [DOCS] Describe new config vars for React router [#912](https://github.com/conda-incubator/conda-store/pull/912) ([@gabalafou](https://github.com/gabalafou))
- Bump version for dev [#910](https://github.com/conda-incubator/conda-store/pull/910) ([@soapy1](https://github.com/soapy1))
- REL - 2024.10.1 [#909](https://github.com/conda-incubator/conda-store/pull/909) ([@soapy1](https://github.com/soapy1))
- [DOCS] Update architecture diagram + fix docs links [#908](https://github.com/conda-incubator/conda-store/pull/908) ([@soapy1](https://github.com/soapy1))
- [ENH] Add hot reloading for development [#907](https://github.com/conda-incubator/conda-store/pull/907) ([@peytondmurray](https://github.com/peytondmurray))
- DEV - Extend compose to include target for local UI [#905](https://github.com/conda-incubator/conda-store/pull/905) ([@trallard](https://github.com/trallard))
- Respect worker log level config setting [#903](https://github.com/conda-incubator/conda-store/pull/903) ([@soapy1](https://github.com/soapy1))
- [DOC] Update contributing guidelines [#763](https://github.com/conda-incubator/conda-store/pull/763) ([@pavithraes](https://github.com/pavithraes))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/conda-incubator/conda-store/graphs/contributors?from=2024-10-22&to=2024-11-08&type=c))

[@Adam-D-Lewis](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3AAdam-D-Lewis+updated%3A2024-10-22..2024-11-08&type=Issues) | [@costrouc](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Acostrouc+updated%3A2024-10-22..2024-11-08&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Adependabot+updated%3A2024-10-22..2024-11-08&type=Issues) | [@gabalafou](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Agabalafou+updated%3A2024-10-22..2024-11-08&type=Issues) | [@github-actions](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Agithub-actions+updated%3A2024-10-22..2024-11-08&type=Issues) | [@jaimergp](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Ajaimergp+updated%3A2024-10-22..2024-11-08&type=Issues) | [@kcpevey](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Akcpevey+updated%3A2024-10-22..2024-11-08&type=Issues) | [@krassowski](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Akrassowski+updated%3A2024-10-22..2024-11-08&type=Issues) | [@netlify](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Anetlify+updated%3A2024-10-22..2024-11-08&type=Issues) | [@pavithraes](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Apavithraes+updated%3A2024-10-22..2024-11-08&type=Issues) | [@peytondmurray](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Apeytondmurray+updated%3A2024-10-22..2024-11-08&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Apre-commit-ci+updated%3A2024-10-22..2024-11-08&type=Issues) | [@soapy1](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Asoapy1+updated%3A2024-10-22..2024-11-08&type=Issues) | [@trallard](https://github.com/search?q=repo%3Aconda-incubator%2Fconda-store+involves%3Atrallard+updated%3A2024-10-22..2024-11-08&type=Issues)


## [2024.10.1] - 2024-10-22

Expand Down
2 changes: 1 addition & 1 deletion conda-store-server/conda_store_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from .app import CondaStore


__version__ = "2024.11.1-dev"
__version__ = "2024.11.2-dev"


CONDA_STORE_DIR = platformdirs.user_data_path(appname="conda-store")
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
5 changes: 2 additions & 3 deletions conda-store-server/environment-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
name: conda-store-server-dev
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
2 changes: 1 addition & 1 deletion conda-store/conda_store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

__version__ = "2024.11.1-dev"
__version__ = "2024.11.2-dev"
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
6 changes: 6 additions & 0 deletions docusaurus-docs/conda-store/how-tos/install-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ kubectl port-forward service/conda-store-server 8080:8080

Then visit via your web browser [http://localhost:8080](http://localhost:8080)

To enable viewing logs, make sure to also port forward the minio service

```shell
kubectl port-forward service/minio 30900:9000
```

For additional configuration options see the [reference guide](../references/configuration-options.md)

A good test that conda-store is functioning properly is to apply the
Expand Down
2 changes: 1 addition & 1 deletion docusaurus-docs/static/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@
},
"info": {
"title": "conda-store",
"version": "2024.11.1-dev"
"version": "2024.11.2-dev"
},
"openapi": "3.1.0",
"paths": {
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/conda-store-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
spec:
containers:
- name: conda-store-server
image: quansight/conda-store-server:v0.4.5
image: quansight/conda-store-server:2024.10.1
args:
- "conda-store-server"
- "--config"
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/conda-store-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
spec:
containers:
- name: conda-store-server
image: quansight/conda-store-server:v0.4.5
image: quansight/conda-store-server:2024.10.1
args:
- "conda-store-worker"
- "--config"
Expand Down
Loading

0 comments on commit 712d65b

Please sign in to comment.