Skip to content

Commit

Permalink
Bump Python, iohub, and waveorder (#478)
Browse files Browse the repository at this point in the history
* update iohub dependency

* bump waveorder

* update workflow and format yaml

* bump python

* bump tox env

* update workflow

* remove unused arguments

* prepare to unpin pydantic

---------

Co-authored-by: Aaron Alvarez <aaron.alvarez@czbiohub.org>
  • Loading branch information
ziw-liu and aaronalvarezcz committed Jul 16, 2024
1 parent 7687259 commit 9f0a37a
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 41 deletions.
53 changes: 26 additions & 27 deletions .github/workflows/pytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,37 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[acq,dev]"
# - name: Lint with flake8
# run: |
# pip install flake8
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: |
pytest -v
pytest --cov=./ --cov-report=xml
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[acq,dev]"
# - name: Lint with flake8
# run: |
# pip install flake8
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: |
pytest -v
pytest --cov=./ --cov-report=xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', '3.10', '3.11']
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -85,4 +85,4 @@ jobs:
# run: |
# git tag
# python -m build .
# twine upload --repository testpypi dist/* # Commented until API key is on github
# twine upload --repository testpypi dist/* # Commented until API key is on github
5 changes: 1 addition & 4 deletions recOrder/cli/apply_inverse_models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This module converts recOrder's reconstructions into waveorder calls
"""

import numpy as np
import torch
from waveorder.models import (
Expand Down Expand Up @@ -99,8 +100,6 @@ def phase(
real_potential_transfer_function,
imaginary_potential_transfer_function,
z_padding=settings_phase.transfer_function.z_padding,
z_pixel_size=settings_phase.transfer_function.z_pixel_size,
wavelength_illumination=settings_phase.transfer_function.wavelength_illumination,
**settings_phase.apply_inverse.dict(),
)

Expand Down Expand Up @@ -213,8 +212,6 @@ def birefringence_and_phase(
real_potential_transfer_function,
imaginary_potential_transfer_function,
z_padding=settings_phase.transfer_function.z_padding,
z_pixel_size=settings_phase.transfer_function.z_pixel_size,
wavelength_illumination=settings_phase.transfer_function.wavelength_illumination,
**settings_phase.apply_inverse.dict(),
)

Expand Down
2 changes: 1 addition & 1 deletion recOrder/cli/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from typing import List, Literal, Optional, Union

from pydantic import (
from pydantic.v1 import (
BaseModel,
Extra,
NonNegativeFloat,
Expand Down
2 changes: 1 addition & 1 deletion recOrder/tests/cli_tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from recOrder.cli import settings
from recOrder.io import utils
from pydantic import ValidationError
from pydantic.v1 import ValidationError


def test_reconstruction_settings():
Expand Down
9 changes: 5 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ classifiers =
License :: OSI Approved :: BSD License
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Visualization
Topic :: Scientific/Engineering :: Information Analysis
Expand All @@ -33,17 +33,18 @@ project_urls =
[options]
packages = find:
include_package_data = True
python_requires = >=3.9
python_requires = >=3.10
setup_requires = setuptools_scm
install_requires =
waveorder==2.0.0rc3
waveorder==2.2.0rc0
click>=8.0.1
natsort>=7.1.1
colorspacious>=1.1.2
importlib-metadata
iohub==0.1.0.dev5
iohub==0.1.0
wget>=3.2
psutil
pydantic>=1.10.17

[options.extras_require]
dev =
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Modified from from cookiecutter-napari-plugin
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{39,310,311}-{linux,macos,windows}
envlist = py{310,311,312}-{linux,macos,windows}
isolated_build=true

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[gh-actions:env]
PLATFORM =
Expand Down

0 comments on commit 9f0a37a

Please sign in to comment.