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 poetry and pyproject.toml, adopt ruff and pre-commit, reorganize tests and CI, and update docs #57

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

keithchev
Copy link
Member

@keithchev keithchev commented Sep 12, 2024

This PR includes a number of changes that were made in a private fork of readlif at Arcadia. In September 2024, Arcadia took over ownership of the public readlif repo from its original maintainer (Nick), allowing us to contribute these changes back to the public repo.

Tooling

  • migrate the project to use poetry for dependency management and build tooling.
  • migrate the package from setup.py to pyproject.toml.
  • migrate the tests to pytest and reorganize test artifacts.
  • update and reorganize the CI workflow into separate workflows for linting and testing.
  • introduce ruff for formatting and linting.
  • introduce pre-commit hooks.

New features

  • add a convenience method to LifFile to get an image by name.
  • add a method to return an image as a numpy array.
  • add a method to parse laser powers from the XML metadata.

Other changes

  • fix a bug in get_plane related to reading 16-bit images.
  • move the changelog to its own file.
  • add dev docs and update the main README.

@keithchev keithchev requested review from lanery and ekiefl September 12, 2024 21:13
Copy link
Contributor

@ekiefl ekiefl left a comment

Choose a reason for hiding this comment

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

LGTM, just a few comments.

Makefile Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
version = "0.0.0"
description = "Fast Leica Image Format (LIF) file reader"
readme = "README.md"
license = "GPLv3"
Copy link
Contributor

Choose a reason for hiding this comment

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

Were any stipulations made about keeping the license as is during transfer of ownership? If we want to change to a more permissive license we can. IMO the linting/formatting in this PR qualifies as a reimplementation of past contributors' work, meaning we do not need the express permission of these contributors.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good q. No stipulations were made, but this is a legal thing that feels like it requires some care. Let's punt for now.

readlif/reader.py Outdated Show resolved Hide resolved
readlif/utilities.py Show resolved Hide resolved
Copy link

@lanery lanery left a comment

Choose a reason for hiding this comment

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

Exciting!

pyproject.toml Show resolved Hide resolved
@keithchev keithchev merged commit 02b9bd4 into master Sep 13, 2024
2 checks passed
@keithchev keithchev deleted the kcc/sync-from-fork branch September 13, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants