Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pyproject.toml #4

Merged
merged 3 commits into from
Feb 7, 2025
Merged
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
50 changes: 25 additions & 25 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ on:
push:
pull_request:
schedule:
- cron: "0 0 1 * *"
- cron: "0 0 1 * *"

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.7', '3.8']
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [ '3.9', '3.10', '3.12' ]
os: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# prerequisites
python -m pip install --upgrade pip wheel
python -m pip install coverage flake8 pytest
# install dependencies
pip install -e .
# show installed packages
pip freeze
- name: Test with pytest
run: |
coverage run --source=flimage -m pytest tests
- name: Lint with flake8
run: |
flake8 --exclude _version.py .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# prerequisites
python -m pip install --upgrade pip wheel
python -m pip install coverage flake8 pytest
# install dependencies
pip install -e .
# show installed packages
pip freeze
- name: Test with pytest
run: |
coverage run --source=flimage -m pytest tests
- name: Lint with flake8
run: |
flake8 --exclude _version.py .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,4 @@ venv.bak/
.mypy_cache/
_version_save.py
.idea
_version.py
197 changes: 0 additions & 197 deletions flimage/_version.py

This file was deleted.

41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[project]
name = "flimage"
authors = [
{name = "Paul Müller", email = "[email protected]"}
]
description = "library for manipulating fluorescence microscopy series data"
readme = "README.rst"
license = {file = "LICENSE"}
requires-python = ">=3.6, <4"
dynamic = ["version"]
keywords = ["fluorescence microscopy", "bleach correction"]
classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research"
]

dependencies = [
"h5py>=2.7.0",
"lmfit>=0.9.8",
"numpy>=1.9.0",
"qpimage>=0.5.1",
"scikit-image>=0.11.0"
]

[project.urls]
Homepage = "https://github.com/RI-imaging/flimage"

[tool.setuptools_scm]
write_to = "flimage/_version.py"
version_scheme = "post-release"

[tool.setuptools.packages.find]
where = ["."]
include = ["flimage"]


2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

42 changes: 0 additions & 42 deletions setup.py

This file was deleted.

Binary file modified tests/data/basic.h5
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_series_meta():
flimage.FLImage(h5file=h5file,
meta_data={"pixel size": 0.054e-6},
h5mode="r")
except (OSError, RuntimeError):
except (OSError, RuntimeError, KeyError):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like later versions of h5py raise a KeyError instead. Exception message "no write intent on file" is the same, though.

# no write intent on file
pass
else:
Expand Down