antibody-utils 0.1.0__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.
- antibody_utils-0.1.0/LICENCE +28 -0
- antibody_utils-0.1.0/PKG-INFO +122 -0
- antibody_utils-0.1.0/README.md +88 -0
- antibody_utils-0.1.0/pyproject.toml +213 -0
- antibody_utils-0.1.0/pyproject.toml.orig +185 -0
- antibody_utils-0.1.0/src/antibody_utils/__init__.py +5 -0
- antibody_utils-0.1.0/src/antibody_utils/_data.py +67 -0
- antibody_utils-0.1.0/src/antibody_utils/data/BLOSUM62 +31 -0
- antibody_utils-0.1.0/src/antibody_utils/data/abangle.toml +113 -0
- antibody_utils-0.1.0/src/antibody_utils/data/liabilities.toml +80 -0
- antibody_utils-0.1.0/src/antibody_utils/data/regions.toml +102 -0
- antibody_utils-0.1.0/src/antibody_utils/data/scheme_to_imgt.json +18 -0
- antibody_utils-0.1.0/src/antibody_utils/geometry/__init__.py +20 -0
- antibody_utils-0.1.0/src/antibody_utils/geometry/orientation.py +177 -0
- antibody_utils-0.1.0/src/antibody_utils/geometry/superposition.py +242 -0
- antibody_utils-0.1.0/src/antibody_utils/liabilities.py +177 -0
- antibody_utils-0.1.0/src/antibody_utils/numbering/__init__.py +27 -0
- antibody_utils-0.1.0/src/antibody_utils/numbering/anarcii.py +360 -0
- antibody_utils-0.1.0/src/antibody_utils/numbering/positions.py +185 -0
- antibody_utils-0.1.0/src/antibody_utils/py.typed +0 -0
- antibody_utils-0.1.0/src/antibody_utils/regions.py +463 -0
- antibody_utils-0.1.0/src/antibody_utils/sequence.py +243 -0
- antibody_utils-0.1.0/src/antibody_utils/structure/__init__.py +20 -0
- antibody_utils-0.1.0/src/antibody_utils/structure/models.py +328 -0
- antibody_utils-0.1.0/src/antibody_utils/structure/parser.py +219 -0
- antibody_utils-0.1.0/src/antibody_utils/structure/selection.py +90 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, University of Oxford
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: antibody-utils
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Utilities for antibody sequence and structure analysis.
|
|
5
|
+
Keywords: antibody,immunoglobulin,CDR,numbering,bioinformatics
|
|
6
|
+
Author: Benjamin Heathcote Williams
|
|
7
|
+
Author-email: Benjamin Heathcote Williams <benjaminhwilliams@users.noreply.github.com>
|
|
8
|
+
License-Expression: BSD-3-Clause
|
|
9
|
+
License-File: LICENCE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Dist: gemmi
|
|
22
|
+
Requires-Dist: numpy
|
|
23
|
+
Requires-Dist: platformdirs ; extra == 'canonicals'
|
|
24
|
+
Requires-Dist: anarcii>=2 ; extra == 'numbering'
|
|
25
|
+
Maintainer: Oxford Protein Informatics Group
|
|
26
|
+
Maintainer-email: Oxford Protein Informatics Group <opig@stats.ox.ac.uk>
|
|
27
|
+
Requires-Python: >=3.11
|
|
28
|
+
Project-URL: Documentation, https://antibody-utils.readthedocs.io
|
|
29
|
+
Project-URL: Source, https://github.com/oxpig/antibody-utils
|
|
30
|
+
Project-URL: Issues, https://github.com/oxpig/antibody-utils/issues
|
|
31
|
+
Provides-Extra: canonicals
|
|
32
|
+
Provides-Extra: numbering
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# antibody-utils
|
|
36
|
+
|
|
37
|
+
[](https://github.com/oxpig/antibody-utils/actions/workflows/tests.yml)
|
|
38
|
+
[](https://antibody-utils.readthedocs.io/en/latest/)
|
|
39
|
+
[](https://results.pre-commit.ci/latest/github/oxpig/antibody-utils/main)
|
|
40
|
+
[](https://codecov.io/gh/oxpig/antibody-utils)
|
|
41
|
+
[](https://pypi.org/project/antibody-utils/)
|
|
42
|
+
[](https://pypi.org/project/antibody-utils/)
|
|
43
|
+
[](https://pepy.tech/projects/antibody-utils)
|
|
44
|
+
|
|
45
|
+
[](LICENCE)
|
|
46
|
+
[](https://github.com/astral-sh/ruff)
|
|
47
|
+
[](https://github.com/astral-sh/uv)
|
|
48
|
+
|
|
49
|
+
Utilities for antibody sequence and structure analysis: numbering, region
|
|
50
|
+
definitions, sequence comparison, VH/VL orientation and more.
|
|
51
|
+
|
|
52
|
+
antibody-utils is developed by the
|
|
53
|
+
[Oxford Protein Informatics Group](https://opig.stats.ox.ac.uk/).
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
|
|
57
|
+
With [uv](https://docs.astral.sh/uv/), add antibody-utils to your project:
|
|
58
|
+
|
|
59
|
+
```console
|
|
60
|
+
uv add antibody-utils
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or with pip:
|
|
64
|
+
|
|
65
|
+
```console
|
|
66
|
+
pip install antibody-utils
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
To number raw sequences and structures with
|
|
70
|
+
[ANARCII](https://github.com/oxpig/ANARCII), install the `numbering` extra:
|
|
71
|
+
|
|
72
|
+
```console
|
|
73
|
+
uv add "antibody-utils[numbering]"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```console
|
|
77
|
+
pip install "antibody-utils[numbering]"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
> [!TIP]
|
|
81
|
+
> ANARCII depends on PyTorch. On Linux, the default PyTorch wheels from PyPI
|
|
82
|
+
> bundle CUDA libraries, a download of several gigabytes. To get the build that
|
|
83
|
+
> suits your machine (CPU-only, or your CUDA or ROCm version):
|
|
84
|
+
>
|
|
85
|
+
> - With uv's pip interface, let uv detect your hardware:
|
|
86
|
+
>
|
|
87
|
+
> ```console
|
|
88
|
+
> uv pip install --torch-backend=auto "antibody-utils[numbering]"
|
|
89
|
+
> ```
|
|
90
|
+
>
|
|
91
|
+
> `uv add` has no such flag; in a uv project, point `torch` at the right
|
|
92
|
+
> PyTorch index in your `pyproject.toml` instead, as described in
|
|
93
|
+
> [uv's PyTorch guide](https://docs.astral.sh/uv/guides/integration/pytorch/).
|
|
94
|
+
>
|
|
95
|
+
> - pip cannot detect your hardware, so install PyTorch first from the
|
|
96
|
+
> [PyTorch index](https://pytorch.org/get-started/locally/) for your platform,
|
|
97
|
+
> e.g. CPU-only:
|
|
98
|
+
>
|
|
99
|
+
> ```console
|
|
100
|
+
> pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
101
|
+
> pip install "antibody-utils[numbering]"
|
|
102
|
+
> ```
|
|
103
|
+
|
|
104
|
+
## Documentation
|
|
105
|
+
|
|
106
|
+
See the [documentation](https://antibody-utils.readthedocs.io) for a user guide
|
|
107
|
+
and API reference.
|
|
108
|
+
|
|
109
|
+
## Citing
|
|
110
|
+
|
|
111
|
+
If you use antibody-utils in published work, please cite it and the methods
|
|
112
|
+
it implements; see [Citing](https://antibody-utils.readthedocs.io/en/latest/citing.html)
|
|
113
|
+
in the documentation.
|
|
114
|
+
|
|
115
|
+
## Contributing
|
|
116
|
+
|
|
117
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to set up a development
|
|
118
|
+
environment, run the tests and propose changes.
|
|
119
|
+
|
|
120
|
+
## Licence
|
|
121
|
+
|
|
122
|
+
BSD 3-Clause; see [LICENCE](LICENCE).
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# antibody-utils
|
|
2
|
+
|
|
3
|
+
[](https://github.com/oxpig/antibody-utils/actions/workflows/tests.yml)
|
|
4
|
+
[](https://antibody-utils.readthedocs.io/en/latest/)
|
|
5
|
+
[](https://results.pre-commit.ci/latest/github/oxpig/antibody-utils/main)
|
|
6
|
+
[](https://codecov.io/gh/oxpig/antibody-utils)
|
|
7
|
+
[](https://pypi.org/project/antibody-utils/)
|
|
8
|
+
[](https://pypi.org/project/antibody-utils/)
|
|
9
|
+
[](https://pepy.tech/projects/antibody-utils)
|
|
10
|
+
|
|
11
|
+
[](LICENCE)
|
|
12
|
+
[](https://github.com/astral-sh/ruff)
|
|
13
|
+
[](https://github.com/astral-sh/uv)
|
|
14
|
+
|
|
15
|
+
Utilities for antibody sequence and structure analysis: numbering, region
|
|
16
|
+
definitions, sequence comparison, VH/VL orientation and more.
|
|
17
|
+
|
|
18
|
+
antibody-utils is developed by the
|
|
19
|
+
[Oxford Protein Informatics Group](https://opig.stats.ox.ac.uk/).
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
With [uv](https://docs.astral.sh/uv/), add antibody-utils to your project:
|
|
24
|
+
|
|
25
|
+
```console
|
|
26
|
+
uv add antibody-utils
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or with pip:
|
|
30
|
+
|
|
31
|
+
```console
|
|
32
|
+
pip install antibody-utils
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
To number raw sequences and structures with
|
|
36
|
+
[ANARCII](https://github.com/oxpig/ANARCII), install the `numbering` extra:
|
|
37
|
+
|
|
38
|
+
```console
|
|
39
|
+
uv add "antibody-utils[numbering]"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```console
|
|
43
|
+
pip install "antibody-utils[numbering]"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
> [!TIP]
|
|
47
|
+
> ANARCII depends on PyTorch. On Linux, the default PyTorch wheels from PyPI
|
|
48
|
+
> bundle CUDA libraries, a download of several gigabytes. To get the build that
|
|
49
|
+
> suits your machine (CPU-only, or your CUDA or ROCm version):
|
|
50
|
+
>
|
|
51
|
+
> - With uv's pip interface, let uv detect your hardware:
|
|
52
|
+
>
|
|
53
|
+
> ```console
|
|
54
|
+
> uv pip install --torch-backend=auto "antibody-utils[numbering]"
|
|
55
|
+
> ```
|
|
56
|
+
>
|
|
57
|
+
> `uv add` has no such flag; in a uv project, point `torch` at the right
|
|
58
|
+
> PyTorch index in your `pyproject.toml` instead, as described in
|
|
59
|
+
> [uv's PyTorch guide](https://docs.astral.sh/uv/guides/integration/pytorch/).
|
|
60
|
+
>
|
|
61
|
+
> - pip cannot detect your hardware, so install PyTorch first from the
|
|
62
|
+
> [PyTorch index](https://pytorch.org/get-started/locally/) for your platform,
|
|
63
|
+
> e.g. CPU-only:
|
|
64
|
+
>
|
|
65
|
+
> ```console
|
|
66
|
+
> pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
67
|
+
> pip install "antibody-utils[numbering]"
|
|
68
|
+
> ```
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
See the [documentation](https://antibody-utils.readthedocs.io) for a user guide
|
|
73
|
+
and API reference.
|
|
74
|
+
|
|
75
|
+
## Citing
|
|
76
|
+
|
|
77
|
+
If you use antibody-utils in published work, please cite it and the methods
|
|
78
|
+
it implements; see [Citing](https://antibody-utils.readthedocs.io/en/latest/citing.html)
|
|
79
|
+
in the documentation.
|
|
80
|
+
|
|
81
|
+
## Contributing
|
|
82
|
+
|
|
83
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to set up a development
|
|
84
|
+
environment, run the tests and propose changes.
|
|
85
|
+
|
|
86
|
+
## Licence
|
|
87
|
+
|
|
88
|
+
BSD 3-Clause; see [LICENCE](LICENCE).
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.12.22,<0.13.0"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "antibody-utils"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Utilities for antibody sequence and structure analysis."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "BSD-3-Clause"
|
|
12
|
+
license-files = ["LICENCE"]
|
|
13
|
+
keywords = [
|
|
14
|
+
"antibody",
|
|
15
|
+
"immunoglobulin",
|
|
16
|
+
"CDR",
|
|
17
|
+
"numbering",
|
|
18
|
+
"bioinformatics",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 3 - Alpha",
|
|
22
|
+
"Intended Audience :: Science/Research",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
30
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
31
|
+
"Typing :: Typed",
|
|
32
|
+
]
|
|
33
|
+
dependencies = [
|
|
34
|
+
"gemmi",
|
|
35
|
+
"numpy",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[[project.authors]]
|
|
39
|
+
name = "Benjamin Heathcote Williams"
|
|
40
|
+
email = "benjaminhwilliams@users.noreply.github.com"
|
|
41
|
+
|
|
42
|
+
[[project.maintainers]]
|
|
43
|
+
name = "Oxford Protein Informatics Group"
|
|
44
|
+
email = "opig@stats.ox.ac.uk"
|
|
45
|
+
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
numbering = ["anarcii>=2"]
|
|
48
|
+
canonicals = ["platformdirs"]
|
|
49
|
+
|
|
50
|
+
[project.urls]
|
|
51
|
+
Documentation = "https://antibody-utils.readthedocs.io"
|
|
52
|
+
Source = "https://github.com/oxpig/antibody-utils"
|
|
53
|
+
Issues = "https://github.com/oxpig/antibody-utils/issues"
|
|
54
|
+
|
|
55
|
+
[tool.pytest.ini_options]
|
|
56
|
+
addopts = [
|
|
57
|
+
"--import-mode=importlib",
|
|
58
|
+
"--doctest-modules",
|
|
59
|
+
]
|
|
60
|
+
testpaths = [
|
|
61
|
+
"tests",
|
|
62
|
+
"src",
|
|
63
|
+
"docs",
|
|
64
|
+
"README.md",
|
|
65
|
+
]
|
|
66
|
+
doctest_optionflags = ["NORMALIZE_WHITESPACE"]
|
|
67
|
+
markers = [
|
|
68
|
+
"numbering: requires the `numbering` extra (ANARCII)",
|
|
69
|
+
"pyigclassify2: requires a licensed copy of the PyIgClassify2 data",
|
|
70
|
+
]
|
|
71
|
+
|
|
72
|
+
[tool.coverage.run]
|
|
73
|
+
source = ["antibody_utils"]
|
|
74
|
+
|
|
75
|
+
[tool.ruff]
|
|
76
|
+
src = [
|
|
77
|
+
"src",
|
|
78
|
+
"tests",
|
|
79
|
+
]
|
|
80
|
+
line-length = 88
|
|
81
|
+
|
|
82
|
+
[tool.ruff.lint]
|
|
83
|
+
select = [
|
|
84
|
+
"ERA",
|
|
85
|
+
"S",
|
|
86
|
+
"BLE",
|
|
87
|
+
"B",
|
|
88
|
+
"A",
|
|
89
|
+
"C4",
|
|
90
|
+
"DTZ",
|
|
91
|
+
"EXE",
|
|
92
|
+
"FA",
|
|
93
|
+
"ISC",
|
|
94
|
+
"ICN",
|
|
95
|
+
"LOG",
|
|
96
|
+
"G",
|
|
97
|
+
"PIE",
|
|
98
|
+
"T20",
|
|
99
|
+
"PYI",
|
|
100
|
+
"PT",
|
|
101
|
+
"RSE",
|
|
102
|
+
"RET",
|
|
103
|
+
"SIM",
|
|
104
|
+
"TID",
|
|
105
|
+
"TC",
|
|
106
|
+
"PTH",
|
|
107
|
+
"FLY",
|
|
108
|
+
"I",
|
|
109
|
+
"NPY",
|
|
110
|
+
"N",
|
|
111
|
+
"PERF",
|
|
112
|
+
"E",
|
|
113
|
+
"W",
|
|
114
|
+
"D",
|
|
115
|
+
"F",
|
|
116
|
+
"PGH",
|
|
117
|
+
"PLE",
|
|
118
|
+
"PLW",
|
|
119
|
+
"UP",
|
|
120
|
+
"FURB",
|
|
121
|
+
"RUF",
|
|
122
|
+
]
|
|
123
|
+
allowed-confusables = [
|
|
124
|
+
"–",
|
|
125
|
+
"α",
|
|
126
|
+
]
|
|
127
|
+
|
|
128
|
+
[tool.ruff.lint.pydocstyle]
|
|
129
|
+
convention = "google"
|
|
130
|
+
|
|
131
|
+
[tool.ruff.lint.per-file-ignores]
|
|
132
|
+
"tests/**/*.py" = [
|
|
133
|
+
"D",
|
|
134
|
+
"S101",
|
|
135
|
+
]
|
|
136
|
+
"scripts/**/*.py" = ["S310"]
|
|
137
|
+
"docs/**/*.py" = ["D"]
|
|
138
|
+
"docs/conf.py" = ["A001"]
|
|
139
|
+
|
|
140
|
+
[tool.ruff.format]
|
|
141
|
+
docstring-code-format = true
|
|
142
|
+
|
|
143
|
+
[tool.typos.files]
|
|
144
|
+
extend-exclude = ["tests/data/legacy/"]
|
|
145
|
+
|
|
146
|
+
[tool.typos.default]
|
|
147
|
+
locale = "en-gb"
|
|
148
|
+
|
|
149
|
+
[tool.typos.default.extend-identifiers]
|
|
150
|
+
NORMALIZE_WHITESPACE = "NORMALIZE_WHITESPACE"
|
|
151
|
+
|
|
152
|
+
[tool.typos.default.extend-words]
|
|
153
|
+
blosum = "blosum"
|
|
154
|
+
ser = "ser"
|
|
155
|
+
thr = "thr"
|
|
156
|
+
|
|
157
|
+
[tool.bumpversion]
|
|
158
|
+
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)'
|
|
159
|
+
serialize = ["{major}.{minor}.{patch}"]
|
|
160
|
+
search = "{current_version}"
|
|
161
|
+
replace = "{new_version}"
|
|
162
|
+
regex = false
|
|
163
|
+
ignore_missing_version = false
|
|
164
|
+
ignore_missing_files = false
|
|
165
|
+
tag = true
|
|
166
|
+
sign_tags = true
|
|
167
|
+
tag_name = "v{new_version}"
|
|
168
|
+
tag_message = "Bump version: {current_version} → {new_version}"
|
|
169
|
+
allow_dirty = false
|
|
170
|
+
commit = true
|
|
171
|
+
message = "Bump version: {current_version} → {new_version}"
|
|
172
|
+
moveable_tags = []
|
|
173
|
+
commit_args = ""
|
|
174
|
+
setup_hooks = []
|
|
175
|
+
pre_commit_hooks = [
|
|
176
|
+
"uv lock",
|
|
177
|
+
"git add uv.lock",
|
|
178
|
+
]
|
|
179
|
+
post_commit_hooks = []
|
|
180
|
+
|
|
181
|
+
[[tool.bumpversion.files]]
|
|
182
|
+
filename = "CITATION.cff"
|
|
183
|
+
search = "version: {current_version}"
|
|
184
|
+
replace = "version: {new_version}"
|
|
185
|
+
|
|
186
|
+
[[tool.bumpversion.files]]
|
|
187
|
+
filename = "CITATION.cff"
|
|
188
|
+
regex = true
|
|
189
|
+
search = 'date-released: \d{{4}}-\d{{2}}-\d{{2}}'
|
|
190
|
+
replace = "date-released: {now:%Y-%m-%d}"
|
|
191
|
+
|
|
192
|
+
[[tool.bumpversion.files]]
|
|
193
|
+
filename = "CHANGELOG.md"
|
|
194
|
+
search = "## Unreleased"
|
|
195
|
+
replace = """
|
|
196
|
+
## Unreleased
|
|
197
|
+
|
|
198
|
+
## {new_version} ({now:%Y-%m-%d})"""
|
|
199
|
+
|
|
200
|
+
[dependency-groups]
|
|
201
|
+
dev = [
|
|
202
|
+
"bump-my-version>=1.4.1",
|
|
203
|
+
"pre-commit>=4.6.0",
|
|
204
|
+
"pytest>=9.1.1",
|
|
205
|
+
"pytest-cov>=7",
|
|
206
|
+
"sybil>=10.1.0",
|
|
207
|
+
]
|
|
208
|
+
docs = [
|
|
209
|
+
"furo",
|
|
210
|
+
"myst-parser",
|
|
211
|
+
"sphinx>=8",
|
|
212
|
+
"sphinx-autodoc-typehints",
|
|
213
|
+
]
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.12.22,<0.13.0"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "antibody-utils"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Utilities for antibody sequence and structure analysis."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = "BSD-3-Clause"
|
|
12
|
+
license-files = ["LICENCE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Benjamin Heathcote Williams", email = "benjaminhwilliams@users.noreply.github.com" },
|
|
15
|
+
]
|
|
16
|
+
maintainers = [
|
|
17
|
+
{ name = "Oxford Protein Informatics Group", email = "opig@stats.ox.ac.uk" },
|
|
18
|
+
]
|
|
19
|
+
keywords = ["antibody", "immunoglobulin", "CDR", "numbering", "bioinformatics"]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Development Status :: 3 - Alpha",
|
|
22
|
+
"Intended Audience :: Science/Research",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
30
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
31
|
+
"Typing :: Typed",
|
|
32
|
+
]
|
|
33
|
+
dependencies = [
|
|
34
|
+
"gemmi",
|
|
35
|
+
"numpy",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
numbering = ["anarcii>=2"]
|
|
40
|
+
canonicals = ["platformdirs"]
|
|
41
|
+
|
|
42
|
+
[project.urls]
|
|
43
|
+
Documentation = "https://antibody-utils.readthedocs.io"
|
|
44
|
+
Source = "https://github.com/oxpig/antibody-utils"
|
|
45
|
+
Issues = "https://github.com/oxpig/antibody-utils/issues"
|
|
46
|
+
|
|
47
|
+
[tool.pytest.ini_options]
|
|
48
|
+
addopts = [
|
|
49
|
+
"--import-mode=importlib",
|
|
50
|
+
# Run docstring examples as tests; `conftest.py` does the same for Markdown.
|
|
51
|
+
"--doctest-modules",
|
|
52
|
+
]
|
|
53
|
+
testpaths = ["tests", "src", "docs", "README.md"]
|
|
54
|
+
doctest_optionflags = ["NORMALIZE_WHITESPACE"]
|
|
55
|
+
markers = [
|
|
56
|
+
"numbering: requires the `numbering` extra (ANARCII)",
|
|
57
|
+
"pyigclassify2: requires a licensed copy of the PyIgClassify2 data",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[tool.coverage.run]
|
|
61
|
+
source = ["antibody_utils"]
|
|
62
|
+
|
|
63
|
+
[tool.ruff]
|
|
64
|
+
src = ["src", "tests"]
|
|
65
|
+
line-length = 88
|
|
66
|
+
lint.select = [
|
|
67
|
+
"ERA", # eradicate - https://docs.astral.sh/ruff/rules/#eradicate-era
|
|
68
|
+
"S", # flake8-bandit - https://docs.astral.sh/ruff/rules/#flake8-bandit-s
|
|
69
|
+
"BLE", # flake8-blind-except - https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
|
|
70
|
+
"B", # flake8-bugbear - https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
|
|
71
|
+
"A", # flake8-builtins - https://docs.astral.sh/ruff/rules/#flake8-builtins-a
|
|
72
|
+
"C4", # flake8-comprehensions - https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
|
|
73
|
+
"DTZ", # flake8-datetimez - https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
|
|
74
|
+
"EXE", # flake8-executable - https://docs.astral.sh/ruff/rules/#flake8-executable-exe
|
|
75
|
+
"FA", # flake8-future-annotations - https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
|
|
76
|
+
"ISC", # flake8-implicit-str-concat - https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
|
|
77
|
+
"ICN", # flake8-import-conventions - https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
|
|
78
|
+
"LOG", # flake8-logging - https://docs.astral.sh/ruff/rules/#flake8-logging-log
|
|
79
|
+
"G", # flake8-logging-format - https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
|
|
80
|
+
"PIE", # flake8-pie - https://docs.astral.sh/ruff/rules/#flake8-pie-pie
|
|
81
|
+
"T20", # flake8-print - https://docs.astral.sh/ruff/rules/#flake8-print-t20
|
|
82
|
+
"PYI", # flake8-pyi - https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
|
|
83
|
+
"PT", # flake8-pytest-style - https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
|
|
84
|
+
"RSE", # flake8-raise - https://docs.astral.sh/ruff/rules/#flake8-raise-rse
|
|
85
|
+
"RET", # flake8-return - https://docs.astral.sh/ruff/rules/#flake8-return-ret
|
|
86
|
+
"SIM", # flake8-simplify - https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
|
|
87
|
+
"TID", # flake8-tidy-imports - https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
|
|
88
|
+
"TC", # flake8-type-checking - https://docs.astral.sh/ruff/rules/#flake8-type-checking-tc
|
|
89
|
+
"PTH", # flake8-use-pathlib - https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
|
|
90
|
+
"FLY", # flynt - https://docs.astral.sh/ruff/rules/#flynt-fly
|
|
91
|
+
"I", # isort - https://docs.astral.sh/ruff/rules/#isort-i
|
|
92
|
+
"NPY", # NumPy-specific rules - https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
|
|
93
|
+
"N", # pep8-naming - https://docs.astral.sh/ruff/rules/#pep8-naming-n
|
|
94
|
+
"PERF", # Perflint - https://docs.astral.sh/ruff/rules/#perflint-perf
|
|
95
|
+
"E", # pycodestyle errors - https://docs.astral.sh/ruff/rules/#error-e
|
|
96
|
+
"W", # pycodestyle warnings - https://docs.astral.sh/ruff/rules/#warning-w
|
|
97
|
+
"D", # pydocstyle - https://docs.astral.sh/ruff/rules/#pydocstyle-d
|
|
98
|
+
"F", # pyflakes rules - https://docs.astral.sh/ruff/rules/#pyflakes-f
|
|
99
|
+
"PGH", # pygrep-hooks - https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
|
|
100
|
+
"PLE", # Pylint errors - https://docs.astral.sh/ruff/rules/#pylint-pl
|
|
101
|
+
"PLW", # Pylint warnings - https://docs.astral.sh/ruff/rules/#pylint-pl
|
|
102
|
+
"UP", # pyupgrade - https://docs.astral.sh/ruff/rules/#pyupgrade-up
|
|
103
|
+
"FURB", # refurb - https://docs.astral.sh/ruff/rules/#refurb-furb
|
|
104
|
+
"RUF", # Ruff-specific rules - https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
|
|
105
|
+
]
|
|
106
|
+
# En dashes (in page ranges) and α (in Cα) are intended.
|
|
107
|
+
lint.allowed-confusables = ["–", "α"]
|
|
108
|
+
|
|
109
|
+
[tool.ruff.format]
|
|
110
|
+
docstring-code-format = true
|
|
111
|
+
|
|
112
|
+
[tool.ruff.lint.pydocstyle]
|
|
113
|
+
convention = "google"
|
|
114
|
+
|
|
115
|
+
[tool.ruff.lint.per-file-ignores]
|
|
116
|
+
"tests/**/*.py" = ["D", "S101"] # No docstrings required; allow assert statements
|
|
117
|
+
"scripts/**/*.py" = ["S310"] # URL fetches are the point of these scripts
|
|
118
|
+
"docs/**/*.py" = ["D"]
|
|
119
|
+
"docs/conf.py" = ["A001"] # Sphinx's `copyright` setting shadows the builtin
|
|
120
|
+
|
|
121
|
+
[tool.typos.files]
|
|
122
|
+
extend-exclude = ["tests/data/legacy/"]
|
|
123
|
+
|
|
124
|
+
[tool.typos.default]
|
|
125
|
+
locale = "en-gb"
|
|
126
|
+
|
|
127
|
+
[tool.typos.default.extend-identifiers]
|
|
128
|
+
NORMALIZE_WHITESPACE = "NORMALIZE_WHITESPACE" # doctest option flag
|
|
129
|
+
|
|
130
|
+
[tool.typos.default.extend-words]
|
|
131
|
+
blosum = "blosum" # BLOSUM substitution matrices
|
|
132
|
+
ser = "ser" # Residue name
|
|
133
|
+
thr = "thr" # Residue name
|
|
134
|
+
|
|
135
|
+
[tool.bumpversion]
|
|
136
|
+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
137
|
+
serialize = ["{major}.{minor}.{patch}"]
|
|
138
|
+
search = "{current_version}"
|
|
139
|
+
replace = "{new_version}"
|
|
140
|
+
regex = false
|
|
141
|
+
ignore_missing_version = false
|
|
142
|
+
ignore_missing_files = false
|
|
143
|
+
tag = true
|
|
144
|
+
sign_tags = true
|
|
145
|
+
tag_name = "v{new_version}"
|
|
146
|
+
tag_message = "Bump version: {current_version} → {new_version}"
|
|
147
|
+
allow_dirty = false
|
|
148
|
+
commit = true
|
|
149
|
+
message = "Bump version: {current_version} → {new_version}"
|
|
150
|
+
moveable_tags = []
|
|
151
|
+
commit_args = ""
|
|
152
|
+
setup_hooks = []
|
|
153
|
+
pre_commit_hooks = ["uv lock", "git add uv.lock"]
|
|
154
|
+
post_commit_hooks = []
|
|
155
|
+
|
|
156
|
+
[[tool.bumpversion.files]]
|
|
157
|
+
filename = "CITATION.cff"
|
|
158
|
+
search = "version: {current_version}"
|
|
159
|
+
replace = "version: {new_version}"
|
|
160
|
+
|
|
161
|
+
[[tool.bumpversion.files]]
|
|
162
|
+
filename = "CITATION.cff"
|
|
163
|
+
regex = true
|
|
164
|
+
search = "date-released: \\d{{4}}-\\d{{2}}-\\d{{2}}"
|
|
165
|
+
replace = "date-released: {now:%Y-%m-%d}"
|
|
166
|
+
|
|
167
|
+
[[tool.bumpversion.files]]
|
|
168
|
+
filename = "CHANGELOG.md"
|
|
169
|
+
search = "## Unreleased"
|
|
170
|
+
replace = "## Unreleased\n\n## {new_version} ({now:%Y-%m-%d})"
|
|
171
|
+
|
|
172
|
+
[dependency-groups]
|
|
173
|
+
dev = [
|
|
174
|
+
"bump-my-version>=1.4.1",
|
|
175
|
+
"pre-commit>=4.6.0",
|
|
176
|
+
"pytest>=9.1.1",
|
|
177
|
+
"pytest-cov>=7",
|
|
178
|
+
"sybil>=10.1.0",
|
|
179
|
+
]
|
|
180
|
+
docs = [
|
|
181
|
+
"furo",
|
|
182
|
+
"myst-parser",
|
|
183
|
+
"sphinx>=8",
|
|
184
|
+
"sphinx-autodoc-typehints",
|
|
185
|
+
]
|