Skip to content

Commit 6d2d4fd

Browse files
Update packaging (#62)
* update packaging * update usage tips * fix github runner images * bump min python * update tox
1 parent dd81236 commit 6d2d4fd

9 files changed

Lines changed: 102 additions & 130 deletions

File tree

.github/workflows/test_and_deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
runs-on: ${{ matrix.platform }}
2323
strategy:
2424
matrix:
25-
platform: [ubuntu-latest, windows-latest, macos-13]
26-
python-version: [3.8, 3.9, '3.10']
25+
platform: [ubuntu-latest, windows-latest, macos-latest]
26+
python-version: ['3.10', '3.11', '3.12']
2727

2828
steps:
2929
- uses: actions/checkout@v2

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
.idea
44

5+
# uv virtual environment
6+
.venv/
7+
58
# Byte-compiled / optimized / DLL files
69
__pycache__/
710
*.py[cod]

MANIFEST.in

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/usage_tips.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Tips for using surforama
2+
3+
Here are some tips for using `surforama`:
4+
5+
- We recommend denoising your tomograms before visualizing them in `surforama`. In our experience [cryocare](https://github.com/juglab/cryoCARE_pip) and [Isonet2](https://github.com/IsoNet-cryoET/IsoNet2) are a good starting point.
6+
- If you are visualizing large, remote datasets, a low latency connection is essential for a good experience. Using a hard-wired connection and choosing a server that is geographically close to you can help with this.
7+
- We find that using "light mode" in napari can help with visual contrast. See the [napari documentation](https://napari.org/stable/tutorials/fundamentals/viewer.html#changing-the-viewer-theme) for instructions how to change the theme.
8+
9+
If you have other tips for using `surforama`, please make changes to the `/docs/usage_tips.md` file and then submit a pull request.

mkdocs.yml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -85,48 +85,16 @@ nav:
8585
- 'Overview': index.md
8686
- 'Getting started': getting_started.md
8787
- 'Installation': installation.md
88-
- 'CZ cryoET Data Portal': surforama_for_data_portal.md
88+
- 'CZ cryoET Data Portal example': surforama_for_data_portal.md
89+
- 'Tips and tricks': usage_tips.md
8990
- 'Contributing': contributing.md
9091

9192
plugins:
9293
- search
93-
- mkdocstrings:
94-
handlers:
95-
python:
96-
import:
97-
- https://docs.python.org/3/objects.inv
98-
selection:
99-
docstring_style: numpy
100-
filters: [ "!^_" ]
101-
rendering:
102-
show_root_heading: true
103-
show_root_toc_entry: true
104-
show_root_full_path: true
105-
show_object_full_path: false
106-
# show_root_members_full_path: false
107-
# show_category_heading: false
108-
show_if_no_docstring: false
109-
# show_signature: true
110-
show_signature_annotations: true
111-
show_source: true
112-
# show_bases: true
113-
# group_by_category: true
114-
# heading_level: 2
115-
members_order: source # alphabetical/source
116-
117-
## experimental
118-
docstring_section_style: spacy # or table/list/spacy
11994
- mkdocs-video:
12095
is_video: True
12196
video_autoplay: True
12297
video_loop: True
123-
# - gallery:
124-
# conf_script: docs/gallery_conf.py
125-
# examples_dirs: [docs/examples]
126-
# gallery_dirs: [docs/generated/gallery]
127-
# filename_pattern: /*.py # which scripts will be executed for the docs
128-
# ignore_pattern: /__init__.py # ignore these example files completely
129-
# run_stale_examples: True
13098

13199
extra_css:
132100
- stylesheets/extra.css

pyproject.toml

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,84 @@
11
[build-system]
2-
requires = ["setuptools>=42.0.0", "wheel"]
2+
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "surforama"
7+
dynamic = ["version"]
8+
description = "a tool for using surfaces to explore volumetric data in napari"
9+
readme = "README.md"
10+
license = { file = "LICENSE" }
11+
authors = [
12+
{ name = "Kyle Harrington", email = "surforama@kyleharrington.com" },
13+
]
14+
classifiers = [
15+
"Development Status :: 2 - Pre-Alpha",
16+
"Framework :: napari",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: MIT License",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3 :: Only",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Topic :: Scientific/Engineering :: Image Processing",
27+
]
28+
requires-python = ">=3.10"
29+
dependencies = [
30+
"magicgui",
31+
"mrcfile",
32+
"numpy",
33+
"pooch",
34+
"qtpy",
35+
"pyacvd",
36+
"pyvista",
37+
"rich",
38+
"scikit-image",
39+
"starfile",
40+
"trimesh",
41+
"typer",
42+
]
43+
44+
[project.urls]
45+
"Bug Tracker" = "https://github.com/cellcanvas/surforama/issues"
46+
"Documentation" = "https://github.com/cellcanvas/surforama#README.md"
47+
"Source Code" = "https://github.com/cellcanvas/surforama"
48+
"User Support" = "https://github.com/cellcanvas/surforama/issues"
49+
50+
[project.scripts]
51+
surforama = "surforama._cli:app"
52+
53+
[project.entry-points."napari.manifest"]
54+
surforama = "surforama:napari.yaml"
55+
56+
[project.optional-dependencies]
57+
testing = [
58+
"napari",
59+
"pyqt5",
60+
"pytest",
61+
"pytest-cov",
62+
"pytest-qt",
63+
"tox",
64+
]
65+
docs = [
66+
"mkdocs<2",
67+
"mkdocs-material",
68+
"mkdocstrings[python]",
69+
"mkdocs-video",
70+
]
71+
napari = ["napari[all]"]
72+
dev = [
73+
"surforama[testing,docs]",
74+
"pre-commit",
75+
]
76+
77+
[tool.setuptools.packages.find]
78+
where = ["src"]
79+
80+
[tool.setuptools.package-data]
81+
"*" = ["*.yaml"]
582

683
[tool.setuptools_scm]
784
write_to = "src/surforama/_version.py"

setup.cfg

Lines changed: 0 additions & 85 deletions
This file was deleted.

src/surforama/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
from .app import QtSurforama
22

3+
try:
4+
from surforama._version import __version__
5+
except ImportError:
6+
__version__ = "unknown"
7+
38
__all__ = ("QtSurforama",)

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# For more information about tox, see https://tox.readthedocs.io/en/latest/
22
[tox]
3-
envlist = py{38,39,310}-{linux,macos,windows}
3+
envlist = py{310,311,312}-{linux,macos,windows}
44
isolated_build=true
55

66
[gh-actions]
77
python =
8-
3.8: py38
9-
3.9: py39
108
3.10: py310
9+
3.11: py311
10+
3.12: py312
1111

1212
[gh-actions:env]
1313
PLATFORM =

0 commit comments

Comments
 (0)