copick-shared-ui 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- copick_shared_ui-0.0.1/.github/workflows/conventional-commits.yml +19 -0
- copick_shared_ui-0.0.1/.github/workflows/py-formatting.yml +23 -0
- copick_shared_ui-0.0.1/.github/workflows/release-please.yml +64 -0
- copick_shared_ui-0.0.1/.gitignore +84 -0
- copick_shared_ui-0.0.1/.pre-commit-config.yaml +27 -0
- copick_shared_ui-0.0.1/.release-please.manifest.json +3 -0
- copick_shared_ui-0.0.1/LICENSE +21 -0
- copick_shared_ui-0.0.1/PKG-INFO +109 -0
- copick_shared_ui-0.0.1/README.md +40 -0
- copick_shared_ui-0.0.1/SECURITY.md +3 -0
- copick_shared_ui-0.0.1/pyproject.toml +132 -0
- copick_shared_ui-0.0.1/release-please.config.json +29 -0
- copick_shared_ui-0.0.1/src/copick_shared_ui/__init__.py +12 -0
- copick_shared_ui-0.0.1/src/copick_shared_ui/ui/__init__.py +0 -0
- copick_shared_ui-0.0.1/src/copick_shared_ui/ui/edit_object_types_dialog.py +797 -0
- copick_shared_ui-0.0.1/src/copick_shared_ui/util/__init__.py +0 -0
- copick_shared_ui-0.0.1/src/copick_shared_ui/util/validation.py +79 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Validates PR title follows conventional commits
|
|
2
|
+
name: conventional-commits
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
types:
|
|
7
|
+
- edited
|
|
8
|
+
- opened
|
|
9
|
+
- synchronize
|
|
10
|
+
- reopened
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
jobs:
|
|
16
|
+
conventional_commit_title:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: chanzuckerberg/github-actions/.github/actions/conventional-commits@v6.4.0
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Python Linting
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pre_commit_checks:
|
|
10
|
+
name: pre-commit checks
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v3
|
|
14
|
+
- uses: actions/setup-python@v4
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12.5"
|
|
17
|
+
- name: Install action-validator with asdf
|
|
18
|
+
uses: asdf-vm/actions/install@v3
|
|
19
|
+
with:
|
|
20
|
+
tool_versions: |
|
|
21
|
+
action-validator 0.6.0
|
|
22
|
+
- name: check linting
|
|
23
|
+
uses: pre-commit/action@v3.0.1
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Create Release PRs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
issues: write
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
release-please:
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- name: release please
|
|
23
|
+
uses: googleapis/release-please-action@v4
|
|
24
|
+
id: release
|
|
25
|
+
with:
|
|
26
|
+
manifest-file: ".release-please.manifest.json"
|
|
27
|
+
config-file: "release-please.config.json"
|
|
28
|
+
target-branch: "main"
|
|
29
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
|
|
31
|
+
outputs:
|
|
32
|
+
paths_released: ${{ steps.release.outputs.paths_released }}
|
|
33
|
+
|
|
34
|
+
publish-pypi-package:
|
|
35
|
+
name: Build and publish Python package to PyPI
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
needs: release-please
|
|
38
|
+
if: contains(needs.release-please.outputs.paths_released, '.')
|
|
39
|
+
environment:
|
|
40
|
+
name: pypi
|
|
41
|
+
url: https://pypi.org/p/copick-shared-ui
|
|
42
|
+
permissions:
|
|
43
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
44
|
+
steps:
|
|
45
|
+
- name: Checkout ref branch
|
|
46
|
+
uses: actions/checkout@v4
|
|
47
|
+
with:
|
|
48
|
+
ref: ${{ github.ref }}
|
|
49
|
+
fetch-depth: 0
|
|
50
|
+
|
|
51
|
+
- name: Install uv
|
|
52
|
+
uses: astral-sh/setup-uv@v6
|
|
53
|
+
with:
|
|
54
|
+
version: "0.7.13"
|
|
55
|
+
python-version: "3.12"
|
|
56
|
+
|
|
57
|
+
- name: build
|
|
58
|
+
run: |
|
|
59
|
+
uv build
|
|
60
|
+
|
|
61
|
+
- name: Publish distribution ๐ฆ to PyPI
|
|
62
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
63
|
+
with:
|
|
64
|
+
packages-dir: dist
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
env/
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
|
|
27
|
+
# PyInstaller
|
|
28
|
+
# Usually these files are written by a python script from a template
|
|
29
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.coverage
|
|
41
|
+
.coverage.*
|
|
42
|
+
.cache
|
|
43
|
+
nosetests.xml
|
|
44
|
+
coverage.xml
|
|
45
|
+
*,cover
|
|
46
|
+
.hypothesis/
|
|
47
|
+
.napari_cache
|
|
48
|
+
|
|
49
|
+
# Translations
|
|
50
|
+
*.mo
|
|
51
|
+
*.pot
|
|
52
|
+
|
|
53
|
+
# Django stuff:
|
|
54
|
+
*.log
|
|
55
|
+
local_settings.py
|
|
56
|
+
|
|
57
|
+
# Flask instance folder
|
|
58
|
+
instance/
|
|
59
|
+
|
|
60
|
+
# Sphinx documentation
|
|
61
|
+
docs/_build/
|
|
62
|
+
|
|
63
|
+
# MkDocs documentation
|
|
64
|
+
/site/
|
|
65
|
+
|
|
66
|
+
# PyBuilder
|
|
67
|
+
target/
|
|
68
|
+
|
|
69
|
+
# Pycharm and VSCode
|
|
70
|
+
.idea/
|
|
71
|
+
venv/
|
|
72
|
+
.vscode/
|
|
73
|
+
|
|
74
|
+
# IPython Notebook
|
|
75
|
+
.ipynb_checkpoints
|
|
76
|
+
|
|
77
|
+
# pyenv
|
|
78
|
+
.python-version
|
|
79
|
+
|
|
80
|
+
# OS
|
|
81
|
+
.DS_Store
|
|
82
|
+
|
|
83
|
+
# written by setuptools_scm
|
|
84
|
+
**/_version.py
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.5.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-docstring-first
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: trailing-whitespace
|
|
8
|
+
exclude: ^\.napari-hub/.*
|
|
9
|
+
- id: check-yaml # checks for correct yaml syntax for github actions ex.
|
|
10
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
11
|
+
rev: v0.3.4
|
|
12
|
+
hooks:
|
|
13
|
+
- id: ruff
|
|
14
|
+
- repo: https://github.com/psf/black
|
|
15
|
+
rev: 24.3.0
|
|
16
|
+
hooks:
|
|
17
|
+
- id: black
|
|
18
|
+
- repo: https://github.com/tlambert03/napari-plugin-checks
|
|
19
|
+
rev: v0.3.0
|
|
20
|
+
hooks:
|
|
21
|
+
- id: napari-plugin-checks
|
|
22
|
+
# https://mypy.readthedocs.io/en/stable/
|
|
23
|
+
# you may wish to add this as well!
|
|
24
|
+
# - repo: https://github.com/pre-commit/mirrors-mypy
|
|
25
|
+
# rev: v1.9.0
|
|
26
|
+
# hooks:
|
|
27
|
+
# - id: mypy
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Utz H. Ermel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: copick-shared-ui
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Shared UI components for copick visualization plugins
|
|
5
|
+
Project-URL: Repository, https://github.com/copick/copick-shared-ui
|
|
6
|
+
Project-URL: Issues, https://github.com/copick/copick-shared-ui/issues
|
|
7
|
+
Project-URL: Documentation, https://github.com/copick/copick-shared-ui#README.md
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/copick/copick-shared-ui/issues
|
|
9
|
+
Project-URL: Source Code, https://github.com/copick/copick-shared-ui
|
|
10
|
+
Project-URL: User Support, https://github.com/copick/copick-shared-ui/issues
|
|
11
|
+
Author-email: "Utz H. Ermel" <utz@ermel.me>, Kyle Harrington <czi@kyleharrington.com>
|
|
12
|
+
License: MIT License
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2025 Utz H. Ermel
|
|
15
|
+
|
|
16
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
18
|
+
in the Software without restriction, including without limitation the rights
|
|
19
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21
|
+
furnished to do so, subject to the following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
copies or substantial portions of the Software.
|
|
25
|
+
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
|
+
SOFTWARE.
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
Keywords: annotation,copick,cryo-et,cryoet,qt,tomography,ui
|
|
35
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
36
|
+
Classifier: Intended Audience :: Developers
|
|
37
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
38
|
+
Classifier: Operating System :: OS Independent
|
|
39
|
+
Classifier: Programming Language :: Python
|
|
40
|
+
Classifier: Programming Language :: Python :: 3
|
|
41
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
47
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
48
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
49
|
+
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
50
|
+
Requires-Python: >=3.9
|
|
51
|
+
Requires-Dist: copick>=1.5.0
|
|
52
|
+
Requires-Dist: pydantic>=2
|
|
53
|
+
Requires-Dist: qtpy
|
|
54
|
+
Provides-Extra: dev
|
|
55
|
+
Requires-Dist: black>=25.1.0; extra == 'dev'
|
|
56
|
+
Requires-Dist: hatch-vcs>=0.4.0; extra == 'dev'
|
|
57
|
+
Requires-Dist: hatchling>=1.25.0; extra == 'dev'
|
|
58
|
+
Requires-Dist: pre-commit>=4.2.0; extra == 'dev'
|
|
59
|
+
Requires-Dist: ruff>=0.12.0; extra == 'dev'
|
|
60
|
+
Provides-Extra: testing
|
|
61
|
+
Requires-Dist: pyqt6; extra == 'testing'
|
|
62
|
+
Requires-Dist: pytest; extra == 'testing'
|
|
63
|
+
Requires-Dist: pytest-cov; extra == 'testing'
|
|
64
|
+
Requires-Dist: pytest-qt; extra == 'testing'
|
|
65
|
+
Requires-Dist: tox; extra == 'testing'
|
|
66
|
+
Requires-Dist: tox-gh-actions; extra == 'testing'
|
|
67
|
+
Requires-Dist: tox-uv; extra == 'testing'
|
|
68
|
+
Description-Content-Type: text/markdown
|
|
69
|
+
|
|
70
|
+
# copick-shared-ui
|
|
71
|
+
|
|
72
|
+
Shared UI components for copick visualization plugins.
|
|
73
|
+
|
|
74
|
+
This package provides reusable Qt-based UI components that can be used across different copick visualization plugins
|
|
75
|
+
(napari-copick, chimerax-copick, etc.).
|
|
76
|
+
|
|
77
|
+
## Installation
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
uv pip install copick-shared-ui
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Usage
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from copick_shared_ui import EditObjectTypesDialog, validate_copick_name
|
|
87
|
+
|
|
88
|
+
# Use the object types editor
|
|
89
|
+
dialog = EditObjectTypesDialog(parent=None, existing_objects=my_objects)
|
|
90
|
+
if dialog.exec_() == QDialog.Accepted:
|
|
91
|
+
updated_objects = dialog.get_objects()
|
|
92
|
+
|
|
93
|
+
# Validate copick names
|
|
94
|
+
is_valid, sanitized, error_msg = validate_copick_name("my-object-name")
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Components
|
|
98
|
+
|
|
99
|
+
### EditObjectTypesDialog
|
|
100
|
+
|
|
101
|
+
A dialog for managing copick PickableObject types with features:
|
|
102
|
+
- Add, edit, and delete object types
|
|
103
|
+
- Real-time validation with visual feedback
|
|
104
|
+
- Color selection and management
|
|
105
|
+
- Support for all `copick.PickableObject` properties (EMDB/PDB IDs, thresholds, etc.)
|
|
106
|
+
|
|
107
|
+
### Validation
|
|
108
|
+
|
|
109
|
+
Utilities for validating copick entity names according to copick naming conventions.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# copick-shared-ui
|
|
2
|
+
|
|
3
|
+
Shared UI components for copick visualization plugins.
|
|
4
|
+
|
|
5
|
+
This package provides reusable Qt-based UI components that can be used across different copick visualization plugins
|
|
6
|
+
(napari-copick, chimerax-copick, etc.).
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
uv pip install copick-shared-ui
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
from copick_shared_ui import EditObjectTypesDialog, validate_copick_name
|
|
18
|
+
|
|
19
|
+
# Use the object types editor
|
|
20
|
+
dialog = EditObjectTypesDialog(parent=None, existing_objects=my_objects)
|
|
21
|
+
if dialog.exec_() == QDialog.Accepted:
|
|
22
|
+
updated_objects = dialog.get_objects()
|
|
23
|
+
|
|
24
|
+
# Validate copick names
|
|
25
|
+
is_valid, sanitized, error_msg = validate_copick_name("my-object-name")
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Components
|
|
29
|
+
|
|
30
|
+
### EditObjectTypesDialog
|
|
31
|
+
|
|
32
|
+
A dialog for managing copick PickableObject types with features:
|
|
33
|
+
- Add, edit, and delete object types
|
|
34
|
+
- Real-time validation with visual feedback
|
|
35
|
+
- Color selection and management
|
|
36
|
+
- Support for all `copick.PickableObject` properties (EMDB/PDB IDs, thresholds, etc.)
|
|
37
|
+
|
|
38
|
+
### Validation
|
|
39
|
+
|
|
40
|
+
Utilities for validating copick entity names according to copick naming conventions.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "copick-shared-ui"
|
|
7
|
+
requires-python = ">=3.9"
|
|
8
|
+
classifiers = [
|
|
9
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
10
|
+
"Intended Audience :: Developers",
|
|
11
|
+
"License :: OSI Approved :: MIT License",
|
|
12
|
+
"Operating System :: OS Independent",
|
|
13
|
+
"Programming Language :: Python",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
16
|
+
"Programming Language :: Python :: 3.9",
|
|
17
|
+
"Programming Language :: Python :: 3.10",
|
|
18
|
+
"Programming Language :: Python :: 3.11",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
22
|
+
"Programming Language :: Python :: Implementation :: PyPy",
|
|
23
|
+
"Topic :: Scientific/Engineering :: Image Processing",
|
|
24
|
+
]
|
|
25
|
+
dynamic = ["version"]
|
|
26
|
+
dependencies = [
|
|
27
|
+
"qtpy",
|
|
28
|
+
"pydantic>=2",
|
|
29
|
+
"copick>=1.5.0",
|
|
30
|
+
]
|
|
31
|
+
authors = [
|
|
32
|
+
{ name = "Utz H. Ermel", email = "utz@ermel.me" },
|
|
33
|
+
{ name = "Kyle Harrington", email = "czi@kyleharrington.com" },
|
|
34
|
+
]
|
|
35
|
+
description = "Shared UI components for copick visualization plugins"
|
|
36
|
+
readme = "README.md"
|
|
37
|
+
license = { file = "LICENSE" }
|
|
38
|
+
keywords = ["copick", "cryoet", "cryo-et", "tomography", "annotation", "ui", "qt"]
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
Repository = "https://github.com/copick/copick-shared-ui"
|
|
42
|
+
Issues = "https://github.com/copick/copick-shared-ui/issues"
|
|
43
|
+
Documentation = "https://github.com/copick/copick-shared-ui#README.md"
|
|
44
|
+
"Bug Tracker" = "https://github.com/copick/copick-shared-ui/issues"
|
|
45
|
+
"Source Code" = "https://github.com/copick/copick-shared-ui"
|
|
46
|
+
"User Support" = "https://github.com/copick/copick-shared-ui/issues"
|
|
47
|
+
|
|
48
|
+
[project.optional-dependencies]
|
|
49
|
+
dev = [
|
|
50
|
+
"black>=25.1.0",
|
|
51
|
+
"hatchling>=1.25.0",
|
|
52
|
+
"hatch-vcs>=0.4.0",
|
|
53
|
+
"pre-commit>=4.2.0",
|
|
54
|
+
"ruff>=0.12.0",
|
|
55
|
+
]
|
|
56
|
+
testing = [
|
|
57
|
+
"tox",
|
|
58
|
+
"tox-gh-actions",
|
|
59
|
+
"tox-uv",
|
|
60
|
+
"pytest",
|
|
61
|
+
"pytest-cov",
|
|
62
|
+
"pytest-qt",
|
|
63
|
+
"pyqt6",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[tool.hatch.version]
|
|
67
|
+
path = "src/copick_shared_ui/__init__.py"
|
|
68
|
+
|
|
69
|
+
[tool.hatch.metadata]
|
|
70
|
+
allow-direct-references = true
|
|
71
|
+
|
|
72
|
+
[tool.black]
|
|
73
|
+
line-length = 120
|
|
74
|
+
target-version = ['py311']
|
|
75
|
+
|
|
76
|
+
[tool.ruff]
|
|
77
|
+
line-length = 120
|
|
78
|
+
target-version = "py311"
|
|
79
|
+
|
|
80
|
+
[tool.ruff.lint]
|
|
81
|
+
select = [
|
|
82
|
+
"E", "W", # pycodestyle
|
|
83
|
+
"F", # pyflakes
|
|
84
|
+
"B", # bugbear
|
|
85
|
+
"I", # isort
|
|
86
|
+
"N", # pep8-naming
|
|
87
|
+
"ASYNC", # async
|
|
88
|
+
"COM", # commas
|
|
89
|
+
"C4", # comprehensions
|
|
90
|
+
"DTZ", # datetimez
|
|
91
|
+
"ISC", # implicit-str-concat
|
|
92
|
+
"G", # logging-format
|
|
93
|
+
"T20", # print
|
|
94
|
+
"SIM", # simplify
|
|
95
|
+
]
|
|
96
|
+
ignore = [
|
|
97
|
+
"G004", # logging format
|
|
98
|
+
"W293", # blank line contains whitespace
|
|
99
|
+
"B008", # Do not perform calls in argument defaults
|
|
100
|
+
"B905", # `zip()` without an explicit `strict=` parameter
|
|
101
|
+
"N802", # Function name should be lowercase
|
|
102
|
+
"N805", # First argument of a method should be named `self`
|
|
103
|
+
"N806", # Variable in function should be lowercase
|
|
104
|
+
"N999", # Invalid module name
|
|
105
|
+
"E501", # line too long
|
|
106
|
+
"C408", # rewrite empty built-ins as literals
|
|
107
|
+
"T201", # print statements.
|
|
108
|
+
"DTZ007", # Datetime objects without timezones.
|
|
109
|
+
"DTZ005", # More datetimes without timezones.
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
[tool.ruff.lint.isort]
|
|
113
|
+
known-first-party = ["copick_shared_ui"]
|
|
114
|
+
|
|
115
|
+
[tool.ruff.lint.flake8-quotes]
|
|
116
|
+
docstring-quotes = "double"
|
|
117
|
+
|
|
118
|
+
[tool.coverage.run]
|
|
119
|
+
source_pkgs = ["copick_shared_ui", "tests"]
|
|
120
|
+
branch = true
|
|
121
|
+
parallel = true
|
|
122
|
+
|
|
123
|
+
[tool.coverage.paths]
|
|
124
|
+
copick_shared_ui = ["src/copick_shared_ui", "*/copick-shared-ui/src/copick_shared_ui"]
|
|
125
|
+
tests = ["tests", "*/copick-shared-ui/tests"]
|
|
126
|
+
|
|
127
|
+
[tool.coverage.report]
|
|
128
|
+
exclude_lines = [
|
|
129
|
+
"no cov",
|
|
130
|
+
"if __name__ == .__main__.:",
|
|
131
|
+
"if TYPE_CHECKING:",
|
|
132
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"changelog-sections": [
|
|
3
|
+
{ "type": "feat", "section": "โจ Features" },
|
|
4
|
+
{ "type": "fix", "section": "๐ Bug Fixes" },
|
|
5
|
+
{ "type": "perf", "section": "โก๏ธ Performance Improvements" },
|
|
6
|
+
{ "type": "revert", "section": "โฉ๏ธ Reverts" },
|
|
7
|
+
{ "type": "docs", "section": "๐ Documentation" },
|
|
8
|
+
{ "type": "style", "section": "๐
Styles" },
|
|
9
|
+
{ "type": "chore", "section": "๐งน Miscellaneous Chores" },
|
|
10
|
+
{ "type": "refactor", "section": "โป๏ธ Code Refactoring" },
|
|
11
|
+
{ "type": "test", "section": "๐งช Tests" },
|
|
12
|
+
{ "type": "build", "section": "๐ ๏ธ Build System" },
|
|
13
|
+
{ "type": "ci", "section": "โ Continuous Integration" }
|
|
14
|
+
],
|
|
15
|
+
"packages": {
|
|
16
|
+
".": {
|
|
17
|
+
"package-name": "copick-shared-ui",
|
|
18
|
+
"tag-prefix": "v",
|
|
19
|
+
"release-type": "python",
|
|
20
|
+
"separate-pull-requests": true,
|
|
21
|
+
"changelog-path": "CHANGELOG.md",
|
|
22
|
+
"bump-minor-pre-major": false,
|
|
23
|
+
"bump-patch-for-minor-pre-major": false,
|
|
24
|
+
"draft": false,
|
|
25
|
+
"prerelease": false,
|
|
26
|
+
"pull-request-footer": "Merging this PR will release copick-shared-ui on PyPI."
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
__version__ = "0.0.1"
|
|
2
|
+
|
|
3
|
+
from copick_shared_ui.ui.edit_object_types_dialog import EditObjectTypesDialog, ColorButton
|
|
4
|
+
from copick_shared_ui.util.validation import validate_copick_name, get_invalid_characters, generate_smart_copy_name
|
|
5
|
+
|
|
6
|
+
__all__ = (
|
|
7
|
+
"EditObjectTypesDialog",
|
|
8
|
+
"ColorButton",
|
|
9
|
+
"validate_copick_name",
|
|
10
|
+
"get_invalid_characters",
|
|
11
|
+
"generate_smart_copy_name",
|
|
12
|
+
)
|
|
File without changes
|