-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to npe2 * add test * make extension handling consistent between napari.yaml and reader itself * fix bug introduced in reader * add deps
- Loading branch information
1 parent
1e488f3
commit ff25cd9
Showing
12 changed files
with
260 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[build-system] | ||
requires = ["setuptools>=42.0.0", "wheel", "setuptools_scm"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[tool.setuptools_scm] | ||
write_to = "src/napari_mrcfile_reader/_version.py" | ||
|
||
[tool.black] | ||
line-length = 79 | ||
target-version = ['py38', 'py39', 'py310'] | ||
|
||
|
||
[tool.ruff] | ||
line-length = 79 | ||
select = [ | ||
"E", "F", "W", #flake8 | ||
"UP", # pyupgrade | ||
"I", # isort | ||
"BLE", # flake8-blind-exception | ||
"B", # flake8-bugbear | ||
"A", # flake8-builtins | ||
"C4", # flake8-comprehensions | ||
"ISC", # flake8-implicit-str-concat | ||
"G", # flake8-logging-format | ||
"PIE", # flake8-pie | ||
"SIM", # flake8-simplify | ||
] | ||
ignore = [ | ||
"E501", # line too long. let black handle this | ||
"UP006", "UP007", # type annotation. As using magicgui require runtime type annotation then we disable this. | ||
"SIM117", # flake8-simplify - some of merged with statements are not looking great with black, reanble after drop python 3.9 | ||
] | ||
|
||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".mypy_cache", | ||
".pants.d", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"venv", | ||
"*vendored*", | ||
"*_vendor*", | ||
] | ||
|
||
target-version = "py38" | ||
fix = true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[metadata] | ||
name = napari-mrcfile-reader | ||
|
||
description = Read MRC2014 files in napari using mrcfile. | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/alisterburt/napari-mrcfile-reader | ||
author = Alister Burt | ||
author_email = [email protected] | ||
license = BSD-3-Clause | ||
license_files = LICENSE | ||
classifiers = | ||
Development Status :: 2 - Pre-Alpha | ||
Framework :: napari | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: BSD License | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Topic :: Scientific/Engineering :: Image Processing | ||
project_urls = | ||
Bug Tracker = https://github.com/alisterburt/napari-mrcfile-reader/issues | ||
Documentation = https://github.com/alisterburt/napari-mrcfile-reader#README.md | ||
Source Code = https://github.com/alisterburt/napari-mrcfile-reader | ||
User Support = https://github.com/alisterburt/napari-mrcfile-reader/issues | ||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
numpy | ||
mrcfile | ||
|
||
python_requires = >=3.8 | ||
include_package_data = True | ||
package_dir = | ||
=src | ||
setup_requires = setuptools_scm | ||
# add your package requirements here | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
[options.entry_points] | ||
napari.manifest = | ||
napari-mrcfile-reader = napari_mrcfile_reader:napari.yaml | ||
|
||
[options.extras_require] | ||
testing = | ||
tox | ||
pytest # https://docs.pytest.org/en/latest/contents.html | ||
pytest-cov # https://pytest-cov.readthedocs.io/en/latest/ | ||
|
||
|
||
[options.package_data] | ||
* = *.yaml |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
try: | ||
from ._version import version as __version__ | ||
except ImportError: | ||
__version__ = "unknown" | ||
|
||
from ._reader import napari_get_reader | ||
|
||
__all__ = ( | ||
"napari_get_reader", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
...file_reader/_tests/test_mrcfile_reader.py → ...pari_mrcfile_reader/_tests/test_reader.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: napari-mrcfile-reader | ||
display_name: napari-mrcfile-reader | ||
contributions: | ||
commands: | ||
- id: napari-mrcfile-reader.get_reader | ||
python_name: napari_mrcfile_reader._reader:napari_get_reader | ||
title: Open data with napari-mrcfile-reader | ||
readers: | ||
- command: napari-mrcfile-reader.get_reader | ||
accepts_directories: false | ||
filename_patterns: [ | ||
'*.mrc', | ||
'*.mrcs', | ||
'*.map', | ||
'*.st', | ||
'*.rec', | ||
'*.preali', | ||
'*.ali', | ||
] |
Oops, something went wrong.