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

update deps and readme #43

Merged
merged 27 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
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
46 changes: 26 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ name: CI

on:
push:
branches:
- main
tags:
- "v*"
branches: [main]
tags: [v*]
pull_request:
workflow_dispatch:

jobs:
check-manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: pipx run check-manifest

test:
name: ${{ matrix.platform }} (${{ matrix.python-version }})
runs-on: ${{ matrix.platform }}
Expand All @@ -19,34 +23,38 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
platform: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
platform: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: tlambert03/setup-qt-libs@v1

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true

- name: Install OpenCL
if: matrix.platform == 'ubuntu-latest'
run: mamba install pyopencl pocl

- name: Install dependencies
run: |
mamba install pyopencl pocl
sudo apt-get install -y xvfb
pip install -U pip wheel
pip install -e .[tests]
python -m pip install -U pip
python -m pip install -e .[test,pyqt5]

- name: Test with xvfb
if: runner.os == 'Linux'
run: xvfb-run --auto-servernum pytest --cov llspy
- name: Test
uses: aganders3/headless-gui@v2
with:
shell: bash -el {0}
run: python -m pytest --cov llspy

- name: Coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3

deploy:
name: Deploy
Expand All @@ -55,7 +63,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
Expand All @@ -70,9 +78,7 @@ jobs:
python -m build .

- name: twine check
run: |
twine check dist/*
ls -lh dist
run: twine check dist/*

- name: Build and publish
run: twine upload dist/*
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ tests/testdata/sample/MIPs/
tests/testdata/sample/sample_ProcessingLog.txt
tests/testdata/sample/GPUdecon/

llspy/_version.py
src/llspy/_version.py
49 changes: 22 additions & 27 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
ci:
autoupdate_schedule: monthly
autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]"
autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.1

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
- id: validate-pyproject

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports==1.7.0]
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.1
hooks:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]
- id: ruff
args: [--fix, --unsafe-fixes]
- id: ruff-format

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.812
# rev: v1.9.0
# hooks:
# - id: mypy
# files: "^src/"
# # # you have to add the things you want to type check against here
# # additional_dependencies:
# # - numpy
8 changes: 4 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include README.rst
include CHANGELOG.rst

recursive-include llspy *.py
recursive-include llspy *.ui
recursive-include llspy *.ini
recursive-include llspy *.png
recursive-include src/llspy *.py
recursive-include src/llspy *.ui
recursive-include src/llspy *.ini
recursive-include src/llspy *.png
recursive-include img *

recursive-exclude tests *
Expand Down
17 changes: 4 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,15 @@ Requirements
Installation
============

**Note**: *As of version 0.4.2 cudaDecon is now included in the LLSpy conda package and requires no additional steps for installation. Horray for open source!*


#. Install `Anaconda <https://www.anaconda.com/download/>`_ or `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_
#. Launch a ``terminal`` window (OS X, Linux), or ``Anaconda Prompt`` (Windows)
#. Add the "conda-forge" and "talley" channels to your conda config

.. code:: bash

$ conda config --add channels conda-forge
$ conda config --add channels talley

#. Install `conda <https://github.com/conda-forge/miniforge>`_
#. Launch a ``terminal`` window (Linux), or ``Anaconda Prompt`` (Windows)
#. Install LLSpy into a new conda environment

.. code:: bash

$ conda create -n llsenv python=3.6 llspy
$ conda create -n llsenv python=3.11 cudadecon
$ conda activate llsenv
$ pip install llspy

The ``create -n llsenv`` line creates a virtual environment. This is optional, but recommended as it easier to uninstall cleanly and prevents conflicts with any other python environments. If installing into a virtual environment, you must source the environment before proceeding, and each time before using llspy.

Expand Down
90 changes: 88 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,93 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "llspy/_version.py"
write_to = "src/llspy/_version.py"

# https://peps.python.org/pep-0621/
[project]
name = "llspy"
dynamic = ["version"]
description = "Lattice Light Sheet Processing Tools."
readme = "README.rst"
requires-python = ">=3.7"
license = { text = "BSD-3-Clause" }
authors = [{ name = "Talley Lambert", email = "[email protected]" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
"click ~=8.1",
"llspy-slm>=0.2.1",
"matplotlib",
"numpy",
"parse ~=1.20",
"qtpy >=2.4",
"scipy <=1.12",
"sentry-sdk ~=1.38",
"tifffile",
"voluptuous ~=0.14",
"watchdog ~=3.0",
"numba;python_version < '3.13'",
"importlib_metadata; python_version < '3.8'",
]

# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
napari = ["napari"]
pyqt5 = ["PyQt5"]
pyside2 = ["PySide2"]
spimagine = ["spimagine"]
test = ["pytest", "pytest-cov", "pytest-qt"]
dev = ["ipython", "mypy", "pdbpp", "pre-commit", "rich", "ruff"]

[project.urls]
homepage = "https://github.com/tlambert03/LLSpy"
repository = "https://github.com/tlambert03/LLSpy"

[project.scripts]
lls = "llspy.bin.llspy_cli:cli"
lls-gui = "llspy.bin.llspy_gui:main"

[tool.setuptools.packages.find]
where = ["src"]

# https://docs.astral.sh/ruff
[tool.ruff]
line-length = 88
target-version = "py37"
src = ["src"]

[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules
select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"A001", # flake8-builtins
"RUF", # ruff-specific rules
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
]
ignore = [
"E501", # line length
]
exclude = ["docs/*"]

[tool.check-manifest]
ignore = ["llspy/_version.py", ".pre-commit-config.yaml"]
ignore = ["llspy/_version.py", ".pre-commit-config.yaml", "tests/*"]
88 changes: 0 additions & 88 deletions setup.cfg

This file was deleted.

File renamed without changes.
Loading
Loading