Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: conda-env.yml
channels: conda-forge
- name: Install pytest
run: |
conda install pytest --yes

- name: Install uv
uses: astral-sh/setup-uv@v2

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --dev

- name: Run tests
run: |
python -m pytest
run: uv run pytest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ cython_debug/

# macOS
.DS_Store

# uv
uv.lock
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ Once you have a terminal (or "Anaconda prompt" on Windows) open after installati
1. Change to a directory where you want to download this code.
2. `git clone https://github.com/HiPCTProject/rebin`
3. `cd rebin`
4. `conda env create -f conda-env.yml`
4. `conda env create --name rebin`
5. `conda activate rebin`
6. `conda install uv`
7. `uv sync`

Now you should be able to run the rebinning code using the example below.

Expand Down
9 changes: 0 additions & 9 deletions conda-env.yml

This file was deleted.

27 changes: 17 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
[tool.mypy]
ignore_missing_imports = true
no_implicit_optional = false
[project]
name = "rebin"
version = "0.1.0"
description = "Re-bin JPEG2000 images"
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"click",
"dask",
"glymur",
"joblib",
"numpy",
"scikit-image",
]

[tool.ruff]
fix = true
force-exclude = true
select = [
"F401", # Remove unused imports
"I", # Sort imports
"UP", # Update Python syntax
[tool.uv]
dev-dependencies = [
"pytest",
]
2 changes: 0 additions & 2 deletions requirements-dev.txt

This file was deleted.

5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.