Skip to content

Commit

Permalink
loosen dependency requirement pins for nebari (#2984)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam-D-Lewis authored Mar 11, 2025
1 parent 81c1f4f commit 9894c84
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/test_conda_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ jobs:
python-version: "3.10"
channels: conda-forge
activate-environment: nebari-dev
conda-remove-defaults: true

- name: Install dependencies
run: |
conda install build grayskull conda-build conda-verify
conda install grayskull conda-build conda-verify
pip install build
- name: Conda list
run: |
conda list
- name: Generate sdist
run: |
Expand All @@ -50,9 +56,15 @@ jobs:
- name: Build conda package
run: |
conda build nebari
conda build . --output-folder conda-bld
# Store the path for the next step
echo "CONDA_BLD_PATH=$(pwd)/conda-bld" >> $GITHUB_ENV
- name: Test conda package
run: |
conda install --use-local nebari
nebari --version
NEBARI_VERSION=$(conda search -c local --override-channels nebari --json | jq -r '.nebari[0].version')
conda create -n test-env -c file://${{ env.CONDA_BLD_PATH }} "nebari=$NEBARI_VERSION"
conda run -n test-env --live-stream nebari --version
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies = [
"bcrypt==4.0.1",
"boto3==1.34.63",
"cloudflare==2.11.7",
"google-auth==2.31.0",
"google-auth>=2.31.0,<3.0.0",
"google-cloud-compute==1.19.1",
"google-cloud-container==2.49.0",
"google-cloud-iam==2.15.1",
Expand All @@ -72,12 +72,12 @@ dependencies = [
"kubernetes==27.2.0",
"pluggy==1.3.0",
"prompt-toolkit==3.0.36",
"pydantic==2.9.2",
"pydantic>=2.9.2,<3.0.0",
"pynacl==1.5.0",
"python-keycloak>=3.9.0,<4.0.0",
"questionary==2.0.0",
"requests-toolbelt==1.0.0",
"rich==13.5.1",
"rich>=13.5.1,<14",
"ruamel.yaml==0.18.6",
"typer==0.9.0",
"packaging==23.2",
Expand All @@ -90,7 +90,6 @@ dev = [
"coverage[toml]",
"dask-gateway",
"escapism",
"importlib-metadata<5.0",
"mypy==1.6.1",
"paramiko",
"pre-commit",
Expand Down
6 changes: 1 addition & 5 deletions tests/tests_unit/test_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,14 @@ def test_check_immutable_fields_mutable_change(


@patch.object(TerraformStateStage, "get_nebari_config_state")
@patch.object(schema.Main, "model_fields")
def test_check_immutable_fields_immutable_change(
mock_model_fields, mock_get_state, terraform_state_stage, mock_config
mock_get_state, terraform_state_stage, mock_config
):
old_config = mock_config.model_copy(deep=True)
old_config.local = None
old_config.provider = schema.ProviderEnum.gcp
mock_get_state.return_value = old_config.model_dump()

# Mock the provider field to be immutable
mock_model_fields.__getitem__.return_value.json_schema_extra = {"immutable": True}

with pytest.raises(ValueError) as exc_info:
terraform_state_stage.check_immutable_fields()

Expand Down

0 comments on commit 9894c84

Please sign in to comment.