Skip to content

Commit d58f7ce

Browse files
committed
Conda to uv
1 parent 83fa4bb commit d58f7ce

34 files changed

+4183
-79
lines changed

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,22 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v3
19+
- uses: astral-sh/setup-uv@v3
20+
with:
21+
version: "latest"
1922
- name: Install system dependencies
2023
run: |
2124
sudo apt-get update
2225
sudo apt-get install -y pandoc
23-
- uses: actions/setup-python@v2
24-
with:
25-
python-version: '3.9'
2626
- name: Install vitessce
27-
run: pip install -e .[dev,docs,all]
27+
run: uv sync --extra dev --extra docs --extra all
2828
- name: Run tests
29-
run: pytest
29+
run: uv run pytest
3030
- name: Build a binary wheel and a source tarball
31-
run: >-
32-
python -m
33-
build
34-
--sdist
35-
--wheel
36-
--outdir dist/
37-
.
31+
run: uv build --sdist --wheel
3832
- name: Build docs
3933
run: |
40-
make html
34+
uv run make html
4135
touch docs-dist/html/.nojekyll
4236
- uses: actions/upload-pages-artifact@v1
4337
with:

.github/workflows/docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10+
- uses: astral-sh/setup-uv@v3
11+
with:
12+
version: "latest"
1013
- name: Install system dependencies
1114
run: |
1215
sudo apt-get update
1316
sudo apt-get install -y pandoc
14-
- uses: actions/setup-python@v2
15-
with:
16-
python-version: '3.9'
17-
- run: pip install -e .[docs,all]
18-
- run: make html
17+
- run: uv sync --extra docs --extra all
18+
- run: uv run make html

.github/workflows/lint.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- uses: actions/setup-python@v2
10+
- uses: astral-sh/setup-uv@v3
1111
with:
12-
python-version: '3.9'
13-
architecture: 'x64'
14-
- run: pip install .[dev]
12+
version: "latest"
13+
- run: uv sync --extra dev
1514
- run: flake8

.github/workflows/test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,21 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
version: ['3.9', '3.12']
10+
version: ['3.10', '3.12']
1111
steps:
1212
- uses: actions/checkout@v2
13-
- uses: actions/setup-python@v2
13+
- uses: astral-sh/setup-uv@v3
1414
with:
15-
python-version: ${{ matrix.version }}
15+
version: "latest"
16+
env:
17+
UV_PYTHON: ${{ matrix.version }}
1618
- name: Install vitessce
17-
run: pip install -e .[dev,all]
19+
run: uv sync --extra dev --extra all
1820
- name: Run tests and report coverage with omits
1921
run: |
20-
coverage run --rcfile .coveragerc_omit --module pytest && \
21-
coverage report --show-missing --fail-under 100
22+
uv run coverage run --rcfile .coveragerc_omit --module pytest && \
23+
uv run coverage report --show-missing --fail-under 100
2224
- name: Run tests and report coverage without omits
2325
run: |
24-
coverage run --rcfile .coveragerc_real --module pytest && \
25-
coverage report --show-missing
26+
uv run coverage run --rcfile .coveragerc_real --module pytest && \
27+
uv run coverage report --show-missing

.github/workflows/test_demos.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- uses: actions/setup-python@v2
10+
- uses: astral-sh/setup-uv@v3
1111
with:
12-
python-version: '3.9'
13-
- run: |
14-
pip install "pulp==2.7.0"
15-
pip install snakemake
16-
pip install pyyaml
12+
version: "latest"
1713
- name: Install vitessce
18-
run: pip install -e .[dev,all]
14+
run: uv sync --extra dev --extra all --extra demos
1915
- name: Run tests
2016
working-directory: ./demos
21-
run: snakemake -j 1 --dry-run
17+
run: uv run snakemake -j 1 --dry-run

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ For a development installation (requires NodeJS and NPM),
2828

2929
$ git clone https://github.com/vitessce/vitessce-python.git
3030
$ cd vitessce-python
31-
$ conda env create -f environment.yml
32-
$ conda activate vitessce-python-dev
33-
$ pip install -e ".[dev,docs,all]"
31+
$ uv sync --extra dev --extra docs --extra all
3432

3533
### Conda environments
3634

@@ -43,29 +41,29 @@ In this repository, there are multiple conda environments for different purposes
4341
## Linting and testing
4442

4543
```sh
46-
flake8
47-
pytest
44+
uv run flake8
45+
uv run pytest
4846
```
4947

5048
### Formatting
5149

5250
One file:
5351

5452
```sh
55-
autopep8 --in-place --aggressive ./path/to/file.py
53+
uv run autopep8 --in-place --aggressive ./path/to/file.py
5654
```
5755

5856
All `.py` files:
5957

6058
```sh
61-
find . -name '*.py' -exec autopep8 --in-place --aggressive '{}' \;
59+
find . -name '*.py' -exec uv run autopep8 --in-place --aggressive '{}' \;
6260
```
6361

6462

6563
## Documentation
6664

6765
```sh
68-
make html
66+
uv run make html
6967
```
7068

7169

docs/notebooks/.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/notebooks/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ Some of the example notebooks rely on external single-cell data analysis package
88

99
```sh
1010
cd docs/notebooks
11-
conda env create -f environment.yml
12-
conda activate vitessce-python-notebooks
13-
pip install -e "../..[dev]"
11+
uv sync --extra dev --extra docs --extra all
1412
```
1513

1614
## Run
1715

1816
```sh
19-
jupyter lab
17+
uv run jupyter lab
2018
```
2119

2220
## Troubleshooting

0 commit comments

Comments
 (0)