Skip to content

Commit db1865c

Browse files
committed
use pip for dev envs
1 parent 81b6a3b commit db1865c

File tree

5 files changed

+6
-256
lines changed

5 files changed

+6
-256
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -98,72 +98,14 @@ jobs:
9898

9999
steps:
100100
- uses: actions/checkout@v4
101-
- id: setup
102-
run: |
103-
echo "env-name=${{ matrix.spec }}-${{ matrix.conda-env }}-${{ matrix.python-version }}"
104-
echo "env-name=${{ matrix.spec }}-${{ matrix.conda-env }}-${{ matrix.python-version }}" >> $GITHUB_OUTPUT
105-
echo "env-file=dev/env-${{ matrix.conda-env }}.yaml"
106-
echo "env-file=dev/env-${{ matrix.conda-env }}.yaml" >> $GITHUB_OUTPUT
107-
- name: check on env-file
108-
shell: python
109-
run: |
110-
from pathlib import Path
111-
from pprint import pprint
112-
if not (env_path:=Path("${{steps.setup.outputs.env-file}}")).exists():
113-
if env_path.parent.exists():
114-
pprint(env_path.parent.glob("*"))
115-
else:
116-
pprint(Path().glob("*"))
117-
raise FileNotFoundError(f"{env_path} does not exist")
118-
119-
- uses: conda-incubator/setup-miniconda@v3
120-
with:
121-
auto-update-conda: true
122-
activate-environment: ${{steps.setup.outputs.env-name}}
123-
channel-priority: strict
124-
miniforge-version: latest
125-
python-version: ${{ matrix.python-version }}
126-
- name: Get Date
127-
id: get-date
128-
run: |
129-
echo "today=$(date -u '+%Y%m%d')"
130-
echo "today=$(date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
131-
- name: Restore cached env
132-
uses: actions/cache/restore@v4
101+
- uses: actions/setup-python@v5
133102
with:
134-
path: ${{env.CONDA}}/envs
135-
key: >-
136-
conda-${{runner.os}}-${{runner.arch}}
137-
-${{steps.get-date.outputs.today}}
138-
-${{hashFiles(steps.setup.outputs.env-file)}}
139-
-${{env.CACHE_NUMBER}}
140-
env:
141-
CACHE_NUMBER: 1
142-
id: cache-env
143-
- name: Install env
144-
if: steps.cache-env.outputs.cache-hit != 'true'
145-
run: |
146-
conda env update --name=${{steps.setup.outputs.env-name}} --file=${{steps.setup.outputs.env-file}}
147-
- name: Ensure Python/numpy version
148-
if: steps.cache-env.outputs.cache-hit != 'true'
149-
run: |
150-
conda install python=${{matrix.python-version}} numpy=${{matrix.numpy-version}}
151-
- name: Cache env
152-
if: steps.cache-env.outputs.cache-hit != 'true'
153-
uses: actions/cache/save@v4
154-
with:
155-
path: ${{env.CONDA}}/envs
156-
key: >-
157-
conda-${{runner.os}}-${{runner.arch}}
158-
-${{steps.get-date.outputs.today}}
159-
-${{hashFiles(steps.setup.outputs.env-file)}}
160-
-${{env.CACHE_NUMBER}}
161-
env:
162-
CACHE_NUMBER: 1
163-
- name: Force reinstall of developed package
103+
python-version: ${{matrix.python-version}}
104+
cache: 'pip'
105+
- name: Install dependencies
164106
run: |
165-
pip install --upgrade --no-deps --force-reinstall -e .
166-
- run: conda list
107+
pip install --upgrade pip
108+
pip install -e .[dev] numpy=${{matrix.numpy-version}}
167109
- name: Pyright
168110
if: matrix.run-expensive-tests
169111
run: |

dev/env-313.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

dev/env-dev.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

dev/env-full.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

dev/env-gpu.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)